Mercurial > hg
annotate tests/test-merge1.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 | 56b2bcea2529 |
children | 6a6e78f84cc6 |
rev | line source |
---|---|
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
1 $ cat <<EOF > merge |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
2 > import sys, os |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
3 > |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
4 > try: |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
5 > import msvcrt |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
6 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
7 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
8 > except ImportError: |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
9 > pass |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
10 > |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
11 > print "merging for", os.path.basename(sys.argv[1]) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
12 > EOF |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
13 $ HGMERGE="python ../merge"; export HGMERGE |
7080
a6477aa893b8
tests: Windows compatibility fixes
Patrick Mezard <pmezard@gmail.com>
parents:
4294
diff
changeset
|
14 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13439
diff
changeset
|
15 $ hg init t |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
16 $ cd t |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
17 $ echo This is file a1 > a |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
18 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
19 $ hg commit -m "commit #0" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
20 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
21 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
22 $ hg commit -m "commit #1" |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
23 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
24 $ hg update 0 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
25 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
26 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
27 Test interrupted updates by exploiting our non-handling of directory collisions |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
28 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
29 $ mkdir b |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
30 $ hg up |
19498
3ac1735a2265
tests: glob out exception type for directory collision
Matt Mackall <mpm@selenic.com>
parents:
19482
diff
changeset
|
31 abort: *: '$TESTTMP/t/b' (glob) |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
32 [255] |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
33 $ hg ci |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
34 abort: last update was interrupted |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
35 (use 'hg update' to get a consistent checkout) |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
36 [255] |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
37 $ hg sum |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
38 parent: 0:538afb845929 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
39 commit #0 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
40 branch: default |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
41 commit: (interrupted update) |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
42 update: 1 new changesets (update) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25111
diff
changeset
|
43 phases: 2 draft |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
44 $ rmdir b |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
45 $ hg up |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
47 $ hg sum |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
48 parent: 1:b8bb4a988f25 tip |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
49 commit #1 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
50 branch: default |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
51 commit: (clean) |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
52 update: (current) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25111
diff
changeset
|
53 phases: 2 draft |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
54 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
55 Prepare a basic merge |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
56 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
57 $ hg up 0 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
59 $ echo This is file c1 > c |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
60 $ hg add c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
61 $ hg commit -m "commit #2" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
62 created new head |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
63 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
64 no merges expected |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
65 $ hg merge -P 1 |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
66 changeset: 1:b8bb4a988f25 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
67 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
68 date: Thu Jan 01 00:00:00 1970 +0000 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
69 summary: commit #1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
70 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
71 $ hg merge 1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
72 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
73 (branch merge, don't forget to commit) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
74 $ hg diff --nodates |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
75 diff -r 49035e18a8e6 b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
76 --- /dev/null |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
77 +++ b/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
78 @@ -0,0 +1,1 @@ |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
79 +This is file b1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
80 $ hg status |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
81 M b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
82 $ cd ..; rm -r t |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
83 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13439
diff
changeset
|
84 $ hg init t |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
85 $ cd t |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
86 $ echo This is file a1 > a |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
87 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
88 $ hg commit -m "commit #0" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
89 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
90 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
91 $ hg commit -m "commit #1" |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
92 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
93 $ hg update 0 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
94 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
95 $ echo This is file c1 > c |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
96 $ hg add c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
97 $ hg commit -m "commit #2" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
98 created new head |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
99 $ echo This is file b2 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
100 merge should fail |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
101 $ hg merge 1 |
15894
44fa047cef57
merge: report all files in _checkunknown
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15619
diff
changeset
|
102 b: untracked file differs |
44fa047cef57
merge: report all files in _checkunknown
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15619
diff
changeset
|
103 abort: untracked files in working directory differ from files in requested revision |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
104 [255] |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
105 merge of b expected |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
106 $ hg merge -f 1 |
13439
d724a69309e0
util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents:
12664
diff
changeset
|
107 merging b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
108 merging for b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
109 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
110 (branch merge, don't forget to commit) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
111 $ hg diff --nodates |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
112 diff -r 49035e18a8e6 b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
113 --- /dev/null |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
114 +++ b/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
115 @@ -0,0 +1,1 @@ |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
116 +This is file b2 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
117 $ hg status |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
118 M b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
119 $ cd ..; rm -r t |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
120 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13439
diff
changeset
|
121 $ hg init t |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
122 $ cd t |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
123 $ echo This is file a1 > a |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
124 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
125 $ hg commit -m "commit #0" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
126 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
127 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
128 $ hg commit -m "commit #1" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
129 $ echo This is file b22 > b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
130 $ hg commit -m "commit #2" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
131 $ hg update 1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
132 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
133 $ echo This is file c1 > c |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
134 $ hg add c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
135 $ hg commit -m "commit #3" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
136 created new head |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
137 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
138 Contents of b should be "this is file b1" |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
139 $ cat b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
140 This is file b1 |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
814
diff
changeset
|
141 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
142 $ echo This is file b22 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
143 merge fails |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
144 $ hg merge 2 |
19802
94c394653b2a
merge: standardize error message for dirty working dir
Siddharth Agarwal <sid0@fb.com>
parents:
19498
diff
changeset
|
145 abort: uncommitted changes |
15619
6c8573dd1b6b
merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents:
15243
diff
changeset
|
146 (use 'hg status' to list changes) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
147 [255] |
15243
1e9451476bf8
tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents:
13956
diff
changeset
|
148 merge expected! |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
149 $ hg merge -f 2 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
151 (branch merge, don't forget to commit) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
152 $ hg diff --nodates |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
153 diff -r 85de557015a8 b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
154 --- a/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
155 +++ b/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
156 @@ -1,1 +1,1 @@ |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
157 -This is file b1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
158 +This is file b22 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
159 $ hg status |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
160 M b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
161 $ cd ..; rm -r t |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
162 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13439
diff
changeset
|
163 $ hg init t |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
164 $ cd t |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
165 $ echo This is file a1 > a |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
166 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
167 $ hg commit -m "commit #0" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
168 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
169 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
170 $ hg commit -m "commit #1" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
171 $ echo This is file b22 > b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
172 $ hg commit -m "commit #2" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
173 $ hg update 1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
174 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
175 $ echo This is file c1 > c |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
176 $ hg add c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
177 $ hg commit -m "commit #3" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
178 created new head |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
179 $ echo This is file b33 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
180 merge of b should fail |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
181 $ hg merge 2 |
19802
94c394653b2a
merge: standardize error message for dirty working dir
Siddharth Agarwal <sid0@fb.com>
parents:
19498
diff
changeset
|
182 abort: uncommitted changes |
15619
6c8573dd1b6b
merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents:
15243
diff
changeset
|
183 (use 'hg status' to list changes) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
184 [255] |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
185 merge of b expected |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
186 $ hg merge -f 2 |
13439
d724a69309e0
util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents:
12664
diff
changeset
|
187 merging b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
188 merging for b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
189 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
190 (branch merge, don't forget to commit) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
191 $ hg diff --nodates |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
192 diff -r 85de557015a8 b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
193 --- a/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
194 +++ b/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
195 @@ -1,1 +1,1 @@ |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
196 -This is file b1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
197 +This is file b33 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
198 $ hg status |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
199 M b |
12664
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
200 |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
201 Test for issue2364 |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
202 |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
203 $ hg up -qC . |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
204 $ hg rm b |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
205 $ hg ci -md |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
206 $ hg revert -r -2 b |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
207 $ hg up -q -- -2 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15894
diff
changeset
|
208 |
25753
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
209 Test that updated files are treated as "modified", when |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
210 'merge.update()' is aborted before 'merge.recordupdates()' (= parents |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
211 aren't changed), even if none of mode, size and timestamp of them |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
212 isn't changed on the filesystem (see also issue4583). |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
213 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
214 $ cat > $TESTTMP/abort.py <<EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
215 > # emulate aborting before "recordupdates()". in this case, files |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
216 > # are changed without updating dirstate |
26587
56b2bcea2529
error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25753
diff
changeset
|
217 > from mercurial import extensions, merge, error |
25753
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
218 > def applyupdates(orig, *args, **kwargs): |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
219 > orig(*args, **kwargs) |
26587
56b2bcea2529
error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25753
diff
changeset
|
220 > raise error.Abort('intentional aborting') |
25753
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
221 > def extsetup(ui): |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
222 > extensions.wrapfunction(merge, "applyupdates", applyupdates) |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
223 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
224 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
225 $ cat >> .hg/hgrc <<EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
226 > [fakedirstatewritetime] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
227 > # emulate invoking dirstate.write() via repo.status() |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
228 > # at 2000-01-01 00:00 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
229 > fakenow = 200001010000 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
230 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
231 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
232 (file gotten from other revision) |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
233 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
234 $ hg update -q -C 2 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
235 $ echo 'THIS IS FILE B5' > b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
236 $ hg commit -m 'commit #5' |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
237 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
238 $ hg update -q -C 3 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
239 $ cat b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
240 This is file b1 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
241 $ touch -t 200001010000 b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
242 $ hg debugrebuildstate |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
243 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
244 $ cat >> .hg/hgrc <<EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
245 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
246 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
247 > abort = $TESTTMP/abort.py |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
248 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
249 $ hg merge 5 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
250 abort: intentional aborting |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
251 [255] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
252 $ cat >> .hg/hgrc <<EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
253 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
254 > fakedirstatewritetime = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
255 > abort = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
256 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
257 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
258 $ cat b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
259 THIS IS FILE B5 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
260 $ touch -t 200001010000 b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
261 $ hg status -A b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
262 M b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
263 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
264 (file merged from other revision) |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
265 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
266 $ hg update -q -C 3 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
267 $ echo 'this is file b6' > b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
268 $ hg commit -m 'commit #6' |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
269 created new head |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
270 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
271 $ cat b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
272 this is file b6 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
273 $ touch -t 200001010000 b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
274 $ hg debugrebuildstate |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
275 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
276 $ cat >> .hg/hgrc <<EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
277 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
278 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
279 > abort = $TESTTMP/abort.py |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
280 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
281 $ hg merge --tool internal:other 5 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
282 abort: intentional aborting |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
283 [255] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
284 $ cat >> .hg/hgrc <<EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
285 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
286 > fakedirstatewritetime = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
287 > abort = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
288 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
289 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
290 $ cat b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
291 THIS IS FILE B5 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
292 $ touch -t 200001010000 b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
293 $ hg status -A b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
294 M b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
295 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15894
diff
changeset
|
296 $ cd .. |