[PATCH] ui: edit(): graft: prefer 'intermediate-source' extra to use for HGREVISION environment variable
Alexander Drozdov
al.drozdov at gmail.com
Fri Apr 10 05:17:29 UTC 2015
# HG changeset patch
# User Alexander Drozdov <al.drozdov at gmail.com>
# Date 1428642350 -10800
# Fri Apr 10 08:05:50 2015 +0300
# Node ID 6e27f5b6ff772e32002180c75ebac47414b9ee0b
# Parent e0e28e910fa3797fd0aa4f818e9b33c5bcbf0e53
ui: edit(): graft: prefer 'intermediate-source' extra to use for HGREVISION environment variable
Revision 51930a7180bd ('graft: record intermediate grafts in extras') introduced
'intermediate-source' extra which refers to the closest graft source.
As 'intermediate-source' extra provides more detailed information about the source
changeset than 'source' one, it is better to prefer the first one to use as a
value of HGREVISION environment variable for an editor.
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -809,7 +809,7 @@ class ui(object):
environ = {'HGUSER': user}
if 'transplant_source' in extra:
environ.update({'HGREVISION': hex(extra['transplant_source'])})
- for label in ('source', 'rebase_source'):
+ for label in ('intermediate-source', 'source', 'rebase_source'):
if label in extra:
environ.update({'HGREVISION': extra[label]})
break
More information about the Mercurial-devel
mailing list