Mercurial > hg-stable
comparison mercurial/ui.py @ 24687:28d76bc069db
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.
author | Alexander Drozdov <al.drozdov@gmail.com> |
---|---|
date | Fri, 10 Apr 2015 08:05:50 +0300 |
parents | 7d01371e6358 |
children | 2f88821856eb |
comparison
equal
deleted
inserted
replaced
24686:e0e28e910fa3 | 24687:28d76bc069db |
---|---|
807 f.close() | 807 f.close() |
808 | 808 |
809 environ = {'HGUSER': user} | 809 environ = {'HGUSER': user} |
810 if 'transplant_source' in extra: | 810 if 'transplant_source' in extra: |
811 environ.update({'HGREVISION': hex(extra['transplant_source'])}) | 811 environ.update({'HGREVISION': hex(extra['transplant_source'])}) |
812 for label in ('source', 'rebase_source'): | 812 for label in ('intermediate-source', 'source', 'rebase_source'): |
813 if label in extra: | 813 if label in extra: |
814 environ.update({'HGREVISION': extra[label]}) | 814 environ.update({'HGREVISION': extra[label]}) |
815 break | 815 break |
816 if editform: | 816 if editform: |
817 environ.update({'HGEDITFORM': editform}) | 817 environ.update({'HGEDITFORM': editform}) |