--- a/CHANGELOG Fri Nov 09 20:18:57 2018 +0100
+++ b/CHANGELOG Tue Nov 27 04:07:33 2018 +0100
@@ -7,6 +7,8 @@
* evolve: not longer attempt to translate revision's descriptions (issue6016)
* evolve: fix compatibility with mercurial 4.8's narrow extension.
+ * pick: fix summary help text
+ * topic: only use pager when it make senses
8.3.1 -- 2018-10-25
-------------------
--- a/hgext3rd/evolve/__init__.py Fri Nov 09 20:18:57 2018 +0100
+++ b/hgext3rd/evolve/__init__.py Tue Nov 27 04:07:33 2018 +0100
@@ -437,8 +437,8 @@
# extsetup functions.
evolvecommands = ui.configlist('experimental', 'evolutioncommands', [])
evolveopts = ui.configlist('experimental', 'evolution')
- if evolveopts and (commandopt not in evolveopts and
- 'all' not in evolveopts):
+ if evolveopts and (commandopt not in evolveopts
+ and 'all' not in evolveopts):
# We build whitelist containing the commands we want to enable
whitelist = set()
for cmd in evolvecommands:
@@ -1303,8 +1303,8 @@
"backup bundle")),
])
def stripwrapper(orig, ui, repo, *revs, **kwargs):
- if (not ui.configbool('experimental', 'prunestrip', False) or
- kwargs.get('bundle', False)):
+ if (not ui.configbool('experimental', 'prunestrip', False)
+ or kwargs.get('bundle', False)):
return orig(ui, repo, *revs, **kwargs)
if kwargs.get('force'):
--- a/hgext3rd/evolve/cmdrewrite.py Fri Nov 09 20:18:57 2018 +0100
+++ b/hgext3rd/evolve/cmdrewrite.py Tue Nov 27 04:07:33 2018 +0100
@@ -1279,10 +1279,10 @@
# The user hasn't yet decided what to do with the revived
# cset, let's ask
sset = obsutil.successorssets(repo, ctx.node())
- nodivergencerisk = (len(sset) == 0 or
- (len(sset) == 1 and
- len(sset[0]) == 1 and
- repo[sset[0][0]].rev() == ctx.rev()
+ nodivergencerisk = (len(sset) == 0
+ or (len(sset) == 1
+ and len(sset[0]) == 1
+ and repo[sset[0][0]].rev() == ctx.rev()
))
if nodivergencerisk:
duplicate = False
@@ -1328,8 +1328,7 @@
],
_('[-r] rev'))
def cmdpick(ui, repo, *revs, **opts):
- """grabs a commit, move it on the top of working directory parent and
- updates to it."""
+ """move a commit on the top of working directory parent and updates to it."""
cont = opts.get('continue')
abort = opts.get('abort')
--- a/hgext3rd/evolve/evolvecmd.py Fri Nov 09 20:18:57 2018 +0100
+++ b/hgext3rd/evolve/evolvecmd.py Tue Nov 27 04:07:33 2018 +0100
@@ -772,17 +772,18 @@
returns the node of new commit which is formed
"""
if orig.rev() == dest.rev():
- raise error.Abort(_('tried to relocate a node on top of itself'),
- hint=_("This shouldn't happen. If you still "
- "need to move changesets, please do so "
- "manually with nothing to rebase - working "
- "directory parent is also destination"))
+ msg = _('tried to relocate a node on top of itself')
+ hint = _("This shouldn't happen. If you still need to move changesets, "
+ "please do so manually with nothing to rebase - working "
+ "directory parent is also destination")
+ raise error.ProgrammingError(msg, hint=hint)
if pctx is None:
if len(orig.parents()) == 2:
- raise error.Abort(_("tried to relocate a merge commit without "
- "specifying which parent should be moved"),
- hint=_("Specify the parent by passing in pctx"))
+ msg = _("tried to relocate a merge commit without specifying which "
+ "parent should be moved")
+ hint = _("Specify the parent by passing in pctx")
+ raise error.ProgrammingError(msg, hint)
pctx = orig.p1()
commitmsg = orig.description()
@@ -1015,6 +1016,8 @@
tovisit = list(parents(rev))
while tovisit:
r = tovisit.pop()
+ if r == -1:
+ continue
succsets = obsutil.successorssets(repo, tonode(r))
if not succsets:
tovisit.extend(parents(r))
@@ -1444,7 +1447,7 @@
interrupted evolve
- `hg evolve --stop`:
- stops the current interrupted evolve,. keeping all the successful steps,
+ stops the current interrupted evolve, keeping all the successful steps,
but delaying to resolution of the remaining step for later.
- `hg evolve --abort`:
@@ -1621,9 +1624,9 @@
"""logic for handling of `hg evolve --stop`"""
updated = False
pctx = None
- if (evolvestate['command'] == 'evolve' and
- evolvestate['category'] == 'contentdivergent' and
- evolvestate['relocated']):
+ if (evolvestate['command'] == 'evolve'
+ and evolvestate['category'] == 'contentdivergent'
+ and evolvestate['relocated']):
oldother = evolvestate['old-other']
if oldother:
with repo.wlock(), repo.lock():
@@ -1726,8 +1729,8 @@
"""logic for handling of `hg evolve --continue`"""
with repo.wlock(), repo.lock():
- if (evolvestate['command'] == 'next' or
- evolvestate['category'] == 'orphan'):
+ if (evolvestate['command'] == 'next'
+ or evolvestate['category'] == 'orphan'):
_completeorphan(ui, repo, evolvestate)
elif evolvestate['category'] == 'phasedivergent':
_completephasedivergent(ui, repo, evolvestate)
@@ -1750,8 +1753,8 @@
for rev in evolvestate['revs']:
# XXX: prevent this lookup by storing nodes instead of revnums
curctx = unfi[rev]
- if (curctx.node() not in evolvestate['replacements'] and
- curctx.node() not in evolvestate['skippedrevs']):
+ 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)
--- a/hgext3rd/evolve/obsexchange.py Fri Nov 09 20:18:57 2018 +0100
+++ b/hgext3rd/evolve/obsexchange.py Tue Nov 27 04:07:33 2018 +0100
@@ -67,8 +67,8 @@
def _addobscommontob2pull(orig, pullop, kwargs):
ret = orig(pullop, kwargs)
ui = pullop.repo.ui
- if ('obsmarkers' in kwargs and
- pullop.remote.capable('_evoext_getbundle_obscommon')):
+ if ('obsmarkers' in kwargs
+ and pullop.remote.capable('_evoext_getbundle_obscommon')):
boundaries = obsdiscovery.buildpullobsmarkersboundaries(pullop)
if 'common' in boundaries:
common = boundaries['common']
--- a/hgext3rd/evolve/serveronly.py Fri Nov 09 20:18:57 2018 +0100
+++ b/hgext3rd/evolve/serveronly.py Tue Nov 27 04:07:33 2018 +0100
@@ -3,7 +3,7 @@
OBSOLESCENCE IS AN EXPERIMENTAL FEATURE MAKE SURE YOU UNDERSTOOD THE INVOLVED
CONCEPT BEFORE USING IT.
-/!\ THIS EXTENSION IS INTENDED FOR SERVER SIDE ONLY USAGE /!\
+! THIS EXTENSION IS INTENDED FOR SERVER SIDE ONLY USAGE !
For client side usages it is recommended to use the evolve extension for
improved user interface.'''
--- a/hgext3rd/topic/__init__.py Fri Nov 09 20:18:57 2018 +0100
+++ b/hgext3rd/topic/__init__.py Tue Nov 27 04:07:33 2018 +0100
@@ -391,10 +391,10 @@
current = self.currenttopic
if current:
ctx.extra()[constants.extrakey] = current
- if (isinstance(ctx, context.memctx) and
- ctx.extra().get('amend_source') and
- ctx.topic() and
- not self.currenttopic):
+ if (isinstance(ctx, context.memctx)
+ and ctx.extra().get('amend_source')
+ and ctx.topic()
+ and not self.currenttopic):
# we are amending and need to remove a topic
del ctx.extra()[constants.extrakey]
return super(topicrepo, self).commitctx(ctx, error=error)
@@ -652,9 +652,8 @@
" '_' and '.' characters")
raise error.Abort(_("invalid topic name: '%s'") % topic, hint=helptxt)
- ui.pager('topics')
-
if list:
+ ui.pager('topics')
if clear or rev:
raise error.Abort(_("cannot use --clear or --rev with --list"))
if not topic:
@@ -700,6 +699,7 @@
ui.status(_('marked working directory as topic: %s\n') % topic)
return _changecurrenttopic(repo, topic)
+ ui.pager('topics')
# `hg topic --current`
ret = 0
if current and not ct:
--- a/tests/test-grab.t Fri Nov 09 20:18:57 2018 +0100
+++ b/tests/test-grab.t Tue Nov 27 04:07:33 2018 +0100
@@ -20,8 +20,7 @@
aliases: grab
- grabs a commit, move it on the top of working directory parent and
- updates to it.
+ move a commit on the top of working directory parent and updates to it.
options: