changeset 103:23c232a81fbe

amend: add a --branch option
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 11 Oct 2011 19:22:41 +0200
parents 5111329280f1
children 6c3c7a18f079
files hgext/evolution.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolution.py	Thu Sep 29 15:23:56 2011 +0200
+++ b/hgext/evolution.py	Tue Oct 11 19:22:41 2011 +0200
@@ -209,7 +209,9 @@
     ('n', 'note', '',
      _('use text as commit message for this update')),
     ('c', 'change', '',
-     _('specifies the changeset to amend'), _('REV'))
+     _('specifies the changeset to amend'), _('REV')),
+    ('b', 'branch', '',
+     _('specifies a branch for the new.'), _('REV')),
     ] + walkopts + commitopts + commitopts2,
     _('[OPTION]... [FILE]...'))
 
@@ -243,6 +245,9 @@
     if change == '.':
         change = 'p1(p1())'
     old = scmutil.revsingle(repo, change)
+    branch = opts.get('branch')
+    if branch:
+        opts.setdefault('extra', {})['branch'] = branch
 
     wlock = repo.wlock()
     try: