Mercurial > evolve
changeset 6566:cb009f13126a
branching: merge with stable
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 11 Oct 2023 13:45:08 -0300 |
parents | 835f0adf8e39 (current diff) a567e5e90b4f (diff) |
children | 851f1af306a5 |
files | CHANGELOG hgext3rd/topic/__init__.py hgext3rd/topic/discovery.py |
diffstat | 5 files changed, 77 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG Sat Sep 30 15:41:05 2023 -0300 +++ b/CHANGELOG Wed Oct 11 13:45:08 2023 -0300 @@ -7,6 +7,8 @@ * remove deprecated evolve.serveronly extension, evolve extension is recommended for all users, clients and servers + * evolve: don't warn about topics while resolving public content-divergence + * evolve, pullbundle: drop compatibility with Mercurial 4.8 topic (1.1.0) @@ -14,6 +16,11 @@ * remove deprecated serverminitopic extension, topic extension is recommended for all users, clients and servers + * topic: only set topic on workingcommitctx if it doesn't already have one + * topic: properly process revbranchcache before sending it to peers + (issue6841) + * topic: invalidate topic namespace cache in repo.invalidatecaches() + * drop compatibility with Mercurial 4.8 11.0.2 -- 2023-07-05
--- a/hgext3rd/evolve/obshistory.py Sat Sep 30 15:41:05 2023 -0300 +++ b/hgext3rd/evolve/obshistory.py Wed Oct 11 13:45:08 2023 -0300 @@ -785,9 +785,6 @@ def _markerseffects(markers): """ Return a list of effects as strings based on effect flags in markers - - Return None if verb cannot be more precise than just "rewritten", i.e. when - markers collectively have more than one effect in the flags. """ metadata = [dict(marker[3]) for marker in markers] ef1 = [data.get(b'ef1') for data in metadata]
--- a/hgext3rd/topic/__init__.py Sat Sep 30 15:41:05 2023 -0300 +++ b/hgext3rd/topic/__init__.py Wed Oct 11 13:45:08 2023 -0300 @@ -753,6 +753,7 @@ closed=closed) def invalidatecaches(self): + self._tnscache.clear() self._topiccache.clear() super(topicrepo, self).invalidatecaches()
--- a/hgext3rd/topic/discovery.py Sat Sep 30 15:41:05 2023 -0300 +++ b/hgext3rd/topic/discovery.py Wed Oct 11 13:45:08 2023 -0300 @@ -355,6 +355,12 @@ # to do the conversion return orig(self, rev, **kwargs) +def wrapaddpartrevbranchcache(orig, repo, bundler, outgoing): + """making sure we send rev-branch-cache that only has bare branches""" + overrides = {(b'_internal', b'tns-disable-fqbn'): True} + with repo.ui.configoverride(overrides, b'topic-namespaces'): + orig(repo, bundler, outgoing) + def wraphgpeer(orig, uiorrepo, opts, *args, **kwargs): """hg.peer() that checks if there are explicit arguments for e.g. pull""" peer = orig(uiorrepo, opts, *args, **kwargs) @@ -395,6 +401,7 @@ extensions.wrapfunction(bundle2, 'handlecheckupdatedheads', handlecheckheads) bundle2.handlecheckupdatedheads.params = frozenset() bundle2.parthandlermapping[b'check:updated-heads'] = bundle2.handlecheckupdatedheads + extensions.wrapfunction(bundle2, 'addpartrevbranchcache', wrapaddpartrevbranchcache) extensions.wrapfunction(exchange, '_pushb2phases', _pushb2phases) exchange.b2partsgenmapping[b'phase'] = exchange._pushb2phases extensions.wrapfunction(hg, 'peer', wraphgpeer)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-topic-issue6841.t Wed Oct 11 13:45:08 2023 -0300 @@ -0,0 +1,62 @@ +New clones shouldn't have topics in any on-disk caches (issue6841) +https://bz.mercurial-scm.org/show_bug.cgi?id=6841 + + $ . "$TESTDIR/testlib/common.sh" + + $ cat >> $HGRCPATH << EOF + > [extensions] + > topic = + > [phases] + > publish = no + > [ui] + > ssh = "$PYTHON" "$RUNTESTDIR/dummyssh" + > EOF + + $ hg init orig + $ hg clone orig publishing -q + $ cat >> publishing/.hg/hgrc << EOF + > [phases] + > publish = yes + > EOF + + $ cd orig + $ mkcommit ROOT + $ hg push ../publishing + pushing to ../publishing + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + + $ echo foo > foo + $ hg topic topic-foo + marked working directory as topic: topic-foo + $ hg ci -qAm foo + + $ cd .. + +cloning via ssh to use wire protocol + + $ hg clone ssh://user@dummy/orig new-clone -q + $ cd new-clone + +on-disk caches are using bare branch names only + + $ f -H .hg/cache/rbc-names-v1 + .hg/cache/rbc-names-v1: + 0000: 64 65 66 61 75 6c 74 |default| + $ grep topic-foo .hg/cache/* + [1] + +and pushing works fine + + $ hg push ssh://user@dummy/publishing + pushing to ssh://user@dummy/publishing + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + + $ cd ..