[meld] Update VcView conflict handling to use more appropriate VC API
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Update VcView conflict handling to use more appropriate VC API
- Date: Fri, 17 May 2013 21:36:19 +0000 (UTC)
commit 937b621e7aed3aa01b3f6381a3ebb910f547c6fa
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat May 18 07:11:26 2013 +1000
Update VcView conflict handling to use more appropriate VC API
We shouldn't have been using _get_tree_cache() to access path state;
as the underscore suggests it's internal to a VC, and differs across
the VCs. While it's a truly horrible API, lookup_files() is the right
thing to use in this situation.
meld/vcview.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/meld/vcview.py b/meld/vcview.py
index 63e1b3f..241a420 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -601,8 +601,9 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
continue
kwargs = {}
- status = self.vc._get_tree_cache(path).get(path, None)
- if status == tree.STATE_CONFLICT:
+ vc_file = self.vc.lookup_files(
+ [], [(os.path.basename(path), path)])[1][0]
+ if vc_file.state == tree.STATE_CONFLICT:
# We use auto merge, so we create a new temp file
# for other, base and this, then set the output to
# the current file.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]