Sélection du patch par son hash.
On sélectionne le patch par en spécifiant son hash plutôt qu'avec "--last 1", pour éviter d'avoir les modifications non commitées. darcs-hash:20071208224912-af139-d80407d7d8696e92f50d5efb3ad63c62b642e83b.gz
This commit is contained in:
parent
aa0141a047
commit
4c1a71477a
1 changed files with 3 additions and 2 deletions
|
@ -45,7 +45,8 @@ def darcs(args):
|
|||
def get_patch_properties():
|
||||
""" Récupère les informations a propos du dernier patch. """
|
||||
prop = etree.XML(darcs("changes --last 1 --xml-output"))[0]
|
||||
diff = darcs("diff --last 1 --unified")
|
||||
hash = prop.attrib['hash']
|
||||
diff = darcs("diff --match='hash %s' --unified" % hash)
|
||||
diff = diff[diff.find('\ndiff ')+1:]
|
||||
cwd = os.getcwd()
|
||||
return { 'author': prop.attrib['author'],
|
||||
|
@ -56,7 +57,7 @@ def get_patch_properties():
|
|||
'name': prop.findtext('name'),
|
||||
'comment': prop.findtext('comment'),
|
||||
'diff': diff,
|
||||
'changes': darcs('changes --last 1 --summary') }
|
||||
'changes': darcs("changes --match='hash %s' --summary" % hash) }
|
||||
|
||||
DEFAULT_TEMPLATE = """From: %(author)s
|
||||
To: %(recipient)s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue