Mercurial > evolve
comparison hgext/evolve.py @ 1341:e8e3dbddc198
merge with stable
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 19 May 2015 00:47:00 -0500 |
parents | 10d2ef1f7ed4 f455ce2a3587 |
children | 376d3df9f47b |
comparison
equal
deleted
inserted
replaced
1339:0e2eb196923a | 1341:e8e3dbddc198 |
---|---|
86 return oldmemfilectx(*args, **kwargs) | 86 return oldmemfilectx(*args, **kwargs) |
87 else: | 87 else: |
88 raise ImportError('evolve needs version %s or above' % min(testedwith.split())) | 88 raise ImportError('evolve needs version %s or above' % min(testedwith.split())) |
89 | 89 |
90 aliases, entry = cmdutil.findcmd('commit', commands.table) | 90 aliases, entry = cmdutil.findcmd('commit', commands.table) |
91 hasinteractivemode = util.any(['interactive' in e for e in entry[1]]) | 91 hasinteractivemode = any(['interactive' in e for e in entry[1]]) |
92 if hasinteractivemode: | 92 if hasinteractivemode: |
93 interactiveopt = [['i', 'interactive', None, _('use interactive mode')]] | 93 interactiveopt = [['i', 'interactive', None, _('use interactive mode')]] |
94 else: | 94 else: |
95 interactiveopt = [] | 95 interactiveopt = [] |
96 # This extension contains the following code | 96 # This extension contains the following code |
911 | 911 |
912 def _bookmarksupdater(repo, oldid): | 912 def _bookmarksupdater(repo, oldid): |
913 """Return a callable update(newid) updating the current bookmark | 913 """Return a callable update(newid) updating the current bookmark |
914 and bookmarks bound to oldid to newid. | 914 and bookmarks bound to oldid to newid. |
915 """ | 915 """ |
916 bm = bmactive(repo) | |
917 def updatebookmarks(newid): | 916 def updatebookmarks(newid): |
918 dirty = False | 917 dirty = False |
919 if bm: | |
920 repo._bookmarks[bm] = newid | |
921 dirty = True | |
922 oldbookmarks = repo.nodebookmarks(oldid) | 918 oldbookmarks = repo.nodebookmarks(oldid) |
923 if oldbookmarks: | 919 if oldbookmarks: |
924 for b in oldbookmarks: | 920 for b in oldbookmarks: |
925 repo._bookmarks[b] = newid | 921 repo._bookmarks[b] = newid |
926 dirty = True | 922 dirty = True |