Mercurial > hg
annotate tests/test-bookmarks-merge.t @ 27568:34b01a51bd42
parents: correct help revset replacements
Implementing `hg parents -r REV FILE` correctly is hard.
The output can be 0, 1, or 2 revs.
First, you can't use parents(), because it sorts its output...
Consider:
echo $a
echo par@rev: `hg log -r "parents($a)" -q`
echo p12@rev: `hg log -r "p1($a)+p2($a)" -q`
echo parents: `hg parents -q -r $a`
(Merge 1 into 0)
3
par@rev: 0:d9612eafe8ec 1:070fe4290d06
p12@rev: 0:d9612eafe8ec 1:070fe4290d06
parents: 0:d9612eafe8ec 1:070fe4290d06
(Merge 4 into 5)
6
par@rev: 4:db73392995c3 5:c26e7dd67644
p12@rev: 5:c26e7dd67644 4:db73392995c3
parents: 5:c26e7dd67644 4:db73392995c3
(Merge 7 into 8)
9
par@rev: 7:d84f47462f70 8:9597bcab36e0
p12@rev: 8:9597bcab36e0 7:d84f47462f70
parents: 8:9597bcab36e0 7:d84f47462f70
You also can't use parents or/p1/p2 alone with a set, as in:
-r "parents(::REV and file(FILE))"
-r "parents(::REV - REV and file(FILE))"
... because each will return all parents for each candidate revision,
and the :: gives too many candidates.
Thus, we need a max and a p1/p2.
Also, anything of this form:
max(::REV - REV and file(FILE))
... is wrong, because max will return only one revision, and for
a proper parents, you need to return two occasionally.
Lastly, it doesn't help that `hg parents -r REV FILE` is buggy
due to a quirk in filelogs.
Here's a repository to consider when evaluating whether your
revset is correct:
$ hg log -G --template '{rev} {files}\n';
@ 10 a
|
o 9 a b
|\
| o 8 a
| |
o | 7 a
| |
+---o 6 b
| |/
| o 5 b
| |
o | 4 b
| |
+---o 3
| |/
+---o 2
| |/
| o 1 b
|
o 0 a
revs 4 and 5 create a conflict.
The conflict is resolved in the same way by both 6 and 9.
You would hope that parents around 9/10 would point to 9,
but `hg parents` will point to 6 due to the aforementioned bug.
Here's the winning solution test script and its output.
echo $a;
echo rp12-max: `hg log -r "max(::p1($a) and file(b)) + max(::p2($a) and file(b))" -q` 2> /dev/null;
echo expected: `hg parents -q -r $a b` 2> /dev/null;
Note that for 10, the output differs, but again, this is because
of the aforementioned bug. The rp12-max output is "correct",
whereas "expected" is just an unfortunate bug. The abort output
is due to something else. I'm not sure why someone thought it
was important to abort to stdio instead of stderr, but that's
really not my problem here.
10
rp12-max: 9:184ebefc2fce
expected: 6:dd558142b03f
9
rp12-max: 5:c26e7dd67644 4:db73392995c3
expected: 5:c26e7dd67644 4:db73392995c3
8
rp12-max: 5:c26e7dd67644
expected: 5:c26e7dd67644
7
rp12-max: 4:db73392995c3
expected: 4:db73392995c3
6
rp12-max: 5:c26e7dd67644 4:db73392995c3
expected: 5:c26e7dd67644 4:db73392995c3
5
rp12-max: 1:070fe4290d06
expected: 1:070fe4290d06
4
rp12-max:
abort: 'b' not found in manifest!
expected:
3
rp12-max: 1:070fe4290d06
expected: 1:070fe4290d06
2
rp12-max: 1:070fe4290d06
expected: 1:070fe4290d06
1
rp12-max:
abort: 'b' not found in manifest!
expected:
0
rp12-max:
abort: 'b' not found in manifest!
expected:
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 23 Dec 2015 19:07:34 +0000 |
parents | 10f15e34d86c |
children | 8197b395710e |
rev | line source |
---|---|
16706
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
1 # init |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
2 |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
3 $ hg init |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
4 $ echo a > a |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
5 $ hg add a |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
6 $ hg commit -m'a' |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
7 $ echo b > b |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
8 $ hg add b |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
9 $ hg commit -m'b' |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
10 $ hg up -C 0 |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
12 $ echo c > c |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
13 $ hg add c |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
14 $ hg commit -m'c' |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
15 created new head |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
16 |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
17 # test merging of diverged bookmarks |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
18 $ hg bookmark -r 1 "c@diverge" |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
19 $ hg bookmark -r 1 b |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
20 $ hg bookmark c |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
21 $ hg bookmarks |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
22 b 1:d2ae7f538514 |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
23 * c 2:d36c0562f908 |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
24 c@diverge 1:d2ae7f538514 |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
25 $ hg merge "c@diverge" |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
27 (branch merge, don't forget to commit) |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
28 $ hg commit -m'merge' |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
29 $ hg bookmarks |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
30 b 1:d2ae7f538514 |
a270ec977ba6
bookmarks: delete divergent bookmarks on merge
David Soria Parra <dsp@php.net>
parents:
diff
changeset
|
31 * c 3:b8f96cf4688b |
16708
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
32 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
33 $ hg up -C 3 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
34 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:
18122
diff
changeset
|
35 (leaving bookmark c) |
16708
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
36 $ echo d > d |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
37 $ hg add d |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
38 $ hg commit -m'd' |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
39 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
40 $ hg up -C 3 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
41 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
42 $ echo e > e |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
43 $ hg add e |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
44 $ hg commit -m'e' |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
45 created new head |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
46 $ hg up -C 5 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
47 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
48 $ hg bookmark e |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
49 $ hg bookmarks |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
50 b 1:d2ae7f538514 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
51 c 3:b8f96cf4688b |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
52 * e 5:26bee9c5bcf3 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
53 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
54 # the picked side is bookmarked |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
55 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
56 $ hg up -C 4 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
57 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21404
ca275f7ec576
update: when deactivating a bookmark, print a message
Siddharth Agarwal <sid0@fb.com>
parents:
18122
diff
changeset
|
58 (leaving bookmark e) |
16708
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
59 $ hg merge |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
60 abort: heads are bookmarked - please merge with an explicit rev |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
61 (run 'hg heads' to see all heads) |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
62 [255] |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
63 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
64 # our revision is bookmarked |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
65 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
66 $ hg up -C e |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
67 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21503
10f15e34d86c
update: show message when a bookmark is activated by update
Stephen Lee <sphen.lee@gmail.com>
parents:
21404
diff
changeset
|
68 (activating bookmark e) |
16708
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
69 $ hg merge |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
70 abort: no matching bookmark to merge - please merge with an explicit rev or bookmark |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
71 (run 'hg heads' to see all heads) |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
72 [255] |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
73 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
74 # merge bookmark heads |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
75 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
76 $ hg up -C 4 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
77 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21404
ca275f7ec576
update: when deactivating a bookmark, print a message
Siddharth Agarwal <sid0@fb.com>
parents:
18122
diff
changeset
|
78 (leaving bookmark e) |
16708
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
79 $ echo f > f |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
80 $ hg commit -Am "f" |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
81 adding f |
18122
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
82 $ hg bookmarks -r 4 "e@diverged" |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
83 $ hg up -q -C "e@diverged" |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
84 $ hg merge |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
86 (branch merge, don't forget to commit) |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
87 $ hg parents |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
88 changeset: 4:a0546fcfe0fb |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
89 bookmark: e@diverged |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
90 user: test |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
91 date: Thu Jan 01 00:00:00 1970 +0000 |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
92 summary: d |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
93 |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
94 changeset: 5:26bee9c5bcf3 |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
95 bookmark: e |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
96 parent: 3:b8f96cf4688b |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
97 user: test |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
98 date: Thu Jan 01 00:00:00 1970 +0000 |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
99 summary: e |
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
100 |
16708
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
101 $ hg up -C e |
18122
730b769fb634
bookmarks: fix head selection for merge with two bookmarked heads
Mads Kiilerich <mads@kiilerich.com>
parents:
17394
diff
changeset
|
102 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21503
10f15e34d86c
update: show message when a bookmark is activated by update
Stephen Lee <sphen.lee@gmail.com>
parents:
21404
diff
changeset
|
103 (activating bookmark e) |
16708
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
104 $ hg bookmarks |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
105 b 1:d2ae7f538514 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
106 c 3:b8f96cf4688b |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
107 * e 5:26bee9c5bcf3 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
108 e@diverged 4:a0546fcfe0fb |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
109 $ hg merge |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
110 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
111 (branch merge, don't forget to commit) |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
112 $ hg commit -m'merge' |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
113 $ hg bookmarks |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
114 b 1:d2ae7f538514 |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
115 c 3:b8f96cf4688b |
4a02cf4fbb2e
merge: respect bookmarks during merge
David Soria Parra <dsp@php.net>
parents:
16706
diff
changeset
|
116 * e 7:ca784329f0ba |
17394
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
117 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
118 # test warning when all heads are inactive bookmarks |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
119 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
120 $ hg up -C 6 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
121 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21404
ca275f7ec576
update: when deactivating a bookmark, print a message
Siddharth Agarwal <sid0@fb.com>
parents:
18122
diff
changeset
|
122 (leaving bookmark e) |
17394
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
123 $ echo g > g |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
124 $ hg commit -Am 'g' |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
125 adding g |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
126 $ hg bookmark -i g |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
127 $ hg bookmarks |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
128 b 1:d2ae7f538514 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
129 c 3:b8f96cf4688b |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
130 e 7:ca784329f0ba |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
131 g 8:04dd21731d95 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
132 $ hg heads |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
133 changeset: 8:04dd21731d95 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
134 bookmark: g |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
135 tag: tip |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
136 parent: 6:be381d1126a0 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
137 user: test |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
138 date: Thu Jan 01 00:00:00 1970 +0000 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
139 summary: g |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
140 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
141 changeset: 7:ca784329f0ba |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
142 bookmark: e |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
143 parent: 5:26bee9c5bcf3 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
144 parent: 4:a0546fcfe0fb |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
145 user: test |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
146 date: Thu Jan 01 00:00:00 1970 +0000 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
147 summary: merge |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
148 |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
149 $ hg merge |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
150 abort: heads are bookmarked - please merge with an explicit rev |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
151 (run 'hg heads' to see all heads) |
19e4861f9730
tests: merging bookmarked heads
John Li <jli@circularly.org>
parents:
16708
diff
changeset
|
152 [255] |