changeset 2771:6044bd16bfb7

split: add support for the -D and -U option
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 23 Jul 2017 07:34:18 +0200
parents a9ea16a1f4dc
children 394b836e475b
files README hgext3rd/evolve/evocommands.py tests/test-split.t
diffstat 3 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/README	Sun Jul 23 17:06:27 2017 +0200
+++ b/README	Sun Jul 23 07:34:18 2017 +0200
@@ -129,6 +129,7 @@
   - uncommit: add support for --current-date and --current-user option
   - fold: add support for --current-date and --current-user option
   - metaedit: add support for --current-date and --current-user option
+  - split add support for --current-date and --current-user option
 
   - topic: add --age option to sort topic by the most recently touched,
   - topic: add a 't0' to access the root of a topic while keeping it active,
--- a/hgext3rd/evolve/evocommands.py	Sun Jul 23 17:06:27 2017 +0200
+++ b/hgext3rd/evolve/evocommands.py	Sun Jul 23 07:34:18 2017 +0200
@@ -758,7 +758,7 @@
 @eh.command(
     '^split',
     [('r', 'rev', [], _("revision to split")),
-    ] + commitopts + commitopts2,
+    ] + commitopts + commitopts2 + commitopts3,
     _('hg split [OPTION]... [-r] REV'))
 def cmdsplit(ui, repo, *revs, **opts):
     """split a changeset into smaller changesets
@@ -768,6 +768,7 @@
 
     Use --rev to split a given changeset instead.
     """
+    _resolveoptions(ui, opts)
     tr = wlock = lock = None
     newcommits = []
 
--- a/tests/test-split.t	Sun Jul 23 17:06:27 2017 +0200
+++ b/tests/test-split.t	Sun Jul 23 07:34:18 2017 +0200
@@ -399,9 +399,18 @@
   $ echo babar > babar
   $ echo celeste > celeste
   $ hg add babar celeste
-  $ hg commit -m "Works on mytopic" babar celeste
+  $ hg commit -m "Works on mytopic" babar celeste --user victor
+  $ hg log -r . 
+  changeset:   21:26f72cfaf036
+  branch:      new-branch
+  tag:         tip
+  topic:       mytopic
+  user:        victor
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     Works on mytopic
+  
   $ hg summary
-  parent: 21:0a160c9fe1dd tip
+  parent: 21:26f72cfaf036 tip
    Works on mytopic
   branch: new-branch
   commit: 2 unknown (clean)
@@ -411,7 +420,7 @@
 
 Split it
 
-  $ hg split << EOF
+  $ hg split -U << EOF
   > Y
   > Y
   > N