Mercurial > hg
changeset 25709:c87373179ff3
amend: move createmarkers evaluation earlier
The value is used at multiple points in the function. Retrieving the
value in the middle of the transaction scope gives the false
impression that it has a single user. We move it at the start of the
function to clarify this.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 30 Jun 2015 22:28:40 -0700 |
parents | d3d32643c060 |
children | 68c83b8d407a |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Jun 30 19:19:17 2015 -0400 +++ b/mercurial/cmdutil.py Tue Jun 30 22:28:40 2015 -0700 @@ -2454,6 +2454,7 @@ ui.note(_('amending changeset %s\n') % old) base = old.p1() + createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt) wlock = dsguard = lock = newid = None try: @@ -2619,7 +2620,6 @@ marks[bm] = newid marks.recordchange(tr) #commit the whole amend process - createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt) if createmarkers and newid != old.node(): # mark the new changeset as successor of the rewritten one new = repo[newid]