Commit 86646ded authored by Vincent Legoll's avatar Vincent Legoll

Fix Mercurial "diff --git" mode

gnome bug:
debian bug:

Mercurial can be configuresd to output its diffs in "git" mode,
cope with that gracefully.

svn path=/trunk/; revision=1342
parent 8e45a1db
......@@ -31,12 +31,17 @@ class Vc(_vc.Vc):
NAME = "Mercurial"
VC_DIR = ".hg"
PATCH_INDEX_RE = "^diff -r \w+ (.*)$"
# Mercurial diffs can be run in "git" mode
PATCH_INDEX_RE = "^diff (?:-r \w+ |--git a/.* b/)(.*)$"
def commit_command(self, message):
return [self.CMD,"commit","-m",message]
def diff_command(self):
return [self.CMD,"diff"]
ret = [self.CMD,"diff"]
if self.DIFF_GIT_MODE:
return ret
def update_command(self):
return [self.CMD,"update"]
def add_command(self, binary=0):
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