[meld] Fix for conflict state check - as lookup_files may contain more just the path given to it
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Fix for conflict state check - as lookup_files may contain more just the path given to it
- Date: Fri, 21 Jun 2013 22:04:46 +0000 (UTC)
commit 649815dd95853b5980885f6daebda1a4302fbe14
Author: Louis des Landes <louis obsidian com au>
Date: Wed Jun 12 13:11:41 2013 +1000
Fix for conflict state check - as lookup_files may contain more just the path given to it
https://bugzilla.gnome.org/show_bug.cgi?id=702057
meld/vcview.py | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/meld/vcview.py b/meld/vcview.py
index fcb2808..205bc18 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -498,9 +498,15 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
continue
kwargs = {}
- vc_file = self.vc.lookup_files(
- [], [(os.path.basename(path), path)])[1][0]
- if vc_file.state == tree.STATE_CONFLICT and \
+ # Horrible workaround here - lookup_files is not guaranteed
+ # to *only* contain the path in question.
+ vc_files = [
+ x for x in
+ self.vc.lookup_files(
+ [], [(os.path.basename(path), path)])[1]
+ if x.path == path
+ ]
+ if vc_files and vc_files[0].state == tree.STATE_CONFLICT and \
hasattr(self.vc, 'get_path_for_conflict'):
# We use auto merge, so we create a new temp file
# for other, base and this, then set the output to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]