Mercurial > hg
annotate tests/test-merge1.t @ 41762:cde37ed080c9
tests: fixed test too dependent on actual exception wording
On one of the machines I use to run the tests prior to submission,
the default Python is 2.7.5, with the following wording:
must be encoded string without NULL bytes, not str
This third form (and possible future ones) are motivation to
use a wider catching regexp.
author | Georges Racinet <gracinet@anybox.fr> |
---|---|
date | Thu, 21 Feb 2019 11:23:10 +0100 |
parents | 07e181ed82ef |
children | 12243f15d53e |
rev | line source |
---|---|
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
1 $ cat <<EOF > merge |
33721
24849d53697d
tests: clean up many print statements to be print functions instead
Augie Fackler <augie@google.com>
parents:
33286
diff
changeset
|
2 > from __future__ import print_function |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
3 > import sys, os |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
4 > |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
5 > try: |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
6 > import msvcrt |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
7 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
8 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
9 > except ImportError: |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
10 > pass |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
11 > |
33721
24849d53697d
tests: clean up many print statements to be print functions instead
Augie Fackler <augie@google.com>
parents:
33286
diff
changeset
|
12 > print("merging for", os.path.basename(sys.argv[1])) |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
13 > EOF |
40872
07e181ed82ef
py3: quote several instances of $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
39593
diff
changeset
|
14 $ HGMERGE="\"$PYTHON\" ../merge"; export HGMERGE |
7080
a6477aa893b8
tests: Windows compatibility fixes
Patrick Mezard <pmezard@gmail.com>
parents:
4294
diff
changeset
|
15 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13439
diff
changeset
|
16 $ hg init t |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
17 $ cd t |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
18 $ echo This is file a1 > a |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
19 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
20 $ hg commit -m "commit #0" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
21 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
22 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
23 $ hg commit -m "commit #1" |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
24 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
25 $ hg update 0 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
26 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
|
27 |
29480
1e4512eac59e
update: teach hg to override untracked dir with a tracked file on update
Kostia Balytskyi <ikostia@fb.com>
parents:
27742
diff
changeset
|
28 Test interrupted updates by having a non-empty dir with the same name as one |
1e4512eac59e
update: teach hg to override untracked dir with a tracked file on update
Kostia Balytskyi <ikostia@fb.com>
parents:
27742
diff
changeset
|
29 of the files in a commit we're updating to |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
30 |
29480
1e4512eac59e
update: teach hg to override untracked dir with a tracked file on update
Kostia Balytskyi <ikostia@fb.com>
parents:
27742
diff
changeset
|
31 $ mkdir b && touch b/nonempty |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
32 $ hg up |
39593
c8514f858788
tests: stabilize change for handling not quoting non-empty-directory
Matt Harbison <matt_harbison@yahoo.com>
parents:
39577
diff
changeset
|
33 abort: Unlinking directory not permitted: *$TESTTMP/t/b* (glob) (windows !) |
39577
cb1329738d64
tests: handle Python 3 not quoting non-empty-directory error
Augie Fackler <augie@google.com>
parents:
39478
diff
changeset
|
34 abort: Directory not empty: '?\$TESTTMP/t/b'? (re) (no-windows !) |
39196
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
35 [255] |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
36 $ hg ci |
39196
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
37 abort: last update was interrupted |
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
38 (use 'hg update' to get a consistent checkout) |
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
39 [255] |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
40 $ hg sum |
39196
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
41 parent: 0:538afb845929 |
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
42 commit #0 |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
43 branch: default |
39196
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
44 commit: 1 unknown (interrupted update) |
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
45 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
|
46 phases: 2 draft |
34942
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34553
diff
changeset
|
47 |
39196
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
48 $ rm b/nonempty |
34942
2a774cae3a03
merge: disable path conflict checking by default (issue5716)
Siddharth Agarwal <sid0@fb.com>
parents:
34553
diff
changeset
|
49 |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
50 $ hg up |
39196
8c6775e812d8
merge: do not delete untracked files silently (issue5962)
Yuya Nishihara <yuya@tcha.org>
parents:
34942
diff
changeset
|
51 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
52 $ hg sum |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
53 parent: 1:b8bb4a988f25 tip |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
54 commit #1 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
55 branch: default |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
56 commit: (clean) |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
57 update: (current) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25111
diff
changeset
|
58 phases: 2 draft |
19482
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
59 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
60 Prepare a basic merge |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
61 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
62 $ hg up 0 |
499fc471296b
update: add tracking of interrupted updates (issue3113)
Matt Mackall <mpm@selenic.com>
parents:
16913
diff
changeset
|
63 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
|
64 $ echo This is file c1 > c |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
65 $ hg add c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
66 $ hg commit -m "commit #2" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
67 created new head |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
68 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
69 no merges expected |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
70 $ hg merge -P 1 |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
71 changeset: 1:b8bb4a988f25 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
72 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
73 date: Thu Jan 01 00:00:00 1970 +0000 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
74 summary: commit #1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
75 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
76 $ hg merge 1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
77 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
|
78 (branch merge, don't forget to commit) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
79 $ hg diff --nodates |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
80 diff -r 49035e18a8e6 b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
81 --- /dev/null |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
82 +++ b/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
83 @@ -0,0 +1,1 @@ |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
84 +This is file b1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
85 $ hg status |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
86 M b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
87 $ cd ..; rm -r t |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
88 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13439
diff
changeset
|
89 $ hg init t |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
90 $ cd t |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
91 $ echo This is file a1 > a |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
92 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
93 $ hg commit -m "commit #0" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
94 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
95 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
96 $ hg commit -m "commit #1" |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
97 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
98 $ hg update 0 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
99 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
|
100 $ echo This is file c1 > c |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
101 $ hg add c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
102 $ hg commit -m "commit #2" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
103 created new head |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
104 $ echo This is file b2 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
105 merge should fail |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
106 $ hg merge 1 |
15894
44fa047cef57
merge: report all files in _checkunknown
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15619
diff
changeset
|
107 b: untracked file differs |
44fa047cef57
merge: report all files in _checkunknown
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
15619
diff
changeset
|
108 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
|
109 [255] |
27571
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
110 |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
111 #if symlink |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
112 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
|
113 $ rm b |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
114 $ 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
|
115 $ hg merge 1 |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
116 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
|
117 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
|
118 [255] |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
119 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
|
120 $ rm b |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
121 $ 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
|
122 $ 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
|
123 $ hg merge 1 |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
124 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
|
125 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
|
126 [255] |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
127 |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
128 $ rm b |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
129 $ 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
|
130 #endif |
6a6e78f84cc6
merge: while checking for unknown files don't follow symlinks (issue5027)
Siddharth Agarwal <sid0@fb.com>
parents:
26587
diff
changeset
|
131 |
27657
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
132 bad config |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
133 $ 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
|
134 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
|
135 [255] |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
136 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
|
137 $ 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
|
138 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
|
139 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
|
140 [255] |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
141 |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
142 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
|
143 $ 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
|
144 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
|
145 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
|
146 (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
|
147 $ cat b.orig |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
148 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
|
149 $ 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
|
150 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
|
151 $ 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
|
152 |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
153 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
|
154 $ cat b |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
155 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
|
156 $ 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
|
157 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
|
158 (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
|
159 |
27742
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
160 merge.checkignored |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
161 $ 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
|
162 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
|
163 $ cat >> .hgignore << EOF |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
164 > remoteignored |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
165 > EOF |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
166 $ 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
|
167 $ 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
|
168 $ 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
|
169 $ 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
|
170 |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
171 $ hg up 2 |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
172 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
|
173 $ cat >> .hgignore << EOF |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
174 > localignored |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
175 > EOF |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
176 $ hg add .hgignore |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
177 $ 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
|
178 |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
179 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
|
180 $ 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
|
181 $ 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
|
182 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
|
183 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
|
184 [255] |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
185 $ 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
|
186 merging .hgignore |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
187 merging for .hgignore |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
188 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
|
189 (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
|
190 $ cat remoteignored |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
191 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
|
192 $ cat remoteignored.orig |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
193 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
|
194 $ rm remoteignored.orig |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
195 |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
196 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
|
197 $ 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
|
198 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
|
199 $ 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
|
200 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
|
201 $ 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
|
202 $ 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
|
203 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
|
204 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
|
205 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
|
206 [255] |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
207 $ 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
|
208 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
|
209 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
|
210 [255] |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
211 $ 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
|
212 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
|
213 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
|
214 [255] |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
215 $ 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
|
216 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
|
217 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
|
218 merging .hgignore |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
219 merging for .hgignore |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
220 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
|
221 (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
|
222 $ cat localignored |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
223 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
|
224 $ cat localignored.orig |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
225 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
|
226 $ rm localignored.orig |
6b639caa1652
merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com>
parents:
27657
diff
changeset
|
227 |
27657
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
228 $ cat b.orig |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
229 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
|
230 $ 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
|
231 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
|
232 $ 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
|
233 |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
234 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
|
235 $ cat b |
7b5c8c8a2f8c
merge: add options to warn or ignore on colliding unknown files
Siddharth Agarwal <sid0@fb.com>
parents:
27571
diff
changeset
|
236 This is file b2 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
237 $ hg merge -f 1 |
13439
d724a69309e0
util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents:
12664
diff
changeset
|
238 merging b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
239 merging for b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
240 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
|
241 (branch merge, don't forget to commit) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
242 $ hg diff --nodates |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
243 diff -r 49035e18a8e6 b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
244 --- /dev/null |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
245 +++ b/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
246 @@ -0,0 +1,1 @@ |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
247 +This is file b2 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
248 $ hg status |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
249 M b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
250 $ cd ..; rm -r t |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
251 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13439
diff
changeset
|
252 $ hg init t |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
253 $ cd t |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
254 $ echo This is file a1 > a |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
255 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
256 $ hg commit -m "commit #0" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
257 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
258 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
259 $ hg commit -m "commit #1" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
260 $ echo This is file b22 > b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
261 $ hg commit -m "commit #2" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
262 $ hg update 1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
263 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
|
264 $ echo This is file c1 > c |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
265 $ hg add c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
266 $ hg commit -m "commit #3" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
267 created new head |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
268 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
269 Contents of b should be "this is file b1" |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
270 $ cat b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
271 This is file b1 |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
814
diff
changeset
|
272 |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
273 $ echo This is file b22 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
274 merge fails |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
275 $ hg merge 2 |
19802
94c394653b2a
merge: standardize error message for dirty working dir
Siddharth Agarwal <sid0@fb.com>
parents:
19498
diff
changeset
|
276 abort: uncommitted changes |
15619
6c8573dd1b6b
merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents:
15243
diff
changeset
|
277 (use 'hg status' to list changes) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
278 [255] |
15243
1e9451476bf8
tests: cleanup of echo statements left over from test conversion
Mads Kiilerich <mads@kiilerich.com>
parents:
13956
diff
changeset
|
279 merge expected! |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
280 $ hg merge -f 2 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
281 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
|
282 (branch merge, don't forget to commit) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
283 $ hg diff --nodates |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
284 diff -r 85de557015a8 b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
285 --- a/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
286 +++ b/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
287 @@ -1,1 +1,1 @@ |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
288 -This is file b1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
289 +This is file b22 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
290 $ hg status |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
291 M b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
292 $ cd ..; rm -r t |
407
0e0d0670b2bc
[PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff
changeset
|
293 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
13439
diff
changeset
|
294 $ hg init t |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
295 $ cd t |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
296 $ echo This is file a1 > a |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
297 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
298 $ hg commit -m "commit #0" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
299 $ echo This is file b1 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
300 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
301 $ hg commit -m "commit #1" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
302 $ echo This is file b22 > b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
303 $ hg commit -m "commit #2" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
304 $ hg update 1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
305 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
|
306 $ echo This is file c1 > c |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
307 $ hg add c |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
308 $ hg commit -m "commit #3" |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
309 created new head |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
310 $ echo This is file b33 > b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
311 merge of b should fail |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
312 $ hg merge 2 |
19802
94c394653b2a
merge: standardize error message for dirty working dir
Siddharth Agarwal <sid0@fb.com>
parents:
19498
diff
changeset
|
313 abort: uncommitted changes |
15619
6c8573dd1b6b
merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents:
15243
diff
changeset
|
314 (use 'hg status' to list changes) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
315 [255] |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
316 merge of b expected |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
317 $ hg merge -f 2 |
13439
d724a69309e0
util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents:
12664
diff
changeset
|
318 merging b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
319 merging for b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
320 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
|
321 (branch merge, don't forget to commit) |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
322 $ hg diff --nodates |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11975
diff
changeset
|
323 diff -r 85de557015a8 b |
11975
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
324 --- a/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
325 +++ b/b |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
326 @@ -1,1 +1,1 @@ |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
327 -This is file b1 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
328 +This is file b33 |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
329 $ hg status |
21884b433c51
tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents:
8834
diff
changeset
|
330 M b |
12664
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
331 |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
332 Test for issue2364 |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
333 |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
334 $ hg up -qC . |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
335 $ hg rm b |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
336 $ hg ci -md |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
337 $ hg revert -r -2 b |
545ec1775021
merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
338 $ hg up -q -- -2 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15894
diff
changeset
|
339 |
25753
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
340 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
|
341 '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
|
342 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
|
343 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
|
344 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
345 $ cat > $TESTTMP/abort.py <<EOF |
33968
06a740540ea1
tests: update test-merge1 to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33721
diff
changeset
|
346 > from __future__ import absolute_import |
25753
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
347 > # 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
|
348 > # are changed without updating dirstate |
33968
06a740540ea1
tests: update test-merge1 to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33721
diff
changeset
|
349 > from mercurial import ( |
06a740540ea1
tests: update test-merge1 to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33721
diff
changeset
|
350 > error, |
06a740540ea1
tests: update test-merge1 to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33721
diff
changeset
|
351 > extensions, |
06a740540ea1
tests: update test-merge1 to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33721
diff
changeset
|
352 > merge, |
06a740540ea1
tests: update test-merge1 to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33721
diff
changeset
|
353 > ) |
25753
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
354 > 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
|
355 > 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
|
356 > 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
|
357 > 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
|
358 > 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
|
359 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
360 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
361 $ 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
|
362 > [fakedirstatewritetime] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
363 > # 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
|
364 > # 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
|
365 > fakenow = 200001010000 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
366 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
367 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
368 (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
|
369 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
370 $ 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
|
371 $ 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
|
372 $ 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
|
373 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
374 $ 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
|
375 $ cat b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
376 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
|
377 $ 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
|
378 $ hg debugrebuildstate |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
379 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
380 $ 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
|
381 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
382 > 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
|
383 > 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
|
384 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
385 $ 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
|
386 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
|
387 [255] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
388 $ 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
|
389 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
390 > fakedirstatewritetime = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
391 > abort = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
392 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
393 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
394 $ cat b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
395 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
|
396 $ 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
|
397 $ 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
|
398 M b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
399 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
400 (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
|
401 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
402 $ 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
|
403 $ 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
|
404 $ 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
|
405 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
|
406 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
407 $ cat b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
408 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
|
409 $ 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
|
410 $ hg debugrebuildstate |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
411 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
412 $ 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
|
413 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
414 > 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
|
415 > 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
|
416 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
417 $ 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
|
418 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
|
419 [255] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
420 $ 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
|
421 > [extensions] |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
422 > fakedirstatewritetime = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
423 > abort = ! |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
424 > EOF |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
425 |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
426 $ cat b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
427 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
|
428 $ 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
|
429 $ 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
|
430 M b |
fe03f522dda9
context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
25382
diff
changeset
|
431 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15894
diff
changeset
|
432 $ cd .. |