annotate tests/test-merge1.t @ 28132:2d09a400b495

histedit: break _histedit function into smaller pieces (add _newaction) This is a part of bigger effort to refactor histedit. Initial steps are to break _histedit function into smaller pieces which will supposedly be more understandable. After this is done, I will have a better understanding of how histedit works and apply that to fix issue4800.
author Kostia Balytskyi <ikostia@fb.com>
date Mon, 01 Feb 2016 17:20:51 +0000
parents 6b639caa1652
children 1e4512eac59e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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]
27571
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
105
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
106 #if symlink
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
107 symlinks to directories should be treated as regular files (issue5027)
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
108 $ rm b
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
109 $ ln -s 'This is file b2' b
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
110 $ hg merge 1
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
111 b: untracked file differs
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
112 abort: untracked files in working directory differ from files in requested revision
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
113 [255]
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
114 symlinks shouldn't be followed
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
115 $ rm b
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
116 $ echo This is file b1 > .hg/b
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
117 $ ln -s .hg/b b
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
118 $ hg merge 1
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
119 b: untracked file differs
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
120 abort: untracked files in working directory differ from files in requested revision
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
121 [255]
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
122
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
123 $ rm b
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
124 $ echo This is file b2 > b
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
125 #endif
6a6e78f84cc6 merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents: 26587
diff changeset
126
27657
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
127 bad config
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
128 $ hg merge 1 --config merge.checkunknown=x
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
129 abort: merge.checkunknown not valid ('x' is none of 'abort', 'ignore', 'warn')
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
130 [255]
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
131 this merge should fail
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
132 $ hg merge 1 --config merge.checkunknown=abort
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
133 b: untracked file differs
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
134 abort: untracked files in working directory differ from files in requested revision
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
135 [255]
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
136
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
137 this merge should warn
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
138 $ hg merge 1 --config merge.checkunknown=warn
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
139 b: replacing untracked file
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
141 (branch merge, don't forget to commit)
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
142 $ cat b.orig
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
143 This is file b2
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
144 $ hg up --clean 2
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
145 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
146 $ mv b.orig b
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
147
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
148 this merge should silently ignore
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
149 $ cat b
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
150 This is file b2
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
151 $ hg merge 1 --config merge.checkunknown=ignore
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
152 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
153 (branch merge, don't forget to commit)
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
154
27742
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
155 merge.checkignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
156 $ hg up --clean 1
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
157 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
158 $ cat >> .hgignore << EOF
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
159 > remoteignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
160 > EOF
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
161 $ echo This is file localignored3 > localignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
162 $ echo This is file remoteignored3 > remoteignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
163 $ hg add .hgignore localignored remoteignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
164 $ hg commit -m "commit #3"
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
165
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
166 $ hg up 2
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
167 1 files updated, 0 files merged, 4 files removed, 0 files unresolved
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
168 $ cat >> .hgignore << EOF
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
169 > localignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
170 > EOF
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
171 $ hg add .hgignore
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
172 $ hg commit -m "commit #4"
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
173
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
174 remote .hgignore shouldn't be used for determining whether a file is ignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
175 $ echo This is file remoteignored4 > remoteignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
176 $ hg merge 3 --config merge.checkignored=ignore --config merge.checkunknown=abort
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
177 remoteignored: untracked file differs
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
178 abort: untracked files in working directory differ from files in requested revision
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
179 [255]
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
180 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=ignore
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
181 merging .hgignore
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
182 merging for .hgignore
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
183 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
184 (branch merge, don't forget to commit)
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
185 $ cat remoteignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
186 This is file remoteignored3
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
187 $ cat remoteignored.orig
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
188 This is file remoteignored4
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
189 $ rm remoteignored.orig
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
190
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
191 local .hgignore should be used for that
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
192 $ hg up --clean 4
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
193 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
194 $ echo This is file localignored4 > localignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
195 also test other conflicting files to see we output the full set of warnings
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
196 $ echo This is file b2 > b
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
197 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=abort
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
198 b: untracked file differs
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
199 localignored: untracked file differs
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
200 abort: untracked files in working directory differ from files in requested revision
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
201 [255]
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
202 $ hg merge 3 --config merge.checkignored=abort --config merge.checkunknown=ignore
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
203 localignored: untracked file differs
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
204 abort: untracked files in working directory differ from files in requested revision
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
205 [255]
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
206 $ hg merge 3 --config merge.checkignored=warn --config merge.checkunknown=abort
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
207 b: untracked file differs
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
208 abort: untracked files in working directory differ from files in requested revision
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
209 [255]
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
210 $ hg merge 3 --config merge.checkignored=warn --config merge.checkunknown=warn
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
211 b: replacing untracked file
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
212 localignored: replacing untracked file
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
213 merging .hgignore
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
214 merging for .hgignore
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
215 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
216 (branch merge, don't forget to commit)
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
217 $ cat localignored
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
218 This is file localignored3
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
219 $ cat localignored.orig
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
220 This is file localignored4
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
221 $ rm localignored.orig
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
222
27657
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
223 $ cat b.orig
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
224 This is file b2
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
225 $ hg up --clean 2
27742
6b639caa1652 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents: 27657
diff changeset
226 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
27657
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
227 $ mv b.orig b
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
228
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
229 this merge of b should work
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
230 $ cat b
7b5c8c8a2f8c merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents: 27571
diff changeset
231 This is file b2
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
232 $ hg merge -f 1
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12664
diff changeset
233 merging b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
234 merging for b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
235 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
236 (branch merge, don't forget to commit)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
237 $ hg diff --nodates
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
238 diff -r 49035e18a8e6 b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
239 --- /dev/null
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
240 +++ b/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
241 @@ -0,0 +1,1 @@
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
242 +This is file b2
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
243 $ hg status
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
244 M b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
245 $ cd ..; rm -r t
407
0e0d0670b2bc [PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff changeset
246
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13439
diff changeset
247 $ hg init t
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
248 $ cd t
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
249 $ echo This is file a1 > a
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
250 $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
251 $ hg commit -m "commit #0"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
252 $ echo This is file b1 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
253 $ hg add b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
254 $ hg commit -m "commit #1"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
255 $ echo This is file b22 > b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
256 $ hg commit -m "commit #2"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
257 $ hg update 1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
258 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
259 $ echo This is file c1 > c
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
260 $ hg add c
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
261 $ hg commit -m "commit #3"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
262 created new head
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
263
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
264 Contents of b should be "this is file b1"
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
265 $ cat b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
266 This is file b1
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents: 814
diff changeset
267
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
268 $ echo This is file b22 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
269 merge fails
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
270 $ hg merge 2
19802
94c394653b2a merge: standardize error message for dirty working dir
Siddharth Agarwal <sid0@fb.com>
parents: 19498
diff changeset
271 abort: uncommitted changes
15619
6c8573dd1b6b merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents: 15243
diff changeset
272 (use 'hg status' to list changes)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
273 [255]
15243
1e9451476bf8 tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents: 13956
diff changeset
274 merge expected!
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
275 $ hg merge -f 2
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
276 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
277 (branch merge, don't forget to commit)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
278 $ hg diff --nodates
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
279 diff -r 85de557015a8 b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
280 --- a/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
281 +++ b/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
282 @@ -1,1 +1,1 @@
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
283 -This is file b1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
284 +This is file b22
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
285 $ hg status
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
286 M b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
287 $ cd ..; rm -r t
407
0e0d0670b2bc [PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff changeset
288
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13439
diff changeset
289 $ hg init t
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
290 $ cd t
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
291 $ echo This is file a1 > a
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
292 $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
293 $ hg commit -m "commit #0"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
294 $ echo This is file b1 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
295 $ hg add b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
296 $ hg commit -m "commit #1"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
297 $ echo This is file b22 > b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
298 $ hg commit -m "commit #2"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
299 $ hg update 1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
300 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
301 $ echo This is file c1 > c
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
302 $ hg add c
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
303 $ hg commit -m "commit #3"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
304 created new head
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
305 $ echo This is file b33 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
306 merge of b should fail
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
307 $ hg merge 2
19802
94c394653b2a merge: standardize error message for dirty working dir
Siddharth Agarwal <sid0@fb.com>
parents: 19498
diff changeset
308 abort: uncommitted changes
15619
6c8573dd1b6b merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents: 15243
diff changeset
309 (use 'hg status' to list changes)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
310 [255]
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
311 merge of b expected
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
312 $ hg merge -f 2
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12664
diff changeset
313 merging b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
314 merging for b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
315 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
316 (branch merge, don't forget to commit)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
317 $ hg diff --nodates
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
318 diff -r 85de557015a8 b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
319 --- a/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
320 +++ b/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
321 @@ -1,1 +1,1 @@
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
322 -This is file b1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
323 +This is file b33
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
324 $ hg status
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
325 M b
12664
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
326
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
327 Test for issue2364
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
328
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
329 $ hg up -qC .
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
330 $ hg rm b
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
331 $ hg ci -md
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
332 $ hg revert -r -2 b
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
333 $ hg up -q -- -2
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15894
diff changeset
334
25753
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
335 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
336 '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
337 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
338 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
339
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
340 $ 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
341 > # 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
342 > # 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
343 > 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
344 > 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
345 > 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
346 > 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
347 > 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
348 > 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
349 > EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
350
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
351 $ 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
352 > [fakedirstatewritetime]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
353 > # 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
354 > # 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
355 > fakenow = 200001010000
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
356 > EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
357
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
358 (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
359
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
360 $ 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
361 $ 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
362 $ 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
363
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
364 $ 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
365 $ cat b
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
366 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
367 $ 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
368 $ hg debugrebuildstate
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
369
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
370 $ 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
371 > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
372 > 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
373 > 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
374 > EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
375 $ 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
376 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
377 [255]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
378 $ 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
379 > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
380 > fakedirstatewritetime = !
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
381 > abort = !
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
382 > EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
383
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
384 $ cat b
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
385 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
386 $ 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
387 $ 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
388 M b
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
389
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
390 (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
391
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
392 $ 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
393 $ 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
394 $ 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
395 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
396
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
397 $ cat b
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
398 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
399 $ 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
400 $ hg debugrebuildstate
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
401
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
402 $ 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
403 > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
404 > 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
405 > 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
406 > EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
407 $ 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
408 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
409 [255]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
410 $ 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
411 > [extensions]
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
412 > fakedirstatewritetime = !
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
413 > abort = !
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
414 > EOF
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
415
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
416 $ cat b
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
417 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
418 $ 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
419 $ 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
420 M b
fe03f522dda9 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25382
diff changeset
421
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15894
diff changeset
422 $ cd ..