--- a/.hgtags Mon Nov 04 00:18:55 2019 +0530
+++ b/.hgtags Sat Feb 01 12:50:10 2020 +0100
@@ -83,3 +83,4 @@
6f37fdad7ac123ca0a76872ac4639bd1f3c248f7 9.1.0
40795751be1c329ec23202ecd79ba45623e1df66 9.2.0
d989bab720e5f7638a9e58fda76cf3f4b40d0611 9.2.1
+ef41094c34e162eb32ef24bf66d9776d1112751a 9.2.2
--- a/CHANGELOG Mon Nov 04 00:18:55 2019 +0530
+++ b/CHANGELOG Sat Feb 01 12:50:10 2020 +0100
@@ -14,21 +14,27 @@
* evolve: add content divergence checking to the standard pre-rewrite check,
* evolve: improve the message associated with content divergence.
-9.2.2 - in progress
+9.2.2 -- 2020-01-31
-------------------
- * pick: don't create any successors when there were no changes (issue6093),
+ * amend: cleany abort when both `--patch` and `--extract` are passed
+ * compatibility for changes in upcoming Mercurial 5.3
+ * debian: allow to build with python 3
+ * documentation: update text and add missing figures
+ * evolve: also merge the date field when solving content-divergence
+ * evolve: fix content-divergence resolution when p1 is null (issue6201)
+ * evolve: make sure divergence resolution doesn't undo changes (issue6203)
+ * evolve: preserve date when resolving content-divergence (issue6202)
+ * evolve: use more often seen metavariables in command synopsis strings
* metaedit: don't change commit date by default (issue5994),
- * rewind: preserve date
+ * pick: don't create any successors when there were no changes (issue6093),
+ * py3: fix documentation generation
* py3: fix setup.py --version
- * py3: fix documentation generation
* py3: fix some exception formatting
- * debian: allow to build with python 3
+ * rewind: preserve date
* topic: add more options to command synopsis string
- * evolve: use more often seen metavariables in command synopsis strings
- * documentation: update text and add missing figures
- * amend: cleany abort when both `--patch` and `--extract` are passed
- * evolve: also merge the date field when solving content-divergence
+ * topic: fix a bug in logic of choosing destination for hg update
+ * topic: fix a bug in logic to choose destination when no active topic
9.2.1 -- 2019-10-05
-------------------
--- a/contrib/merge-test-compat.sh Mon Nov 04 00:18:55 2019 +0530
+++ b/contrib/merge-test-compat.sh Sat Feb 01 12:50:10 2020 +0100
@@ -2,14 +2,24 @@
set -euox pipefail
unset GREP_OPTIONS
-NOTOPIC="--config experimental.topic-mode=ignore"
-compatbranches=`hg branches --quiet | grep 'mercurial-' | grep -v ':' | sort -n --reverse`
+compatbranches=$(hg branches --quiet | grep 'mercurial-' | grep -v ':' | sort -n --reverse)
prev='stable'
+topic=${1:-'test-compat'}
for branch in $compatbranches; do
- hg up $branch
- hg merge $prev
+ # Logic in the revsets below:
+ # 1. There is target topic on stable or compatibility branch: merge all
+ # those commits, they are related to our work and need to pass tests on all
+ # compatibility branches.
+ # 2. There is no target topic: avoid any commits that have topic set, they
+ # are definitely unrelated to what we're doing.
+ # In other words, if you want to test certain commits, assign them all to
+ # one topic and provide that topic as the first argument to this script.
+ uptarget="first(max(branch('$branch') and topic('$topic')) or max(branch('$branch') and not topic()))"
+ hg up -r "$uptarget"
+ hg topic "$topic"
+ mergetarget="first(max(branch('$prev') and topic('$topic')) or max(branch('$prev') and not topic()))"
+ hg merge -r "$mergetarget"
hg commit -m "test-compat: merge $prev into $branch"
prev=$branch
done
-
--- a/debian/changelog Mon Nov 04 00:18:55 2019 +0530
+++ b/debian/changelog Sat Feb 01 12:50:10 2020 +0100
@@ -1,4 +1,10 @@
-mercurial-evolve (9.2.1-1.1) UNRELEASED; urgency=medium
+mercurial-evolve (9.2.2-1) unstable; urgency=medium
+
+ * new upstream release
+
+ -- Anton Shestakov <av6@dwimlabs.net> Fri, 31 Jan 2020 14:10:11 +0700
+
+mercurial-evolve (9.2.1-1.1) unstable; urgency=medium
* build with pybuild and sphinxdoc
* update debhelper compat to 10
--- a/hgext3rd/evolve/cmdrewrite.py Mon Nov 04 00:18:55 2019 +0530
+++ b/hgext3rd/evolve/cmdrewrite.py Sat Feb 01 12:50:10 2020 +0100
@@ -570,7 +570,7 @@
if opts.get('revert'):
hg.updaterepo(repo, newid, True)
else:
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(newid, node.nullid)
_uncommitdirstate(repo, old, match, interactive)
if not repo[newid].files():
@@ -1422,7 +1422,7 @@
tr = repo.currenttransaction()
phases.retractboundary(repo, tr, ctx.phase(), [new])
if ctx in repo[None].parents():
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(new, node.nullid)
@eh.command(
--- a/hgext3rd/evolve/compat.py Mon Nov 04 00:18:55 2019 +0530
+++ b/hgext3rd/evolve/compat.py Sat Feb 01 12:50:10 2020 +0100
@@ -6,8 +6,9 @@
Compatibility module
"""
+import array
+import contextlib
import inspect
-import array
from mercurial import (
context,
@@ -454,3 +455,12 @@
if util.safehasattr(cl.index, 'get_rev'):
return cl.index.get_rev
return cl.nodemap.get
+
+@contextlib.contextmanager
+def parentchange(repo):
+ try:
+ yield
+ finally:
+ # hg <= 5.2 (85c4cd73996b)
+ if util.safehasattr(repo, '_quick_access_changeid_invalidate'):
+ repo._quick_access_changeid_invalidate()
--- a/hgext3rd/evolve/evolvecmd.py Mon Nov 04 00:18:55 2019 +0530
+++ b/hgext3rd/evolve/evolvecmd.py Sat Feb 01 12:50:10 2020 +0100
@@ -280,7 +280,7 @@
flag=obsolete.bumpedfix, operation=b'evolve')
bmupdate(newid)
# reroute the working copy parent to the new changeset
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(newid, nodemod.nullid)
return (True, replacementnode)
@@ -635,7 +635,7 @@
othernode = evolvestate[b'other-divergent']
otherdiv = repo[othernode]
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(publicnode, nodemod.nullid)
dirstatedance(repo, divergent, publicnode, None)
# check if node to be committed has changes same as public one
@@ -648,7 +648,7 @@
operation=b'evolve')
return (True, publicnode)
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(resparent, nodemod.nullid)
dirstatedance(repo, divergent, resparent, None)
@@ -999,7 +999,7 @@
if not ctx.obsolete():
continue
- successors = obsutil.successorssets(repo, ctx.node(), cache)
+ successors = obsutil.successorssets(repo, ctx.node(), cache=cache)
# We can't make any assumptions about how to update the hash if the
# cset in question was split or diverged.
@@ -1014,7 +1014,7 @@
assert tr is not None
r = _evolvemerge(repo, orig, dest, pctx, keepbranch)
if compat.hasconflict(r): # some conflict
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.setparents(dest.node(), orig.node())
repo.dirstate.write(tr)
hint = _(b"see 'hg help evolve.interrupted'")
@@ -1498,7 +1498,7 @@
if n == ctx.node():
# a node can't be a base for divergence with itself
continue
- nsuccsets = obsutil.successorssets(repo, n, cache)
+ nsuccsets = obsutil.successorssets(repo, n, cache=cache)
for nsuccset in nsuccsets:
if ctx.node() in nsuccset:
# we are only interested in *other* successor sets
@@ -2198,14 +2198,14 @@
# p1 is obsolete and p2 is not obsolete, current working
# directory parent should be successor of p1, so we should
# set dirstate parents to (succ of p1, p2)
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(currentp1,
ctxparents[1].node())
elif p2obs and not p1obs:
# p2 is obsolete and p1 is not obsolete, current working
# directory parent should be successor of p2, so we should
# set dirstate parents to (succ of p2, p1)
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(ctxparents[0].node(),
currentp1)
@@ -2213,12 +2213,12 @@
# both the parents were obsoleted, if orphanmerge is set, we
# are processing the second parent first (to keep parent order)
if evolvestate.get(b'orphanmerge'):
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(ctxparents[0].node(),
currentp1)
pass
else:
- with repo.dirstate.parentchange():
+ with repo.dirstate.parentchange(), compat.parentchange(repo):
repo.dirstate.setparents(repo.dirstate.p1(), nodemod.nullid)
with repo.ui.configoverride(overrides, b'evolve-continue'):
--- a/hgext3rd/evolve/metadata.py Mon Nov 04 00:18:55 2019 +0530
+++ b/hgext3rd/evolve/metadata.py Sat Feb 01 12:50:10 2020 +0100
@@ -6,6 +6,6 @@
# GNU General Public License version 2 or any later version.
__version__ = b'9.3.0.dev'
-testedwith = b'4.5.2 4.6.2 4.7 4.8 4.9 5.0 5.1'
+testedwith = b'4.5.2 4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3'
minimumhgversion = b'4.5'
buglink = b'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/obsdiscovery.py Mon Nov 04 00:18:55 2019 +0530
+++ b/hgext3rd/evolve/obsdiscovery.py Sat Feb 01 12:50:10 2020 +0100
@@ -33,7 +33,12 @@
util,
)
from mercurial.i18n import _
-from mercurial.utils import stringutil
+
+try:
+ from mercurial.utils.stringutil import forcebytestr
+except ImportError:
+ # hg <= 4.5 (f99d64e8a4e4)
+ from mercurial.util import forcebytestr
from . import (
compat,
@@ -450,7 +455,7 @@
except (sqlite3.DatabaseError, sqlite3.OperationalError) as exc:
repo.ui.log(b'evoext-cache',
b'error while updating obshashrange cache: %s'
- % stringutil.forcebytestr(exc))
+ % forcebytestr(exc))
del self._updating
return
@@ -556,9 +561,9 @@
self._new.clear()
repo.ui.log(b'evoext-cache',
b'error while saving new data: %s'
- % stringutil.forcebytestr(exc))
+ % forcebytestr(exc))
repo.ui.debug(b'evoext-cache: error while saving new data: %s'
- % stringutil.forcebytestr(exc))
+ % forcebytestr(exc))
def _trysave(self, repo):
if self._con is None:
--- a/hgext3rd/evolve/rewind.py Mon Nov 04 00:18:55 2019 +0530
+++ b/hgext3rd/evolve/rewind.py Sat Feb 01 12:50:10 2020 +0100
@@ -91,7 +91,7 @@
if not opts['as_divergence']:
for rev in rewinded:
ctx = unfi[rev]
- ssets = obsutil.successorssets(repo, ctx.node(), sscache)
+ ssets = obsutil.successorssets(repo, ctx.node(), cache=sscache)
if 1 < len(ssets):
msg = _(b'rewind confused by divergence on %s') % ctx
hint = _(b'solve divergence first or use "--as-divergence"')
--- a/hgext3rd/topic/__init__.py Mon Nov 04 00:18:55 2019 +0530
+++ b/hgext3rd/topic/__init__.py Sat Feb 01 12:50:10 2020 +0100
@@ -190,7 +190,7 @@
__version__ = b'0.18.0.dev'
-testedwith = b'4.5.2 4.6.2 4.7 4.8 4.9 5.0 5.1'
+testedwith = b'4.5.2 4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3'
minimumhgversion = b'4.5'
buglink = b'https://bz.mercurial-scm.org/'
--- a/tests/test-evolve-content-divergent-first-changeset.t Mon Nov 04 00:18:55 2019 +0530
+++ b/tests/test-evolve-content-divergent-first-changeset.t Sat Feb 01 12:50:10 2020 +0100
@@ -36,7 +36,7 @@
4b2524b7508e
79fa0eb22d65
- $ hg evolve --content-divergent --config ui.merge=internal:other
+ $ hg evolve --content-divergent --tool :other
merge:[1] div1
with: [2] div2
base: [0] test