Debian Codegraph @

tests/test-branches-topo-mode.t

raw
1 ==================================
2 Testing branchmap topological mode
3 ==================================
4
5 $ cat <<EOF >> $HGRCPATH
6 > [experimental]
7 > branch-cache-v3=yes
8 > EOF
9 $ CACHE_PREFIX=branch3
10
11
12
13 Catch a case were the topo-mode=pure select the wrong branch
14 ------------------------------------------------------------
15
16 A non-topological head on lexicographical higher branch should not confuse the
17 topological detection.
18
19 $ hg init branchmap-testing1
20 $ cd branchmap-testing1
21 $ hg debugbuild '@C . $ @D .'
22 $ hg update D
23 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
24 $ hg commit --close-branch -m _
25 $ hg update C
26 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 $ hg merge D
28 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 (branch merge, don't forget to commit)
30 $ hg commit -m ab
31
32 $ touch x
33 $ hg commit -A x -m_
34 $ hg log -G -T '{branch} {if(closesbranch, "X", " ")} {node|short}\n'
35 @ C 64bc6c1bbbcf
36 |
37 o C 922c771bcc9c
38 |\
39 | _ D X b6d05de170f1
40 | |
41 | o D 9fb9610dce33
42 |
43 o C 266067de9702
44
45
46 $ cat .hg/cache/branch3*
47 tip-node=64bc6c1bbbcf5d74d77ed6549e50580838293bee tip-rev=4 topo-mode=pure
48 C
49 b6d05de170f1652bb1cd95314cda67f7febeacc7 c D
50 $ rm .hg/cache/branch3*
51 $ hg debugupdatecache
52 $ cat .hg/cache/branch3*
53 tip-node=64bc6c1bbbcf5d74d77ed6549e50580838293bee tip-rev=4 topo-mode=pure
54 C
55 b6d05de170f1652bb1cd95314cda67f7febeacc7 c D
56 $ hg branches
57 C 4:64bc6c1bbbcf