split: add support for the -D and -U option
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 23 Jul 2017 07:34:18 +0200
changeset 2771 6044bd16bfb7
parent 2770 a9ea16a1f4dc
child 2772 394b836e475b
split: add support for the -D and -U option
README
hgext3rd/evolve/evocommands.py
tests/test-split.t
--- 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