changeset 3232:c1d20598bc2b

branching: merge with stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 05 Dec 2017 18:31:08 +0100
parents 996dabc4224b (diff) 28fb347a5bf8 (current diff)
children a18ca224e812
files CHANGELOG hgext3rd/evolve/__init__.py hgext3rd/evolve/cmdrewrite.py hgext3rd/topic/__init__.py tests/test-prev-next.t tests/test-topic-stack.t
diffstat 4 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Mon Dec 04 14:27:27 2017 -0800
+++ b/CHANGELOG	Tue Dec 05 18:31:08 2017 +0100
@@ -13,6 +13,13 @@
   * add a new 'serverminitopic' extension for minimal server support
     (see `hg help -e serverminitopic` for details)
 
+7.0.2 - in progress
+-------------------
+
+Topic (0.5.2)
+
+  * makes code more resilient to partiel initialization
+
 7.0.1 -- 2017-11-14
 -------------------
 
--- a/hgext3rd/evolve/cmdrewrite.py	Mon Dec 04 14:27:27 2017 -0800
+++ b/hgext3rd/evolve/cmdrewrite.py	Tue Dec 05 18:31:08 2017 +0100
@@ -83,7 +83,7 @@
 interactiveopt = [['i', 'interactive', None, _('use interactive mode')]]
 
 @eh.command(
-    'amend|refresh',
+    '^amend|refresh',
     [('A', 'addremove', None,
       _('mark new/missing files as added/removed before committing')),
      ('a', 'all', False, _("match all files")),
@@ -298,7 +298,7 @@
         ds.copy(src, dst)
 
 @eh.command(
-    '^uncommit',
+    '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')),
@@ -617,7 +617,7 @@
         lockmod.release(lock, wlock)
 
 @eh.command(
-    '^metaedit',
+    'metaedit',
     [('r', 'rev', [], _("revision to edit")),
      ('', 'fold', None, _("also fold specified revisions into one")),
      ('n', 'note', '', _('store a note on metaedit')),
@@ -1037,7 +1037,7 @@
         lockmod.release(tr, lock, wlock)
 
 @eh.command(
-    '^touch',
+    'touch',
     [('r', 'rev', [], 'revision to update'),
      ('n', 'note', '', _('store a note on touch')),
      ('D', 'duplicate', False,
@@ -1048,8 +1048,9 @@
     # allow to choose the seed ?
     _('[-r] revs'))
 def touch(ui, repo, *revs, **opts):
-    """create successors that are identical to their predecessors except
-    for the changeset ID
+    # Do not split this next line to fit into 80 cols, it is displayed when
+    # running `hg` with no arguments!
+    """create successors that are identical to their predecessors except for the changeset ID
 
     This is used to "resurrect" changesets
     """
--- a/hgext3rd/topic/__init__.py	Mon Dec 04 14:27:27 2017 -0800
+++ b/hgext3rd/topic/__init__.py	Tue Dec 05 18:31:08 2017 +0100
@@ -474,7 +474,7 @@
 
 def wrapinit(orig, self, repo, *args, **kwargs):
     orig(self, repo, *args, **kwargs)
-    if repo.currenttopic:
+    if getattr(repo, 'currenttopic', ''):
         self._extra[constants.extrakey] = repo.currenttopic
     else:
         # Empty key will be dropped from extra by another hack at the changegroup level
@@ -1012,7 +1012,7 @@
     return topicstime
 
 def summaryhook(ui, repo):
-    t = repo.currenttopic
+    t = getattr(repo, 'currenttopic', '')
     if not t:
         return
     # i18n: column positioning for "hg summary"
--- a/hgext3rd/topic/flow.py	Mon Dec 04 14:27:27 2017 -0800
+++ b/hgext3rd/topic/flow.py	Tue Dec 05 18:31:08 2017 +0100
@@ -48,7 +48,7 @@
 
 def wrapphasediscovery(orig, pushop):
     orig(pushop)
-    if pushop.publish:
+    if getattr(pushop, 'publish', False):
         if not util.safehasattr(pushop, 'remotephases'):
             msg = _('--publish flag only supported from Mercurial 4.4 and higher')
             raise error.Abort(msg)