changeset 4232:424b498aac00

branching: merge with stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 10 Nov 2018 00:55:34 +0100
parents db70de7c1698 (diff) 3eb78bdcdd7c (current diff)
children efd542942d98
files CHANGELOG hgext3rd/evolve/cmdrewrite.py hgext3rd/evolve/evolvecmd.py hgext3rd/topic/__init__.py tests/test-grab.t
diffstat 11 files changed, 112 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/cmdrewrite.py	Tue Nov 06 15:53:18 2018 +0530
+++ b/hgext3rd/evolve/cmdrewrite.py	Sat Nov 10 00:55:34 2018 +0100
@@ -105,7 +105,7 @@
      ('', 'close-branch', None,
       _('mark a branch as closed, hiding it from the branch list')),
      ('s', 'secret', None, _('use the secret phase for committing')),
-     ('n', 'note', '', _('store a note on amend')),
+     ('n', 'note', '', _('store a note on amend'), _('TEXT')),
     ] + walkopts + commitopts + commitopts2 + commitopts3 + interactiveopt,
     _('[OPTION]... [FILE]...'),
     helpbasic=True)
@@ -462,9 +462,9 @@
     'uncommit',
     [('a', 'all', None, _('uncommit all changes when no arguments given')),
      ('i', 'interactive', False, _('interactive mode to uncommit (EXPERIMENTAL)')),
-     ('r', 'rev', '', _('revert commit content to REV instead')),
+     ('r', 'rev', '', _('revert commit content to REV instead'), _('REV')),
      ('', 'revert', False, _('discard working directory changes after uncommit')),
-     ('n', 'note', '', _('store a note on uncommit')),
+     ('n', 'note', '', _('store a note on uncommit'), _('TEXT')),
      ] + commands.walkopts + commitopts + commitopts2 + commitopts3,
     _('[OPTION]... [NAME]'))
 def uncommit(ui, repo, *pats, **opts):
@@ -662,10 +662,10 @@
 
 @eh.command(
     'fold|squash',
-    [('r', 'rev', [], _("revision to fold")),
+    [('r', 'rev', [], _("revision to fold"), _('REV')),
      ('', 'exact', None, _("only fold specified revisions")),
      ('', 'from', None, _("fold revisions linearly to working copy parent")),
-     ('n', 'note', '', _('store a note on fold')),
+     ('n', 'note', '', _('store a note on fold'), _('TEXT')),
     ] + commitopts + commitopts2 + commitopts3,
     _('hg fold [OPTION]... [-r] REV'),
     helpbasic=True)
@@ -791,9 +791,9 @@
 
 @eh.command(
     'metaedit',
-    [('r', 'rev', [], _("revision to edit")),
+    [('r', 'rev', [], _("revision to edit"), _('REV')),
      ('', 'fold', None, _("also fold specified revisions into one")),
-     ('n', 'note', '', _('store a note on metaedit')),
+     ('n', 'note', '', _('store a note on metaedit'), _('TEXT')),
     ] + commitopts + commitopts2 + commitopts3,
     _('hg metaedit [OPTION]... [-r] [REV]'))
 def metaedit(ui, repo, *revs, **opts):
@@ -941,10 +941,10 @@
 @eh.command(
     'prune|obsolete',
     [('n', 'new', [], _("successor changeset (DEPRECATED)")),
-     ('s', 'succ', [], _("successor changeset")),
-     ('r', 'rev', [], _("revisions to prune")),
+     ('s', 'succ', [], _("successor changeset"), _('REV')),
+     ('r', 'rev', [], _("revisions to prune"), _('REV')),
      ('k', 'keep', None, _("does not modify working copy during prune")),
-     ('n', 'note', '', _('store a note on prune')),
+     ('n', 'note', '', _('store a note on prune'), _('TEXT')),
      ('', 'pair', False, _("record a pairing, such as a rebase or divergence resolution "
                            "(pairing multiple precursors to multiple successors)")),
      ('', 'biject', False, _("alias to --pair (DEPRECATED)")),
@@ -953,7 +953,7 @@
      ('', 'split', False,
       _("record a split (on precursor, multiple successors)")),
      ('B', 'bookmark', [], _("remove revs only reachable from given"
-                             " bookmark"))] + metadataopts,
+                             " bookmark"), _('BOOKMARK'))] + metadataopts,
     _('[OPTION] [-r] REV...'),
     helpbasic=True)
 # XXX -U  --noupdate option to prevent wc update and or bookmarks update ?
