Mercurial > hg
annotate tests/test-rebase-bookmarks.t @ 31975:76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Mercurial checks for the introduction of new heads on push. Evolution comes
into play to detect if existing branches on the server are being replaced by
some of the new one we push.
The current code for this logic is very basic (eg: issue4354) and was poorly
tested. We have a better implementation coming in the evolve extension fixing
these issues and with more serious tests coverage. In the process of upstreaming
this improved logic, we start with adding the test case that are already passing
with the current implementation. Once they are all in, we'll upstream the better
implementation and the extra test case.
See inline documentation for details about the test case added in this
changeset.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 13 Apr 2017 16:23:01 +0200 |
parents | 79437fb352ce |
children | 3b7cb3d17137 |
rev | line source |
---|---|
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
1 $ cat >> $HGRCPATH <<EOF |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
2 > [extensions] |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
3 > rebase= |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
4 > |
15742
65df60a3f96b
phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
14884
diff
changeset
|
5 > [phases] |
65df60a3f96b
phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
14884
diff
changeset
|
6 > publish=False |
65df60a3f96b
phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
14884
diff
changeset
|
7 > |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
8 > [alias] |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
9 > tglog = log -G --template "{rev}: '{desc}' bookmarks: {bookmarks}\n" |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
10 > EOF |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
11 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
12 Create a repo with several bookmarks |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
13 $ hg init a |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
14 $ cd a |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
15 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
16 $ echo a > a |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
17 $ hg ci -Am A |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
18 adding a |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
19 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
20 $ echo b > b |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
21 $ hg ci -Am B |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
22 adding b |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
23 $ hg book 'X' |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
24 $ hg book 'Y' |
17346
2944a6d35158
check-code: fix check for trailing whitespace on empty lines
Mads Kiilerich <mads@kiilerich.com>
parents:
17345
diff
changeset
|
25 |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
26 $ echo c > c |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
27 $ hg ci -Am C |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
28 adding c |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
29 $ hg book 'Z' |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
30 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
31 $ hg up -q 0 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
32 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
33 $ echo d > d |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
34 $ hg ci -Am D |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
35 adding d |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
36 created new head |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
37 |
17046
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
38 $ hg book W |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
39 |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
17059
diff
changeset
|
40 $ hg tglog |
17046
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
41 @ 3: 'D' bookmarks: W |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
42 | |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
43 | o 2: 'C' bookmarks: Y Z |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
44 | | |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
45 | o 1: 'B' bookmarks: X |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
46 |/ |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
47 o 0: 'A' bookmarks: |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
48 |
17346
2944a6d35158
check-code: fix check for trailing whitespace on empty lines
Mads Kiilerich <mads@kiilerich.com>
parents:
17345
diff
changeset
|
49 |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
50 Move only rebased bookmarks |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
51 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
52 $ cd .. |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
53 $ hg clone -q a a1 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
54 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
55 $ cd a1 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
56 $ hg up -q Z |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
57 |
18514
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
58 Test deleting divergent bookmarks from dest (issue3685) |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
59 |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
60 $ hg book -r 3 Z@diverge |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
61 |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
62 ... and also test that bookmarks not on dest or not being moved aren't deleted |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
63 |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
64 $ hg book -r 3 X@diverge |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
65 $ hg book -r 0 Y@diverge |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
66 |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
67 $ hg tglog |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
68 o 3: 'D' bookmarks: W X@diverge Z@diverge |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
69 | |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
70 | @ 2: 'C' bookmarks: Y Z |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
71 | | |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
72 | o 1: 'B' bookmarks: X |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
73 |/ |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
74 o 0: 'A' bookmarks: Y@diverge |
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
75 |
17005
50f434510da6
rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
16913
diff
changeset
|
76 $ hg rebase -s Y -d 3 |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
77 rebasing 2:49cb3485fa0c "C" (Y Z) |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
23517
diff
changeset
|
78 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-backup.hg (glob) |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
79 |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
17059
diff
changeset
|
80 $ hg tglog |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
81 @ 3: 'C' bookmarks: Y Z |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
82 | |
18514
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
83 o 2: 'D' bookmarks: W X@diverge |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
84 | |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
85 | o 1: 'B' bookmarks: X |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
86 |/ |
18514
2a1fac3650a5
rebase: delete divergent bookmarks on destination (issue3685)
Siddharth Agarwal <sid0@fb.com>
parents:
17346
diff
changeset
|
87 o 0: 'A' bookmarks: Y@diverge |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
88 |
20523
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
89 Do not try to keep active but deleted divergent bookmark |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
90 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
91 $ cd .. |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
92 $ hg clone -q a a4 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
93 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
94 $ cd a4 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
95 $ hg up -q 2 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
96 $ hg book W@diverge |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
97 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
98 $ hg rebase -s W -d . |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
99 rebasing 3:41acb9dca9eb "D" (tip W) |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
23517
diff
changeset
|
100 saved backup bundle to $TESTTMP/a4/.hg/strip-backup/41acb9dca9eb-b35a6a63-backup.hg (glob) |
20523
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
101 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
102 $ hg bookmarks |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
103 W 3:0d3554f74897 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
104 X 1:6c81ed0049f8 |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
105 Y 2:49cb3485fa0c |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
106 Z 2:49cb3485fa0c |
f2a0a0e76b4c
rebase: do not try to reactivate deleted divergent bookmark
Yuya Nishihara <yuya@tcha.org>
parents:
20117
diff
changeset
|
107 |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
108 Keep bookmarks to the correct rebased changeset |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
109 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
110 $ cd .. |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
111 $ hg clone -q a a2 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
112 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
113 $ cd a2 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
114 $ hg up -q Z |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
115 |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
116 $ hg rebase -s 1 -d 3 |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
117 rebasing 1:6c81ed0049f8 "B" (X) |
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
118 rebasing 2:49cb3485fa0c "C" (Y Z) |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
23517
diff
changeset
|
119 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-a687065f-backup.hg (glob) |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
120 |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
17059
diff
changeset
|
121 $ hg tglog |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
122 @ 3: 'C' bookmarks: Y Z |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
123 | |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
124 o 2: 'B' bookmarks: X |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
125 | |
17046
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
126 o 1: 'D' bookmarks: W |
14884
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
127 | |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
128 o 0: 'A' bookmarks: |
c0ccd70df52c
rebase: reset bookmarks (issue2265 and issue2873)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
129 |
17046
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
130 |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
131 Keep active bookmark on the correct changeset |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
132 |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
133 $ cd .. |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
134 $ hg clone -q a a3 |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
135 |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
136 $ cd a3 |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
137 $ hg up -q X |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
138 |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
139 $ hg rebase -d W |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
140 rebasing 1:6c81ed0049f8 "B" (X) |
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
141 rebasing 2:49cb3485fa0c "C" (Y Z) |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
23517
diff
changeset
|
142 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-a687065f-backup.hg (glob) |
17046
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
143 |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
144 $ hg tglog |
19925
9c78ed396075
rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19641
diff
changeset
|
145 o 3: 'C' bookmarks: Y Z |
17046
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
146 | |
19925
9c78ed396075
rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19641
diff
changeset
|
147 @ 2: 'B' bookmarks: X |
17046
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
148 | |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
149 o 1: 'D' bookmarks: W |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
150 | |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
151 o 0: 'A' bookmarks: |
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
152 |
19926
0f99747202f9
rebase: preserve active bookmark when not at head (issue3813)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19925
diff
changeset
|
153 $ hg bookmarks |
0f99747202f9
rebase: preserve active bookmark when not at head (issue3813)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19925
diff
changeset
|
154 W 1:41acb9dca9eb |
0f99747202f9
rebase: preserve active bookmark when not at head (issue3813)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19925
diff
changeset
|
155 * X 2:e926fccfa8ec |
0f99747202f9
rebase: preserve active bookmark when not at head (issue3813)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19925
diff
changeset
|
156 Y 3:3d5fa227f4b5 |
0f99747202f9
rebase: preserve active bookmark when not at head (issue3813)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19925
diff
changeset
|
157 Z 3:3d5fa227f4b5 |
0f99747202f9
rebase: preserve active bookmark when not at head (issue3813)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19925
diff
changeset
|
158 |
18549
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
159 rebase --continue with bookmarks present (issue3802) |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
160 |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
161 $ hg up 2 |
19925
9c78ed396075
rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19641
diff
changeset
|
162 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21404
ca275f7ec576
update: when deactivating a bookmark, print a message
Siddharth Agarwal <sid0@fb.com>
parents:
21267
diff
changeset
|
163 (leaving bookmark X) |
18549
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
164 $ echo 'C' > c |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
165 $ hg add c |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
166 $ hg ci -m 'other C' |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
167 created new head |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
168 $ hg up 3 |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
28101
79437fb352ce
tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
27626
diff
changeset
|
170 $ hg rebase --dest 4 |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
171 rebasing 3:3d5fa227f4b5 "C" (Y Z) |
18549
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
172 merging c |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
23835
diff
changeset
|
173 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
18933
42b620fc89e2
rebase: switch from util.Abort to util.InterventionRequired where appropriate (bc)
Augie Fackler <raf@durin42.com>
parents:
18549
diff
changeset
|
174 unresolved conflicts (see hg resolve, then hg rebase --continue) |
18935
e5d9441ec281
dispatch: exit with status 1 for an InterventionRequired exception (bc)
Augie Fackler <raf@durin42.com>
parents:
18933
diff
changeset
|
175 [1] |
18549
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
176 $ echo 'c' > c |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
177 $ hg resolve --mark c |
21947
b081decd9062
resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21404
diff
changeset
|
178 (no more unresolved files) |
27626
157675d0f600
rebase: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents:
26614
diff
changeset
|
179 continue: hg rebase --continue |
18549
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
180 $ hg rebase --continue |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
181 rebasing 3:3d5fa227f4b5 "C" (Y Z) |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
23517
diff
changeset
|
182 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-backup.hg (glob) |
18549
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
183 $ hg tglog |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
184 @ 4: 'C' bookmarks: Y Z |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
185 | |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
186 o 3: 'other C' bookmarks: |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
187 | |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
188 o 2: 'B' bookmarks: X |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
189 | |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
190 o 1: 'D' bookmarks: W |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
191 | |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
192 o 0: 'A' bookmarks: |
12de53323e59
rebase: derive node from target rev (issue3802)
Siddharth Agarwal <sid0@fb.com>
parents:
18514
diff
changeset
|
193 |
17046
4116504d1ec4
bookmarks: correctly update current bookmarks on rebase (issue2277)
David Schleimer <dschleimer@fb.com>
parents:
15742
diff
changeset
|
194 |
19641
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
195 ensure that bookmarks given the names of revset functions can be used |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
196 as --rev arguments (issue3950) |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
197 |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
198 $ hg update -q 3 |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
199 $ echo bimble > bimble |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
200 $ hg add bimble |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
201 $ hg commit -q -m 'bisect' |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
202 $ echo e >> bimble |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
203 $ hg ci -m bisect2 |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
204 $ echo e >> bimble |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
205 $ hg ci -m bisect3 |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
206 $ hg book bisect |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
207 $ hg update -q Y |
5528c31c629c
rebase: handle bookmarks matching revset function names (issue3950)
Bryan O'Sullivan <bryano@fb.com>
parents:
18935
diff
changeset
|
208 $ hg rebase -r '"bisect"^^::"bisect"^' -r bisect -d Z |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
209 rebasing 5:345c90f326a4 "bisect" |
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
210 rebasing 6:f677a2907404 "bisect2" |
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
211 rebasing 7:325c16001345 "bisect3" (tip bisect) |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
23517
diff
changeset
|
212 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-b4840586-backup.hg (glob) |