Darcs plugin update
- From: Ali Afshar <aafshar gmail com>
- To: meld list <meld-list gnome org>
- Subject: Darcs plugin update
- Date: Thu, 08 Dec 2005 18:07:47 +0000
Hi,
I have fixed a bug in the Darcs plugin to allow correctly viewing
renamed files.
Thanks,
Ali
Index: vc/darcs.py
===================================================================
RCS file: /cvs/gnome/meld/vc/darcs.py,v
retrieving revision 1.1
diff -u -r1.1 darcs.py
--- vc/darcs.py 21 Nov 2005 00:27:00 -0000 1.1
+++ vc/darcs.py 8 Dec 2005 17:49:15 -0000
@@ -29,7 +29,8 @@
"a": _vc.STATE_NONE,
"A": _vc.STATE_NEW,
"M": _vc.STATE_MODIFIED,
- "C": _vc.STATE_CONFLICT
+ "C": _vc.STATE_CONFLICT,
+ "R": _vc.STATE_REMOVED
}
class Vc(_vc.Vc):
@@ -122,10 +123,16 @@
raise
for line in p:
elements = line.split()
- status = STATES[elements.pop(0)]
- filename = os.path.join(self.root,
- os.path.normpath(elements.pop(0)))
- whatsnew[filename] = status
+ if len(elements) > 1:
+ if elements[1] == '->':
+ status = _vc.STATE_NEW
+ filename = elements.pop()
+ else:
+ status = STATES[elements.pop(0)]
+ filename = elements.pop(0)
+ filepath = os.path.join(self.root,
+ os.path.normpath(filename))
+ whatsnew[filepath] = status
return whatsnew
def _get_statuses(self, whatsnew, files, fstype):
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]