changeset 25808:425839c8ec79

histedit: minor refactoring of createmarkers check We use a variable to store whether or not we can create obsolescence markers. It makes the patch series more readable as we are going to reuse this values in other places in the function.
author Laurent Charignon <lcharignon@fb.com>
date Thu, 16 Jul 2015 11:17:37 -0700
parents 2cccaf937a7a
children ebb5bb9bc32e
files hgext/histedit.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Wed Jul 15 20:39:23 2015 -0700
+++ b/hgext/histedit.py	Thu Jul 16 11:17:37 2015 -0700
@@ -750,6 +750,7 @@
 
     replacements = []
     state.keep = opts.get('keep', False)
+    supportsmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt)
 
     # rebuild state
     if goal == 'continue':
@@ -881,7 +882,7 @@
         if mapping:
             movebookmarks(ui, repo, mapping, state.topmost, ntm)
             # TODO update mq state
-        if obsolete.isenabled(repo, obsolete.createmarkersopt):
+        if supportsmarkers:
             markers = []
             # sort by revision number because it sound "right"
             for prec in sorted(mapping, key=repo.changelog.rev):