[meld] Fix Mercurial support for comparing subdirectories of the repo



commit f05416962a22fea83c073ecb082026e1a2597d86
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Dec 9 05:51:14 2012 +1000

    Fix Mercurial support for comparing subdirectories of the repo
    
    Unlike Git (where the original code was taken from) Mercurial gives
    cwd-relative paths for status. As such, we need to recreate file paths
    from the location, not the root.

 meld/vc/mercurial.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/vc/mercurial.py b/meld/vc/mercurial.py
index 18f61b0..da8866e 100644
--- a/meld/vc/mercurial.py
+++ b/meld/vc/mercurial.py
@@ -102,7 +102,7 @@ class Vc(_vc.CachedVc):
             for entry in entries:
                 # we might have a space in file name, it should be ignored
                 statekey, name = entry.split(" ", 1)
-                path = os.path.join(self.root, name.strip())
+                path = os.path.join(self.location, name.strip())
                 state = self.state_map.get(statekey.strip(), _vc.STATE_NONE)
                 tree_state[path] = state
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]