# HG changeset patch # User Anton Shestakov # Date 1690831432 10800 # Node ID ca1c219bd59fade315612a3a39304efc9f77a8ad # Parent 09fb1cfb5adc0b1a1774b8600233840e952f1843# Parent 9148051f3712d3636e41df95fd9006407cd6600e branching: merge with stable diff -r 09fb1cfb5adc -r ca1c219bd59f hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Thu Jul 27 16:37:09 2023 -0300 +++ b/hgext3rd/evolve/evolvecmd.py Mon Jul 31 16:23:52 2023 -0300 @@ -692,7 +692,7 @@ public content-divergence""" # needtowarn: aspects where we need to warn user - needtowarn = [b'branch', b'topic', b'close'] + needtowarn = [b'branch', b'close'] aspects = set() localextra = local.extra() otherextra = other.extra() diff -r 09fb1cfb5adc -r ca1c219bd59f hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Thu Jul 27 16:37:09 2023 -0300 +++ b/hgext3rd/topic/__init__.py Mon Jul 31 16:23:52 2023 -0300 @@ -633,7 +633,7 @@ def commitctx(self, ctx, *args, **kwargs): if isinstance(ctx, context.workingcommitctx): current = self.currenttopic - if current: + if current and constants.extrakey not in ctx.extra(): ctx.extra()[constants.extrakey] = current return super(topicrepo, self).commitctx(ctx, *args, **kwargs) diff -r 09fb1cfb5adc -r ca1c219bd59f tests/test-evolve-public-content-divergent-discard.t --- a/tests/test-evolve-public-content-divergent-discard.t Thu Jul 27 16:37:09 2023 -0300 +++ b/tests/test-evolve-public-content-divergent-discard.t Mon Jul 31 16:23:52 2023 -0300 @@ -636,6 +636,8 @@ $ hg init pubdiv7 $ cd pubdiv7 + $ echo '[extensions]' > .hg/hgrc + $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> .hg/hgrc $ for ch in a b c d; do > echo $ch > $ch; > hg ci -Am "added "$ch; @@ -652,26 +654,42 @@ $ hg branch double//slash marked working directory as branch double//slash (branches are permanent and global, did you want a bookmark?) + $ hg debug-topic-namespace tns-1 + marked working directory as topic namespace: tns-1 + $ hg topics topic-1 + marked working directory as topic: topic-1 $ echo dada > d $ hg ci -Am "added d" adding d + active topic 'topic-1' grew its first changeset + (see 'hg help topics' for more information) $ hg prune -r "min(desc('added d'))" -s . --hidden 1 changesets pruned 2 new content-divergent changesets (publish one side) $ hg phase --public + active topic 'topic-1' is now empty + (use 'hg topic --clear' to clear it if needed) $ hg up -r "draft()" + clearing empty topic "topic-1" 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg debug-topic-namespace tns-2 + marked working directory as topic namespace: tns-2 + $ hg topics topic-2 + marked working directory as topic: topic-2 + (make other divergent a closed branch head) $ hg ci --amend -m "closing branch double//slash" --close-branch + active topic 'topic-2' grew its first changeset + (see 'hg help topics' for more information) $ hg glog - @ 6:83825baa0dc2 closing branch double//slash + @ 6:fe5d55b4e488 closing branch double//slash | draft content-divergent | - | o 5:8b3ac33245dd added d + | o 5:bde8ac1c636a added d |/ public | o 2:155349b645be added c @@ -691,7 +709,8 @@ with: [6] closing branch double//slash base: [3] added d 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - other divergent changeset 83825baa0dc2 is a closed branch head and differs from local 8b3ac33245dd by "branch, description" only, discarding 83825baa0dc2 - content divergence resolution between 8b3ac33245dd (public) and 83825baa0dc2 has same content as 8b3ac33245dd, discarding 83825baa0dc2 - working directory is now at 8b3ac33245dd + other divergent changeset fe5d55b4e488 is a closed branch head and differs from local bde8ac1c636a by "branch, description" only, discarding fe5d55b4e488 + content divergence resolution between bde8ac1c636a (public) and fe5d55b4e488 has same content as bde8ac1c636a, discarding fe5d55b4e488 + active topic 'topic-2' is now empty + working directory is now at bde8ac1c636a diff -r 09fb1cfb5adc -r ca1c219bd59f tests/test-namespaces.t --- a/tests/test-namespaces.t Thu Jul 27 16:37:09 2023 -0300 +++ b/tests/test-namespaces.t Mon Jul 31 16:23:52 2023 -0300 @@ -113,13 +113,11 @@ > EOF applying patch from stdin -TODO: topic should also be imported from the patch - $ hg log -r tip -T '{rev}: {branch} {topic_namespace} {topic}\n' - 1: stable mynamespace feature + 1: stable mynamespace mytopic $ hg log -r tip -T '{rev}: {fqbn}\n' - 1: stable//mynamespace/feature + 1: stable//mynamespace/mytopic Revsets