Mercurial > evolve
comparison hgext/evolve.py @ 1627:a91115687a7e
topic: preserve topic during evolve
previously, topic handling was absent leading to whatever the active topic was
when `hg evolve` was run to be used for all evolve results
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 17 Mar 2016 10:04:30 -0700 |
parents | 0edb545503fe |
children | db19b1dc5c45 |
comparison
equal
deleted
inserted
replaced
1626:0edb545503fe | 1627:a91115687a7e |
---|---|
3836 if bmactive(repo): | 3836 if bmactive(repo): |
3837 repo.ui.status(_("(leaving bookmark %s)\n") % bmactive(repo)) | 3837 repo.ui.status(_("(leaving bookmark %s)\n") % bmactive(repo)) |
3838 bmdeactivate(repo) | 3838 bmdeactivate(repo) |
3839 if keepbranch: | 3839 if keepbranch: |
3840 repo.dirstate.setbranch(orig.branch()) | 3840 repo.dirstate.setbranch(orig.branch()) |
3841 if util.safehasattr(repo, 'currenttopic'): | |
3842 # uurrgs | |
3843 # there no other topic setter yet | |
3844 if not orig.topic() and repo.vfs.exists('topic'): | |
3845 repo.vfs.unlink('topic') | |
3846 else: | |
3847 with repo.vfs.open('topic', 'w') as f: | |
3848 f.write(orig.topic()) | |
3841 | 3849 |
3842 try: | 3850 try: |
3843 r = merge.graft(repo, orig, pctx, ['local', 'graft'], True) | 3851 r = merge.graft(repo, orig, pctx, ['local', 'graft'], True) |
3844 except TypeError: | 3852 except TypeError: |
3845 # not using recent enough mercurial | 3853 # not using recent enough mercurial |