Mercurial > evolve
diff hgext/evolve.py @ 1391:35518d26b549
merge with stable
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 18 Jun 2015 23:45:37 -0700 |
parents | c96e4ab4e5cc 03f202bed47f |
children | ba95cec18fe9 |
line wrap: on
line diff
--- a/hgext/evolve.py Thu Jun 18 17:57:11 2015 -0700 +++ b/hgext/evolve.py Thu Jun 18 23:45:37 2015 -0700 @@ -946,6 +946,11 @@ return bookmarks.deactivate(repo) except AttributeError: return bookmarks.unsetcurrent(repo) +def bmactivate(repo, book): + try: + return bookmarks.activate(repo, book) + except AttributeError: + return bookmarks.setcurrent(repo, book) def bmactive(repo): try: @@ -1520,7 +1525,7 @@ displayer.show(orig) repo.ui.write(_('atop:')) displayer.show(target) - if confirm and ui.prompt('perform evolve? [Ny]') != 'y': + if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y': raise util.Abort(_('evolve aborted by user')) if progresscb: progresscb() todo = 'hg rebase -r %s -d %s\n' % (orig, target) @@ -1558,7 +1563,7 @@ displayer.show(bumped) repo.ui.write(_('atop:')) displayer.show(prec) - if confirm and ui.prompt('perform evolve? [Ny]') != 'y': + if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y': raise util.Abort(_('evolve aborted by user')) if dryrun: todo = 'hg rebase --rev %s --dest %s;\n' % (bumped, prec.p1()) @@ -1691,7 +1696,7 @@ displayer.show(other) ui.write(_('base: ')) displayer.show(base) - if confirm and ui.prompt('perform evolve? [Ny]') != 'y': + if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y': raise util.Abort(_('evolve aborted by user')) if dryrun: ui.write('hg update -c %s &&\n' % divergent) @@ -2001,13 +2006,13 @@ # after movebookmark = bookactive and not bookmark if movebookmark: - bookmarks.deactivate(repo) + bmdeactivate(repo) repo._bookmarks[bookactive] = newnode.node() repo._bookmarks.write() commands.update(ui, repo, newnode.rev()) ui.status(_('working directory now at %s\n') % newnode) if movebookmark: - bookmarks.activate(repo, bookactive) + bmactivate(repo, bookactive) # update bookmarks if bookmark: