[meld] Fix support for MISSING state in Git and Mercurial plugins
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Fix support for MISSING state in Git and Mercurial plugins
- Date: Thu, 6 Dec 2012 20:36:23 +0000 (UTC)
commit 7f824892e39afbe03b0b6620b2abcc1aec408899
Author: Kai Willadsen <kai willadsen gmail com>
Date: Fri Dec 7 06:22:52 2012 +1000
Fix support for MISSING state in Git and Mercurial plugins
meld/vc/git.py | 10 +++++-----
meld/vc/mercurial.py | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index 457f6f0..5684256 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -207,19 +207,19 @@ class Vc(_vc.CachedVc):
retfiles = []
retdirs = []
- for name,path in files:
+ for name, path in files:
state = tree.get(path, _vc.STATE_NORMAL)
meta = self._tree_meta_cache.get(path, "")
retfiles.append(_vc.File(path, name, state, options=meta))
- for name,path in dirs:
+ for name, path in dirs:
# git does not operate on dirs, just files
- retdirs.append( _vc.Dir(path, name, _vc.STATE_NORMAL))
+ retdirs.append(_vc.Dir(path, name, _vc.STATE_NORMAL))
for path, state in tree.items():
# removed files are not in the filesystem, so must be added here
- if state is _vc.STATE_REMOVED:
+ if state in (_vc.STATE_REMOVED, _vc.STATE_MISSING):
folder, name = os.path.split(path)
if folder == directory:
- retfiles.append( _vc.File(path, name, state) )
+ retfiles.append(_vc.File(path, name, state))
return retdirs, retfiles
def clean_patch(self, patch):
diff --git a/meld/vc/mercurial.py b/meld/vc/mercurial.py
index 7b952d2..18f61b0 100644
--- a/meld/vc/mercurial.py
+++ b/meld/vc/mercurial.py
@@ -131,7 +131,7 @@ class Vc(_vc.CachedVc):
retdirs.append(_vc.Dir(path, name, _vc.STATE_NORMAL))
for path, state in tree.items():
# removed files are not in the filesystem, so must be added here
- if state is _vc.STATE_REMOVED:
+ if state in (_vc.STATE_REMOVED, _vc.STATE_MISSING):
folder, name = os.path.split(path)
if folder == directory:
retfiles.append(_vc.File(path, name, state))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]