annotate tests/test-topic-debugcb.t @ 2902:f6e297fda5c6

test: avoid using debugdrawdag in 'test-topic-debugcb.t' The 'debugdrawdag' utility adds local tags that prevent hidden changeset to get hidden. We will do without that extension for now.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Sep 2017 16:22:49 +0200
parents 52e6b28704a7
children d16781d7a061
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2899
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
1 Test for `hg debugconvertbookmark` added by topics
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
2 ==================================================
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
3
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
4 $ . "$TESTDIR/testlib/topic_setup.sh"
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
5
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
6 $ cat << EOF >> $HGRCPATH
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
7 > drawdag=$RUNTESTDIR/drawdag.py
2899
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
8 > [ui]
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
9 > logtemplate = [{rev}:{node|short}] {desc|firstline}\n\
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
10 > {if(bookmarks, " bookmark: {join(bookmarks,"\n bookmark:")}\n")}\
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
11 > {if(topics, " topic: {topics}\n")}
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
12 > EOF
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
13
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
14 Setting up the things
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
15 =====================
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
16
2899
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
17 $ hg init repo
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
18 $ cd repo
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
19 $ echo "Hello" > a
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
20 $ hg commit -Aqm "First commit"
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
21 $ echo "Hello" > b
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
22 $ hg commit -Aqm "Second commit"
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
23 $ hg bookmark "hellos"
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
24 $ hg up 0 -q
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
25 $ echo "Fix 1" > l
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
26 $ hg commit -Aqm "Fixing first"
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
27 $ echo "Fix 2" > m
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
28 $ hg commit -Aqm "Fixing second"
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
29 $ hg bookmark "secondfix"
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
30
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
31 $ hg log -G
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
32 @ [3:b985e4fea4a4] Fixing second
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
33 | bookmark: secondfix
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
34 o [2:8e79b09248c2] Fixing first
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
35 |
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
36 | o [1:50634233706a] Second commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
37 |/ bookmark: hellos
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
38 o [0:3caf92e45cfb] First commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
39
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
40 Help for the command
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
41 ====================
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
42
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
43 $ hg help debugconvertbookmark
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
44 hg debugcb [-b BOOKMARK] [--all]
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
45
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
46 aliases: debugconvertbookmark
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
47
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
48 Converts a bookmark to a topic with the same name.
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
49
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
50 options:
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
51
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
52 -b --bookmark VALUE bookmark to convert to topic
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
53 --all convert all bookmarks to topics
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
54
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
55 (some details hidden, use --verbose to show complete help)
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
56
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
57 Running without any argument
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
58 ============================
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
59
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
60 $ hg debugconvertbookmark
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
61 abort: you must specify either '--all' or '-b'
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
62 [255]
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
63
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
64 Changing a particular bookmark to topic
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
65 =======================================
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
66
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
67 $ hg debugconvertbookmark -b hellos
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
68 changed topic to "hellos" on 1 revisions
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
69 $ hg log -G
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
70 o [4:ca8825a7eb18] Second commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
71 | topic: hellos
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
72 | @ [3:b985e4fea4a4] Fixing second
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
73 | | bookmark: secondfix
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
74 | o [2:8e79b09248c2] Fixing first
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
75 |/
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
76 o [0:3caf92e45cfb] First commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
77
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
78 Changing all bookmarks to topic
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
79 ===============================
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
80
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
81 $ hg debugconvertbookmark --all
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
82 switching to topic secondfix
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
83 changed topic to "secondfix" on 2 revisions
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
84 $ hg log -G
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
85 @ [6:6efc0524f97a] Fixing second
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
86 | topic: secondfix
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
87 o [5:0a4244c62a16] Fixing first
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
88 | topic: secondfix
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
89 | o [4:ca8825a7eb18] Second commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
90 |/ topic: hellos
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
91 o [0:3caf92e45cfb] First commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
92
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
93 Trying with multiple bookmarks on a single changeset
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
94 ====================================================
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
95
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
96 $ echo "multiple bookmarks" >> m
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
97 $ hg commit -Aqm "Trying multiple bookmarks"
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
98 $ hg bookmark book1
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
99 $ hg bookmark book2
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
100 $ hg log -G
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
101 @ [7:7c46b4bbdda3] Trying multiple bookmarks
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
102 | bookmark: book1
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
103 | bookmark:book2
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
104 | topic: secondfix
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
105 o [6:6efc0524f97a] Fixing second
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
106 | topic: secondfix
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
107 o [5:0a4244c62a16] Fixing first
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
108 | topic: secondfix
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
109 | o [4:ca8825a7eb18] Second commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
110 |/ topic: hellos
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
111 o [0:3caf92e45cfb] First commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
112
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
113 $ hg debugconvertbookmark --all
2900
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
114 skipping '7' as it has multiple bookmarks on it
2899
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
115 $ hg log -G
2900
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
116 @ [7:7c46b4bbdda3] Trying multiple bookmarks
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
117 | bookmark: book1
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
118 | bookmark:book2
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
119 | topic: secondfix
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
120 o [6:6efc0524f97a] Fixing second
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
121 | topic: secondfix
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
122 o [5:0a4244c62a16] Fixing first
1928e9c802dd convertbookmark: add logic to skip revisions with multiple bookmarks
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2899
diff changeset
123 | topic: secondfix
2899
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
124 | o [4:ca8825a7eb18] Second commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
125 |/ topic: hellos
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
126 o [0:3caf92e45cfb] First commit
32306ee32806 topics: add a new debugconvertbookmark command to convert bookmarks to topics
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
127
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
128 Another setup
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
129 ==============
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
130
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
131 $ cd ..
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
132 $ rm -rf repo
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
133 $ hg init setup1
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
134 $ cd setup1
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
135 $ echo "Hello" > A
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
136 $ hg commit -Aqm "A"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
137 $ echo "Hello" > B
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
138 $ hg commit -Aqm "B"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
139 $ echo "Hello" > C
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
140 $ hg commit -Aqm "C"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
141 $ echo "Hello" > D
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
142 $ hg commit -Aqm "D"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
143 $ hg up 'desc(B)'
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
144 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
145 $ echo "Hello" > E
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
146 $ hg commit -Aqm "E"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
147 $ echo "Hello" > F
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
148 $ hg commit -Aqm "F"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
149 $ hg bookmark -r 'desc(D)' bar
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
150 $ hg bookmark -r 'desc(F)' foo
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
151
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
152 $ hg log -G
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
153 @ [5:5a63fc519ddc] F
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
154 | bookmark: foo
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
155 o [4:a9fc8fb0c70c] E
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
156 |
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
157 | o [3:e92ae92e366f] D
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
158 | | bookmark: bar
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
159 | o [2:9cc6a71c9557] C
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
160 |/
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
161 o [1:a7922543592c] B
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
162 |
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
163 o [0:fc58adec4bcd] A
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
164
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
165 $ hg debugconvertbookmark --all
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
166 changed topic to "bar" on 2 revisions
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
167 switching to topic foo
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
168 changed topic to "foo" on 2 revisions
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
169 $ hg log -G
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
170 @ [9:994cbef2c2d2] F
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
171 | topic: foo
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
172 o [8:b9d8ef5d5b8a] E
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
173 | topic: foo
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
174 | o [7:e8ba703ef9ab] D
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
175 | | topic: bar
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
176 | o [6:6307829aaf11] C
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
177 |/ topic: bar
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
178 o [1:a7922543592c] B
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
179 |
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
180 o [0:fc58adec4bcd] A
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
181
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
182 Another Setup
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
183 =============
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
184
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
185 $ cd ..
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
186 $ rm -rf setup1
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
187 $ hg init setup2
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
188 $ cd setup2
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
189 $ echo "Hello" > A
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
190 $ hg commit -Aqm "A"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
191 $ hg phase --public .
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
192 $ echo "Hello" > B
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
193 $ hg commit -Aqm "B"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
194 $ echo "Hello" > C
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
195 $ hg commit -Aqm "C"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
196 $ hg bookmark -r . bar
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
197 $ echo "Hello" > D
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
198 $ hg commit -Aqm "D"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
199 $ echo "Hello" > E
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
200 $ hg commit -Aqm "E"
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
201 $ hg bookmark -r . foo
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
202
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
203 $ hg log -G
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
204 @ [4:ef9d596cf6ea] E
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
205 | bookmark: foo
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
206 o [3:e92ae92e366f] D
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
207 |
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
208 o [2:9cc6a71c9557] C
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
209 | bookmark: bar
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
210 o [1:a7922543592c] B
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
211 |
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
212 o [0:fc58adec4bcd] A
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
213
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
214
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
215 XXX: this should bot only put topic 'foo' on 3,4 but also 'bar' on 0,1,2
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
216
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
217 $ hg debugconvertbookmark --all
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
218 switching to topic foo
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
219 changed topic to "foo" on 2 revisions
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
220
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
221 $ hg log -G
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
222 @ [6:e2bbb25b8882] E
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
223 | topic: foo
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
224 o [5:71bced29cbae] D
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
225 | topic: foo
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
226 o [2:9cc6a71c9557] C
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
227 | bookmark: bar
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
228 o [1:a7922543592c] B
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
229 |
2902
f6e297fda5c6 test: avoid using debugdrawdag in 'test-topic-debugcb.t'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2901
diff changeset
230 o [0:fc58adec4bcd] A
2901
52e6b28704a7 tests: add more tests for debugconvertbookmark
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2900
diff changeset
231