Description: allow opening vcs diff from outside of vcs-dir Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/meld/+bug/770549 Origin: http://git.gnome.org/browse/meld/commit/?id=9da095e9c1d330e5e78474633c76c7efcbb4693b Applied-Upstream: 1.5.2 diff --git a/meld/vc/bzr.py b/meld/vc/bzr.py index 777a74f..e9e8626 100644 --- a/meld/vc/bzr.py +++ b/meld/vc/bzr.py @@ -67,7 +67,7 @@ class Vc(_vc.CachedVc): def resolved_command(self): return [self.CMD] + self.CMDARGS + ["resolve"] def valid_repo(self): - if _vc.call([self.CMD, "check"]): + if _vc.call([self.CMD, "check"], cwd=self.root): return False else: return True diff --git a/meld/vc/cvs.py b/meld/vc/cvs.py index 14071e0..151abe3 100644 --- a/meld/vc/cvs.py +++ b/meld/vc/cvs.py @@ -50,7 +50,7 @@ class Vc(_vc.Vc): def revert_command(self): return [self.CMD,"update","-C"] def valid_repo(self): - if _vc.call([self.CMD, "version"]): + if _vc.call([self.CMD, "version"], cwd=self.root): return False else: return True diff --git a/meld/vc/darcs.py b/meld/vc/darcs.py index 6c1070c..5224d75 100644 --- a/meld/vc/darcs.py +++ b/meld/vc/darcs.py @@ -71,7 +71,7 @@ class Vc(_vc.CachedVc): return [self.CMD, "resolve"] def valid_repo(self): - if _vc.call([self.CMD, "query", "tags"]): + if _vc.call([self.CMD, "query", "tags"], cwd=self.root): return False else: return True diff --git a/meld/vc/git.py b/meld/vc/git.py index 82c6c23..23cb7a8 100644 --- a/meld/vc/git.py +++ b/meld/vc/git.py @@ -67,7 +67,7 @@ class Vc(_vc.CachedVc): def revert_command(self): return [self.CMD,"checkout"] def valid_repo(self): - if _vc.call([self.CMD, "branch"]): + if _vc.call([self.CMD, "branch"], cwd=self.root): return False else: return True @@ -82,7 +82,8 @@ class Vc(_vc.CachedVc): try: # Update the index before getting status, otherwise we could # be reading stale status information - _vc.popen(["git", "update-index", "--refresh"]) + _vc.popen(["git", "update-index", "--refresh"], + cwd=self.location) # Get the status of files that are different in the "index" vs # the HEAD of the git repository diff --git a/meld/vc/mercurial.py b/meld/vc/mercurial.py index 77665cc..49860b6 100644 --- a/meld/vc/mercurial.py +++ b/meld/vc/mercurial.py @@ -60,7 +60,7 @@ class Vc(_vc.Vc): def revert_command(self): return [self.CMD,"revert"] def valid_repo(self): - if _vc.call([self.CMD, "root"]): + if _vc.call([self.CMD, "root"], cwd=self.root): return False else: return True diff --git a/meld/vc/monotone.py b/meld/vc/monotone.py index 7d504c8..5867bc0 100644 --- a/meld/vc/monotone.py +++ b/meld/vc/monotone.py @@ -144,7 +144,7 @@ class Vc(_vc.CachedVc): def resolved_command(self): return [self.CMD,"resolved"] def valid_repo(self): - if _vc.call([self.CMD, "list", "tags"]): + if _vc.call([self.CMD, "list", "tags"], cwd=self.root): return False else: return True diff --git a/meld/vc/svn.py b/meld/vc/svn.py index 07a4a2c..3de56ef 100644 --- a/meld/vc/svn.py +++ b/meld/vc/svn.py @@ -61,7 +61,7 @@ class Vc(_vc.Vc): def resolved_command(self): return [self.CMD,"resolved"] def valid_repo(self): - if _vc.call([self.CMD, "info"]): + if _vc.call([self.CMD, "info"], cwd=self.root): return False else: return True diff --git a/meld/vc/tla.py b/meld/vc/tla.py index 82744a0..d3c01d7 100644 --- a/meld/vc/tla.py +++ b/meld/vc/tla.py @@ -86,7 +86,7 @@ class Vc(_vc.CachedVc): return [self.CMD, "undo", "--"] def valid_repo(self): - if _vc.call([self.CMD, "tree-version"]): + if _vc.call([self.CMD, "tree-version"], cwd=self.root): return False else: return True -- 1.7.5.4