@@ -1132,8 +1132,8 @@
 
 @eh.command(
     'split',
-    [('r', 'rev', [], _("revision to split")),
-     ('n', 'note', '', _("store a note on split")),
+    [('r', 'rev', [], _("revision to split"), _('REV')),
+     ('n', 'note', '', _("store a note on split"), _('TEXT')),
     ] + commitopts + commitopts2 + commitopts3,
     _('hg split [OPTION]... [-r] REV'),
     helpbasic=True)
@@ -1229,8 +1229,8 @@
 
 @eh.command(
     'touch',
-    [('r', 'rev', [], 'revision to update'),
-     ('n', 'note', '', _('store a note on touch')),
+    [('r', 'rev', [], _('revision to update'), _('REV')),
+     ('n', 'note', '', _('store a note on touch'), _('TEXT')),
      ('D', 'duplicate', False,
       'do not mark the new revision as successor of the old one'),
      ('A', 'allowdivergence', False,
@@ -1322,7 +1322,7 @@
 
 @eh.command(
     'pick|grab',
-    [('r', 'rev', '', 'revision to pick'),
+    [('r', 'rev', '', _('revision to pick'), _('REV')),
      ('c', 'continue', False, 'continue interrupted pick'),
      ('a', 'abort', False, 'abort interrupted pick'),
     ],
--- a/hgext3rd/evolve/evolvecmd.py	Tue Nov 06 15:53:18 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Sat Nov 10 00:55:34 2018 +0100
@@ -1342,7 +1342,7 @@
      ('A', 'any', False,
       _('also consider troubled changesets unrelated to current working '
         'directory')),
-     ('r', 'rev', [], _('solves troubles of these revisions')),
+     ('r', 'rev', [], _('solves troubles of these revisions'), _('REV')),
      ('', 'bumped', False, _('solves only bumped changesets (DEPRECATED)')),
      ('', 'phase-divergent', False, _('solves only phase-divergent changesets')),
      ('', 'divergent', False, _('solves only divergent changesets (DEPRECATED)')),
@@ -1749,14 +1749,25 @@
             # evolved to confirm that if atop msg should be suppressed to remove
             # redundancy
             lastsolved = None
+            activetopic = getattr(repo, 'currenttopic', '')
             for rev in evolvestate['revs']:
                 # XXX: prevent this lookup by storing nodes instead of revnums
                 curctx = unfi[rev]
+
+                # check if we can use stack template
+                revtopic = getattr(curctx, 'topic', lambda: '')()
+                topicidx = getattr(curctx, 'topicidx', lambda: None)()
+                stacktmplt = False
+                if (activetopic and (activetopic == revtopic) and
+                    topicidx is not None):
+                    stacktmplt = True
+
                 if (curctx.node() not in evolvestate['replacements'] and
                     curctx.node() not in evolvestate['skippedrevs']):
                     newnode = _solveone(ui, repo, curctx, evolvestate, False,
                                         confirm, progresscb, category,
-                                        lastsolved=lastsolved)
+                                        lastsolved=lastsolved,
+                                        stacktmplt=stacktmplt)
                     if newnode[0]:
                         evolvestate['replacements'][curctx.node()] = newnode[1]
                         lastsolved = newnode[1]
--- a/hgext3rd/evolve/metadata.py	Tue Nov 06 15:53:18 2018 +0530
+++ b/hgext3rd/evolve/metadata.py	Sat Nov 10 00:55:34 2018 +0100
@@ -5,7 +5,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-__version__ = '8.3.2.dev'
+__version__ = '8.4.0.dev'
 testedwith = '4.3.2 4.4.2 4.5.2 4.6.2 4.7'
 minimumhgversion = '4.3'
 buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/rewind.py	Tue Nov 06 15:53:18 2018 +0530
+++ b/hgext3rd/evolve/rewind.py	Sat Nov 10 00:55:34 2018 +0100
@@ -27,10 +27,11 @@
 
 @eh.command(
     'rewind|undo',
-    [('', 'to', [], _("rewind to these revisions")),
+    [('', 'to', [], _("rewind to these revisions"), _('REV')),
      ('', 'as-divergence', None, _("preserve current latest successors")),
      ('', 'exact', None, _("only rewind explicitly selected revisions")),
-     ('', 'from', [], _("rewind these revisions to their predecessors")),
+     ('', 'from', [],
+      _("rewind these revisions to their predecessors"), _('REV')),
     ],
     _(''),
     helpbasic=True)
--- a/hgext3rd/topic/__init__.py	Tue Nov 06 15:53:18 2018 +0530
+++ b/hgext3rd/topic/__init__.py	Sat Nov 10 00:55:34 2018 +0100
@@ -177,7 +177,7 @@
               'topic.active': 'green',
              }
 
-__version__ = '0.12.2.dev'
+__version__ = '0.13.0.dev'
 
 testedwith = '4.3.3 4.4.2 4.5.2 4.6.2 4.7'
 minimumhgversion = '4.3'
--- a/hgext3rd/topic/randomname.py	Tue Nov 06 15:53:18 2018 +0530
+++ b/hgext3rd/topic/randomname.py	Sat Nov 10 00:55:34 2018 +0100
@@ -189,7 +189,6 @@
     'pony',
     'porcupine',
     'porpoise',
-    'prairie',
     'puffin',
     'pug',
     'quagga',
--- a/tests/test-amend.t	Tue Nov 06 15:53:18 2018 +0530
+++ b/tests/test-amend.t	Sat Nov 10 00:55:34 2018 +0100
@@ -153,7 +153,7 @@
       --close-branch        mark a branch as closed, hiding it from the branch
                             list
    -s --secret              use the secret phase for committing
-   -n --note VALUE          store a note on amend
+   -n --note TEXT           store a note on amend
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
    -m --message TEXT        use text as commit message
--- a/tests/test-evolve-topic.t	Tue Nov 06 15:53:18 2018 +0530
+++ b/tests/test-evolve-topic.t	Sat Nov 10 00:55:34 2018 +0100
@@ -381,3 +381,63 @@
   $ hg prev
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   [s3] add eee
+
+Check stackaliases(s#) works with  --continue case also, while evolving:
+------------------------------------------------------------------------
+  $ hg up 18
+  switching to topic bar
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg evolve --all
+  move:[s2] add ggg
+  atop:[s1] add fff
+  move:[s3] add hhh
+  move:[s4] add iii
+  move:[s5] add jjj
+  working directory is now at 38a82cbb794a
+  $ hg up 18
+  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
+  $ echo "changes in hhh" > hhh
+  $ hg add hhh
+  $ hg ci --amend
+  4 new orphan changesets
+  $ hg log -G
+  @  26 - {bar} 2c295936ac04 add fff (draft)
+  |
+  | *  25 - {bar} 38a82cbb794a add jjj (draft)
+  | |
+  | *  24 - {bar} 4a44eba0fdb3 add iii (draft)
+  | |
+  | *  23 - {bar} 7acd9ea5d677 add hhh (draft)
+  | |
+  | *  22 - {bar} 735c7bd8f133 add ggg (draft)
+  | |
+  | x  18 - {bar} 793eb6370b2d add fff (draft)
+  |/
+  o  12 - {foo} 42b49017ff90 add eee (draft)
+  |
+  o  10 - {foo} d9cacd156ffc add ddd (draft)
+  |
+  o  2 - {foo} cced9bac76e3 add ccc (draft)
+  |
+  o  1 - {} a4dbed0837ea add bbb (draft)
+  |
+  o  0 - {} 199cc73e9a0b add aaa (draft)
+  
+  $ hg evolve --all
+  move:[s2] add ggg
+  atop:[s1] add fff
+  move:[s3] add hhh
+  merging hhh
+  warning: conflicts while merging hhh! (edit, then use 'hg resolve --mark')
+  fix conflicts and see `hg help evolve.interrupted`
+  [1]
+  $ echo "resolved hhh" > hhh
+  $ hg resolve --mark hhh
+  (no more unresolved files)
+  continue: hg evolve --continue
+  $ hg evolve --continue
+  evolving 23:7acd9ea5d677 "add hhh"
+  move:[s4] add iii
+  atop:[s3] add hhh
+  move:[s5] add jjj
+  working directory is now at 119e4c126fb2
--- a/tests/test-grab.t	Tue Nov 06 15:53:18 2018 +0530
+++ b/tests/test-grab.t	Sat Nov 10 00:55:34 2018 +0100
@@ -24,9 +24,9 @@
   
   options:
   
-   -r --rev VALUE revision to pick
-   -c --continue  continue interrupted pick
-   -a --abort     abort interrupted pick
+   -r --rev REV  revision to pick
+   -c --continue continue interrupted pick
+   -a --abort    abort interrupted pick
   
   (some details hidden, use --verbose to show complete help)
 
--- a/tests/test-options.t	Tue Nov 06 15:53:18 2018 +0530
+++ b/tests/test-options.t	Sat Nov 10 00:55:34 2018 +0100
@@ -24,6 +24,7 @@
   >   allowunstable
   >   exchange
   > EOF
-  $ hg prune | head -n 2
+  $ hg prune
   hg: unknown command 'prune'
   (use 'hg help' for a list of commands)
+  [255]
--- a/tests/test-tutorial.t	Tue Nov 06 15:53:18 2018 +0530
+++ b/tests/test-tutorial.t	Sat Nov 10 00:55:34 2018 +0100
@@ -934,9 +934,9 @@
   options ([+] can be repeated):
   
    -a --all                 uncommit all changes when no arguments given
-   -r --rev VALUE           revert commit content to REV instead
+   -r --rev REV             revert commit content to REV instead
       --revert              discard working directory changes after uncommit
-   -n --note VALUE          store a note on uncommit
+   -n --note TEXT           store a note on uncommit
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
    -m --message TEXT        use text as commit message
@@ -973,16 +973,16 @@
   
   options ([+] can be repeated):
   
-   -r --rev VALUE [+] revision to fold
-      --exact         only fold specified revisions
-      --from          fold revisions linearly to working copy parent
-   -n --note VALUE    store a note on fold
-   -m --message TEXT  use text as commit message
-   -l --logfile FILE  read commit message from file
-   -d --date DATE     record the specified date as commit date
-   -u --user USER     record the specified user as committer
-   -D --current-date  record the current date as commit date
-   -U --current-user  record the current user as committer
+   -r --rev REV [+]  revision to fold
+      --exact        only fold specified revisions
+      --from         fold revisions linearly to working copy parent
+   -n --note TEXT    store a note on fold
+   -m --message TEXT use text as commit message
+   -l --logfile FILE read commit message from file
+   -d --date DATE    record the specified date as commit date
+   -u --user USER    record the specified user as committer
+   -D --current-date record the current date as commit date
+   -U --current-user record the current user as committer
   
   (some details hidden, use --verbose to show complete help)