view tests/test-topic-issue6841.t @ 6783:ccc8352c7133

topic: add more branchcache entries to test-topic-flow-publish-flag.t It seems these new entries started appearing after the recent-ish refactoring of branchcache in core. Now the server and the client have the same branch cache data on disk, which is probably for the best. The actual output with changeset hashes is: branch2-base:c0155e8ec55a9b46d415d5b13a319d0c80e26e9d o double//slash branch2-immutable:c0155e8ec55a9b46d415d5b13a319d0c80e26e9d o double//slash branch2-served:256a2cb64fd8ada4ff18d57606d212f094cb50fb o double//slash c0155e8ec55a is public, so it's correct to be in "base" and "immutable" repo views. 256a2cb64fd8 is draft (without topic), so it's expected to be in the "served" view.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 13 Jun 2024 15:45:02 +0400
parents 30d0d3d92c8d
children 6d22e9a596c4
line wrap: on
line source

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 ..