Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 22951:6c86c673dde6
obsolete: add createmarkers option
The basic obsolete option is allowing the creation of obsolete markers. This
does not enable other features, such as allowing unstable commits or exchanging
obsolete markers.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 14 Oct 2014 13:23:52 -0700 |
parents | 722117c8e023 |
children | b564330d4b1f |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Oct 14 13:20:31 2014 -0700 +++ b/mercurial/cmdutil.py Tue Oct 14 13:23:52 2014 -0700 @@ -2283,7 +2283,8 @@ marks[bm] = newid marks.write() #commit the whole amend process - if obsolete._enabled and newid != old.node(): + 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] obs = [(old, (new,))] @@ -2294,7 +2295,7 @@ tr.close() finally: tr.release() - if (not obsolete._enabled) and newid != old.node(): + if not createmarkers and newid != old.node(): # Strip the intermediate commit (if there was one) and the amended # commit if node: