editor: 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.
--- a/mercurial/ui.py Thu Apr 09 16:25:48 2015 -0400
+++ b/mercurial/ui.py Fri Apr 10 08:05:50 2015 +0300
@@ -809,7 +809,7 @@
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