From a405472b2c77e222797dc17f98c92036387042b4 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sun, 6 Oct 2013 14:46:25 -0700 Subject: [PATCH] git-xbase: handle unicode in commit messages Call a helper method instead of coercing to str(). We'd need to do this eventually anyways if we were to move to Python 3. Signed-off-by: David Aguilar --- share/git-cola/bin/git-xbase | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/git-cola/bin/git-xbase b/share/git-cola/bin/git-xbase index 4729cdb4..79be648b 100755 --- a/share/git-cola/bin/git-xbase +++ b/share/git-cola/bin/git-xbase @@ -198,7 +198,7 @@ However, if you disable everything, the rebase will be aborted. self.emit_exit(128) def sequencer_instructions(self): - lines = [str(item) for item in self.tree.items()] + lines = [item.value() for item in self.tree.items()] return '\n'.join(lines) + '\n' @@ -303,7 +303,7 @@ class RebaseTreeWidgetItem(QtGui.QTreeWidgetItem): self.setFlags((self.flags() | Qt.ItemIsUserCheckable) & ~Qt.ItemIsDropEnabled) - def __str__(self): + def value(self): return '%s %s %s %s' % ( not self.is_enabled() and '# ' or '', self.command, self.sha1hex, self.summary) -- 2.11.4.GIT