Commit 50800c24 authored by Stephen Kennedy's avatar Stephen Kennedy

Fix a bug to allow correctly viewing

renamed files. Patch from Ali Afshar.
parent 78ac749c
...@@ -29,7 +29,8 @@ STATES = { ...@@ -29,7 +29,8 @@ STATES = {
"a": _vc.STATE_NONE, "a": _vc.STATE_NONE,
"A": _vc.STATE_NEW, "A": _vc.STATE_NEW,
"M": _vc.STATE_MODIFIED, "M": _vc.STATE_MODIFIED,
"C": _vc.STATE_CONFLICT "C": _vc.STATE_CONFLICT,
"R": _vc.STATE_REMOVED
} }
class Vc(_vc.Vc): class Vc(_vc.Vc):
...@@ -122,10 +123,16 @@ class Vc(_vc.Vc): ...@@ -122,10 +123,16 @@ class Vc(_vc.Vc):
raise raise
for line in p: for line in p:
elements = line.split() elements = line.split()
status = STATES[elements.pop(0)] if len(elements) > 1:
filename = os.path.join(self.root, if elements[1] == '->':
os.path.normpath(elements.pop(0))) status = _vc.STATE_NEW
whatsnew[filename] = status 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 return whatsnew
def _get_statuses(self, whatsnew, files, fstype): def _get_statuses(self, whatsnew, files, fstype):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment