annotate tests/test-rebase-named-branches.t @ 15615:41885892796e stable

branch: warn on branching
author Matt Mackall <mpm@selenic.com>
date Thu, 08 Dec 2011 14:32:44 -0600
parents 81ecc951f57b
children 65df60a3f96b e4fc0f0b4f7e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
2 > [extensions]
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
3 > graphlog=
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
4 > rebase=
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
5 >
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
6 > [alias]
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
7 > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
8 > EOF
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
9
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
10 $ hg init a
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
11 $ cd a
14118
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
12 $ hg unbundle $TESTDIR/bundles/rebase.hg
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
13 adding changesets
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
14 adding manifests
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
15 adding file changes
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
16 added 8 changesets with 7 changes to 7 files (+2 heads)
14118
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
17 (run 'hg heads' to see heads, 'hg merge' to merge)
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
18 $ hg up tip
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
19 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
20 $ cd ..
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
21
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
22
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
23 Rebasing descendant onto ancestor across different named branches
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
24
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
25 $ hg clone -q -u . a a1
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
26
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
27 $ cd a1
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
28
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
29 $ hg branch dev
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
30 marked working directory as branch dev
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14124
diff changeset
31 (branches are permanent and global, did you want a bookmark?)
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
32
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
33 $ echo x > x
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
34
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
35 $ hg add x
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
36
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
37 $ hg ci -m 'extra named branch'
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
38
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
39 $ hg tglog
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
40 @ 8: 'extra named branch' dev
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
41 |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
42 o 7: 'H'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
43 |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
44 | o 6: 'G'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
45 |/|
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
46 o | 5: 'F'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
47 | |
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
48 | o 4: 'E'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
49 |/
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
50 | o 3: 'D'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
51 | |
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
52 | o 2: 'C'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
53 | |
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
54 | o 1: 'B'
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
55 |/
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
56 o 0: 'A'
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
57
14120
d7f80dbbaf49 tests: simplify test-rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14119
diff changeset
58
d7f80dbbaf49 tests: simplify test-rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14119
diff changeset
59
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
60 $ hg rebase -s 1 -d 8 --keepbranches
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
61 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
62
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
63 $ hg tglog
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
64 @ 8: 'D'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
65 |
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
66 o 7: 'C'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
67 |
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
68 o 6: 'B'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
69 |
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
70 o 5: 'extra named branch' dev
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
71 |
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
72 o 4: 'H'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
73 |
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
74 | o 3: 'G'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
75 |/|
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
76 o | 2: 'F'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
77 | |
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
78 | o 1: 'E'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
79 |/
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
80 o 0: 'A'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
81
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
82 $ hg rebase -s 4 -d 5
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
83 abort: source is ancestor of destination
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
84 [255]
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
85
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
86 $ hg rebase -s 5 -d 4
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
87 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
88
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
89 $ hg tglog
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
90 @ 8: 'D'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
91 |
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
92 o 7: 'C'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
93 |
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
94 o 6: 'B'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
95 |
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
96 o 5: 'extra named branch'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
97 |
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
98 o 4: 'H'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
99 |
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
100 | o 3: 'G'
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
101 |/|
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
102 o | 2: 'F'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
103 | |
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
104 | o 1: 'E'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
105 |/
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
106 o 0: 'A'
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
107
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
108 $ cd ..