annotate tests/test-subrepo.t @ 20275:2123d27ff75d

backout: avoid update on simple case. Before the changeset the backout process was: 1) go to <target> 2) revert to <target> parent 3) update back to changeset we came from The two update steps can takes a very long time to move back and forth unrelated file change between <target> and current working directory. The new process is just merging current working directory with the parent of <target> using <target> as ancestor. This give the very same result but skip the two updates. On big repo with a lot of files and changes that save a lots of time (x20 for one week window). The "merge" version (hg backout --merge) is still done with upgrades. We could imagine using in memory commit to speed it up but this is another fish.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 08 Jan 2014 14:53:46 -0800
parents 4c96c50ef937
children 6545770bd379
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
1 Let commit recurse into subrepos by default to match pre-2.0 behavior:
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
2
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
3 $ echo "[ui]" >> $HGRCPATH
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
4 $ echo "commitsubrepos = Yes" >> $HGRCPATH
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
5
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
6 $ hg init t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
7 $ cd t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
8
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
9 first revision, no sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
10
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
11 $ echo a > a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
12 $ hg ci -Am0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
13 adding a
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
14
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
15 add first sub
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
16
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
17 $ echo s = s > .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
18 $ hg add .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
19 $ hg init s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
20 $ echo a > s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
21
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
22 Issue2232: committing a subrepo without .hgsub
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
23
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
24 $ hg ci -mbad s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
25 abort: can't commit subrepos without .hgsub
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
26 [255]
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
27
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
28 $ hg -R s ci -Ams0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
29 adding a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
30 $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
31 parent: 0:f7b1eb17ad24 tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
32 0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
33 branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
34 commit: 1 added, 1 subrepos
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
35 update: (current)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
36 $ hg ci -m1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
37
16454
92c7e917b647 tests: add test for fileset 'subrepo' keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16430
diff changeset
38 Revert subrepo and test subrepo fileset keyword:
15265
460135339d74 revert: warn that subrepos cannot be reverted
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 15231
diff changeset
39
460135339d74 revert: warn that subrepos cannot be reverted
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 15231
diff changeset
40 $ echo b > s/a
16454
92c7e917b647 tests: add test for fileset 'subrepo' keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16430
diff changeset
41 $ hg revert "set:subrepo('glob:s*')"
16430
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
42 reverting subrepo s
16540
4fe8eb4a6e2c tests: add missing accept of native pathname separator
Mads Kiilerich <mads@kiilerich.com>
parents: 16454
diff changeset
43 reverting s/a (glob)
16430
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
44 $ rm s/a.orig
15265
460135339d74 revert: warn that subrepos cannot be reverted
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 15231
diff changeset
45
16430
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
46 Revert subrepo with no backup. The "reverting s/a" line is gone since
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
47 we're really running 'hg update' in the subrepo:
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
48
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
49 $ echo b > s/a
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
50 $ hg revert --no-backup s
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
51 reverting subrepo s
15265
460135339d74 revert: warn that subrepos cannot be reverted
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 15231
diff changeset
52
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
53 Issue2022: update -C
11485
b602a95c21ec subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232)
Matt Mackall <mpm@selenic.com>
parents: 11470
diff changeset
54
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
55 $ echo b > s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
56 $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
57 parent: 1:7cf8cfea66e4 tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
58 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
59 branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
60 commit: 1 subrepos
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
61 update: (current)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
62 $ hg co -C 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
64 $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
65 parent: 1:7cf8cfea66e4 tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
66 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
67 branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
68 commit: (clean)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
69 update: (current)
11485
b602a95c21ec subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232)
Matt Mackall <mpm@selenic.com>
parents: 11470
diff changeset
70
15231
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
71 commands that require a clean repo should respect subrepos
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
72
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
73 $ echo b >> s/a
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
74 $ hg backout tip
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
75 abort: uncommitted changes in subrepo s
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
76 [255]
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
77 $ hg revert -C -R s s/a
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
78
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
79 add sub sub
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
80
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
81 $ echo ss = ss > s/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
82 $ hg init s/ss
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
83 $ echo a > s/ss/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
84 $ hg -R s add s/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
85 $ hg -R s/ss add s/ss/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
86 $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
87 parent: 1:7cf8cfea66e4 tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
88 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
89 branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
90 commit: 1 subrepos
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
91 update: (current)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
92 $ hg ci -m2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
93 committing subrepository s
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
94 committing subrepository s/ss (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
95 $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
96 parent: 2:df30734270ae tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
97 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
98 branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
99 commit: (clean)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
100 update: (current)
11470
34e33d50c26b subrepo: correctly handle update -C with modified subrepos (issue2022)
Matt Mackall <mpm@selenic.com>
parents: 11088
diff changeset
101
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
102 bump sub rev (and check it is ignored by ui.commitsubrepos)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
103
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
104 $ echo b > s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
105 $ hg -R s ci -ms1
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
106 $ hg --config ui.commitsubrepos=no ci -m3
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
107
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
108 leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
109
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
110 $ echo c > s/a
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
111 $ hg --config ui.commitsubrepos=no ci -m4
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
112 abort: uncommitted changes in subrepo s
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
113 (use --subrepos for recursive commit)
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
114 [255]
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
115 $ hg id
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
116 f6affe3fbfaa+ tip
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
117 $ hg -R s ci -mc
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
118 $ hg id
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
119 f6affe3fbfaa+ tip
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
120 $ echo d > s/a
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
121 $ hg ci -m4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
122 committing subrepository s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
123 $ hg tip -R s
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
124 changeset: 4:02dcf1d70411
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
125 tag: tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
126 user: test
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
127 date: Thu Jan 01 00:00:00 1970 +0000
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
128 summary: 4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
129
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
130
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
131 check caching
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
132
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
133 $ hg co 0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
134 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
135 $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
136
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
137 restore
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
138
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
139 $ hg co
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
140 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
141 $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
142 path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
143 source s
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
144 revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
145
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
146 new branch for merge tests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
147
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
148 $ hg co 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
150 $ echo t = t >> .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
151 $ hg init t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
152 $ echo t > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
153 $ hg -R t add t
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
154 adding t/t (glob)
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
155
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
156 5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
157
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
158 $ hg ci -m5 # add sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
159 committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
160 created new head
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
161 $ echo t2 > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
162
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
163 6
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
164
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
165 $ hg st -R s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
166 $ hg ci -m6 # change sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
167 committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
168 $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
169 path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
170 source s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
171 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
172 path t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
173 source t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
174 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
175 $ echo t3 > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
176
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
177 7
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
178
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
179 $ hg ci -m7 # change sub again for conflict test
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
180 committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
181 $ hg rm .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
182
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
183 8
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
184
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
185 $ hg ci -m8 # remove sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
186
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
187 merge tests
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
188
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
189 $ hg co -C 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
190 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
191 $ hg merge 5 # test adding
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
193 (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
194 $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
195 path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
196 source s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
197 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
198 path t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
199 source t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
200 revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
201 $ hg ci -m9
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
202 created new head
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
203 $ hg merge 6 --debug # test change
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
204 searching for copies back to rev 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
205 resolving manifests
18605
bcf29565d89f manifestmerge: pass in branchmerge and force separately
Siddharth Agarwal <sid0@fb.com>
parents: 18556
diff changeset
206 branchmerge: True, force: False, partial: False
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
207 ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
208 .hgsubstate: versions differ -> m
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
209 updating: .hgsubstate 1/1 files (100.00%)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
210 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
211 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
212 getting subrepo t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
213 resolving manifests
18605
bcf29565d89f manifestmerge: pass in branchmerge and force separately
Siddharth Agarwal <sid0@fb.com>
parents: 18556
diff changeset
214 branchmerge: False, force: False, partial: False
17895
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
215 ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
216 t: remote is newer -> g
18631
e2dc5397bc82 tests: update test output (will be folded into parent)
Bryan O'Sullivan <bryano@fb.com>
parents: 18612
diff changeset
217 getting t
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
218 updating: t 1/1 files (100.00%)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
219 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
220 (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
221 $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
222 path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
223 source s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
224 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
225 path t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
226 source t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
227 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
228 $ echo conflict > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
229 $ hg ci -m10
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
230 committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
231 $ HGMERGE=internal:merge hg merge --debug 7 # test conflict
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
232 searching for copies back to rev 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
233 resolving manifests
18605
bcf29565d89f manifestmerge: pass in branchmerge and force separately
Siddharth Agarwal <sid0@fb.com>
parents: 18556
diff changeset
234 branchmerge: True, force: False, partial: False
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
235 ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
236 .hgsubstate: versions differ -> m
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
237 updating: .hgsubstate 1/1 files (100.00%)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
238 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
239 subrepo t: both sides changed
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
240 subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
241 (M)erge, keep (l)ocal or keep (r)emote? m
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
242 merging subrepo t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
243 searching for copies back to rev 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
244 resolving manifests
18605
bcf29565d89f manifestmerge: pass in branchmerge and force separately
Siddharth Agarwal <sid0@fb.com>
parents: 18556
diff changeset
245 branchmerge: True, force: False, partial: False
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
246 ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
247 t: versions differ -> m
18541
5ed6a375e9ca merge: delay debug messages for merge actions
Mads Kiilerich <madski@unity3d.com>
parents: 18520
diff changeset
248 preserving t for resolve of t
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
249 updating: t 1/1 files (100.00%)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
250 picked tool 'internal:merge' for t (binary False symlink False)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
251 merging t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
252 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
253 warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 15474
diff changeset
254 merging t incomplete! (edit conflicts, then use 'hg resolve --mark')
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
255 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
12314
f2daa6ab514a merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Brodie Rao <brodie@bitheap.org>
parents: 12127
diff changeset
256 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
257 subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
258 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
259 (branch merge, don't forget to commit)
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
260
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
261 should conflict
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
262
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
263 $ cat t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
264 <<<<<<< local
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
265 conflict
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
266 =======
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
267 t3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
268 >>>>>>> other
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
269
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
270 clone
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
271
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
272 $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
273 $ hg clone t tc
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
274 updating to branch default
18720
0ade08dcb3c3 tests: remove glob lines which unnecessary match / for \ on windows
Simon Heimberg <simohe@besonet.ch>
parents: 18631
diff changeset
275 cloning subrepo s from $TESTTMP/t/s
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
276 cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
18720
0ade08dcb3c3 tests: remove glob lines which unnecessary match / for \ on windows
Simon Heimberg <simohe@besonet.ch>
parents: 18631
diff changeset
277 cloning subrepo t from $TESTTMP/t/t
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
278 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
279 $ cd tc
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
280 $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
281 path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
282 source s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
283 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
284 path t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
285 source t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
286 revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
287
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
288 push
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
289
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
290 $ echo bah > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
291 $ hg ci -m11
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
292 committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
293 $ hg push
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
294 pushing to $TESTTMP/t (glob)
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
295 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
296 no changes made to subrepo s since last push to $TESTTMP/t/s
18720
0ade08dcb3c3 tests: remove glob lines which unnecessary match / for \ on windows
Simon Heimberg <simohe@besonet.ch>
parents: 18631
diff changeset
297 pushing subrepo t to $TESTTMP/t/t
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
298 searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
299 adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
300 adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
301 adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
302 added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
303 searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
304 adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
305 adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
306 adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
307 added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
308
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
309 push -f
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
310
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
311 $ echo bah > s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
312 $ hg ci -m12
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
313 committing subrepository s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
314 $ hg push
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
315 pushing to $TESTTMP/t (glob)
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
316 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
18720
0ade08dcb3c3 tests: remove glob lines which unnecessary match / for \ on windows
Simon Heimberg <simohe@besonet.ch>
parents: 18631
diff changeset
317 pushing subrepo s to $TESTTMP/t/s
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
318 searching for changes
18109
9e3910db4e78 subrepo: append subrepo path to subrepo error messages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17938
diff changeset
319 abort: push creates new remote head 12a213df6fa9! (in subrepo s)
19934
bfc6ed892349 push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
320 (merge or see "hg help push" for details about pushing new heads)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
321 [255]
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
322 $ hg push -f
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
323 pushing to $TESTTMP/t (glob)
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
324 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
325 searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
326 no changes found
18720
0ade08dcb3c3 tests: remove glob lines which unnecessary match / for \ on windows
Simon Heimberg <simohe@besonet.ch>
parents: 18631
diff changeset
327 pushing subrepo s to $TESTTMP/t/s
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
328 searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
329 adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
330 adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
331 adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
332 added 1 changesets with 1 changes to 1 files (+1 heads)
18720
0ade08dcb3c3 tests: remove glob lines which unnecessary match / for \ on windows
Simon Heimberg <simohe@besonet.ch>
parents: 18631
diff changeset
333 pushing subrepo t to $TESTTMP/t/t
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
334 searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
335 no changes found
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
336 searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
337 adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
338 adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
339 adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
340 added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
341
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
342 check that unmodified subrepos are not pushed
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
343
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
344 $ hg clone . ../tcc
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
345 updating to branch default
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
346 cloning subrepo s from $TESTTMP/tc/s
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
347 cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
348 cloning subrepo t from $TESTTMP/tc/t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
349 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
350
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
351 the subrepos on the new clone have nothing to push to its source
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
352
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
353 $ hg push -R ../tcc .
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
354 pushing to .
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
355 no changes made to subrepo s/ss since last push to s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
356 no changes made to subrepo s since last push to s
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
357 no changes made to subrepo t since last push to t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
358 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
359 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
360 [1]
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
361
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
362 the subrepos on the source do not have a clean store versus the clone target
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
363 because they were never explicitly pushed to the source
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
364
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
365 $ hg push ../tcc
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
366 pushing to ../tcc
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
367 pushing subrepo s/ss to ../tcc/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
368 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
369 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
370 pushing subrepo s to ../tcc/s
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
371 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
372 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
373 pushing subrepo t to ../tcc/t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
374 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
375 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
376 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
377 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
378 [1]
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
379
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
380 after push their stores become clean
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
381
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
382 $ hg push ../tcc
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
383 pushing to ../tcc
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
384 no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
385 no changes made to subrepo s since last push to ../tcc/s
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
386 no changes made to subrepo t since last push to ../tcc/t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
387 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
388 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
389 [1]
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
390
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
391 updating a subrepo to a different revision or changing
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
392 its working directory does not make its store dirty
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
393
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
394 $ hg -R s update '.^'
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
395 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
396 $ hg push
19218
475a4b13263f tests: backport some glob fixups
Matt Mackall <mpm@selenic.com>
parents: 19165
diff changeset
397 pushing to $TESTTMP/t (glob)
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
398 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
399 no changes made to subrepo s since last push to $TESTTMP/t/s
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
400 no changes made to subrepo t since last push to $TESTTMP/t/t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
401 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
402 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
403 [1]
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
404 $ echo foo >> s/a
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
405 $ hg push
19218
475a4b13263f tests: backport some glob fixups
Matt Mackall <mpm@selenic.com>
parents: 19165
diff changeset
406 pushing to $TESTTMP/t (glob)
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
407 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
408 no changes made to subrepo s since last push to $TESTTMP/t/s
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
409 no changes made to subrepo t since last push to $TESTTMP/t/t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
410 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
411 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
412 [1]
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
413 $ hg -R s update -C tip
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
414 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
415
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
416 committing into a subrepo makes its store (but not its parent's store) dirty
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
417
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
418 $ echo foo >> s/ss/a
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
419 $ hg -R s/ss commit -m 'test dirty store detection'
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
420 $ hg push
19218
475a4b13263f tests: backport some glob fixups
Matt Mackall <mpm@selenic.com>
parents: 19165
diff changeset
421 pushing to $TESTTMP/t (glob)
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
422 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
423 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
424 adding changesets
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
425 adding manifests
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
426 adding file changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
427 added 1 changesets with 1 changes to 1 files
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
428 no changes made to subrepo s since last push to $TESTTMP/t/s
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
429 no changes made to subrepo t since last push to $TESTTMP/t/t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
430 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
431 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
432 [1]
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
433
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
434 a subrepo store may be clean versus one repo but not versus another
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
435
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
436 $ hg push
19218
475a4b13263f tests: backport some glob fixups
Matt Mackall <mpm@selenic.com>
parents: 19165
diff changeset
437 pushing to $TESTTMP/t (glob)
19117
a6542a670ece tests: sprinkle globs over largefiles/subrepo tests for Windows
Brendan Cully <brendan@kublai.com>
parents: 18965
diff changeset
438 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
439 no changes made to subrepo s since last push to $TESTTMP/t/s
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
440 no changes made to subrepo t since last push to $TESTTMP/t/t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
441 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
442 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
443 [1]
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
444 $ hg push ../tcc
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
445 pushing to ../tcc
19165
98406218117a tests: fix another Windows path issue
Matt Mackall <mpm@selenic.com>
parents: 19117
diff changeset
446 pushing subrepo s/ss to ../tcc/s/ss (glob)
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
447 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
448 adding changesets
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
449 adding manifests
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
450 adding file changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
451 added 1 changesets with 1 changes to 1 files
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
452 no changes made to subrepo s since last push to ../tcc/s
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
453 no changes made to subrepo t since last push to ../tcc/t
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
454 searching for changes
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
455 no changes found
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
456 [1]
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
457
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
458 update
10177
5ca0d220ae21 subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents: 8816
diff changeset
459
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
460 $ cd ../t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
461 $ hg up -C # discard our earlier merge
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
462 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
463 $ echo blah > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
464 $ hg ci -m13
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
465 committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
466
18943
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
467 backout calls revert internally with minimal opts, which should not raise
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
468 KeyError
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
469
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
470 $ hg backout ".^"
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
471 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
472
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
473 $ hg up -C # discard changes
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
474 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27e8dfc2c338 subrepo: fix exception on revert when "all" option is omitted
Yuya Nishihara <yuya@tcha.org>
parents: 18941
diff changeset
475
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
476 pull
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
477
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
478 $ cd ../tc
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
479 $ hg pull
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
480 pulling from $TESTTMP/t (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
481 searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
482 adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
483 adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
484 adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
485 added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
486 (run 'hg update' to get a working copy)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
487
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
488 should pull t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
489
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
490 $ hg up
18720
0ade08dcb3c3 tests: remove glob lines which unnecessary match / for \ on windows
Simon Heimberg <simohe@besonet.ch>
parents: 18631
diff changeset
491 pulling subrepo t from $TESTTMP/t/t
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
492 searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
493 adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
494 adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
495 adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
496 added 1 changesets with 1 changes to 1 files
18941
cb5f5859b3fd test-subrepo: add tests for subrepo "storeclean" checks
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18720
diff changeset
497 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
498 $ cat t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
499 blah
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
500
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
501 bogus subrepo path aborts
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
502
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
503 $ echo 'bogus=[boguspath' >> .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
504 $ hg ci -m 'bogus subrepo path'
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
505 abort: missing ] in subrepo source
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
506 [255]
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
507
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
508 Issue1986: merge aborts when trying to merge a subrepo that
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
509 shouldn't need merging
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
510
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
511 # subrepo layout
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
512 #
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
513 # o 5 br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
514 # /|
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
515 # o | 4 default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
516 # | |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
517 # | o 3 br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
518 # |/|
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
519 # o | 2 default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
520 # | |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
521 # | o 1 br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
522 # |/
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
523 # o 0 default
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
524
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
525 $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
526 $ rm -rf sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
527 $ hg init main
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
528 $ cd main
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
529 $ hg init s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
530 $ cd s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
531 $ echo a > a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
532 $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
533 adding a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
534 $ hg branch br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
535 marked working directory as branch br
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15321
diff changeset
536 (branches are permanent and global, did you want a bookmark?)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
537 $ echo a >> a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
538 $ hg ci -m1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
539 $ hg up default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
540 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
541 $ echo b > b
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
542 $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
543 adding b
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
544 $ hg up br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
545 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
546 $ hg merge tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
547 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
548 (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
549 $ hg ci -m1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
550 $ hg up 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
551 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
552 $ echo c > c
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
553 $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
554 adding c
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
555 $ hg up 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
556 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
557 $ hg merge 4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
558 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
559 (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
560 $ hg ci -m1
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
561
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
562 # main repo layout:
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
563 #
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
564 # * <-- try to merge default into br again
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
565 # .`|
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
566 # . o 5 br --> substate = 5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
567 # . |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
568 # o | 4 default --> substate = 4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
569 # | |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
570 # | o 3 br --> substate = 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
571 # |/|
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
572 # o | 2 default --> substate = 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
573 # | |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
574 # | o 1 br --> substate = 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
575 # |/
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
576 # o 0 default --> substate = 2
10378
e1401c74572f subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents: 10252
diff changeset
577
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
578 $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
579 $ echo 's = s' > .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
580 $ hg -R s up 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
581 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
582 $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
583 adding .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
584 $ hg branch br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
585 marked working directory as branch br
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15321
diff changeset
586 (branches are permanent and global, did you want a bookmark?)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
587 $ echo b > b
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
588 $ hg -R s up 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
589 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
590 $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
591 adding b
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
592 $ hg up default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
593 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
594 $ echo c > c
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
595 $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
596 adding c
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
597 $ hg up 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
598 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
599 $ hg merge 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
600 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
601 (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
602 $ hg ci -m1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
603 $ hg up 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
604 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
605 $ hg -R s up 4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
606 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
607 $ echo d > d
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
608 $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
609 adding d
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
610 $ hg up 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
611 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
612 $ hg -R s up 5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
613 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
614 $ echo e > e
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
615 $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
616 adding e
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
617
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
618 $ hg up 5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
619 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
620 $ hg merge 4 # try to merge default into br again
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
621 subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
622 (M)erge, keep (l)ocal or keep (r)emote? m
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
623 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
624 (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
625 $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
626
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
627 test subrepo delete from .hgsubstate
10522
b07d487009b2 subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents: 10468
diff changeset
628
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
629 $ hg init testdelete
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
630 $ mkdir testdelete/nested testdelete/nested2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
631 $ hg init testdelete/nested
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
632 $ hg init testdelete/nested2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
633 $ echo test > testdelete/nested/foo
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
634 $ echo test > testdelete/nested2/foo
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
635 $ hg -R testdelete/nested add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
636 adding testdelete/nested/foo (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
637 $ hg -R testdelete/nested2 add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
638 adding testdelete/nested2/foo (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
639 $ hg -R testdelete/nested ci -m test
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
640 $ hg -R testdelete/nested2 ci -m test
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
641 $ echo nested = nested > testdelete/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
642 $ echo nested2 = nested2 >> testdelete/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
643 $ hg -R testdelete add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
644 adding testdelete/.hgsub (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
645 $ hg -R testdelete ci -m "nested 1 & 2 added"
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
646 $ echo nested = nested > testdelete/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
647 $ hg -R testdelete ci -m "nested 2 deleted"
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
648 $ cat testdelete/.hgsubstate
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
649 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
650 $ hg -R testdelete remove testdelete/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
651 $ hg -R testdelete ci -m ".hgsub deleted"
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
652 $ cat testdelete/.hgsubstate
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
653 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
654
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
655 test repository cloning
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
656
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
657 $ mkdir mercurial mercurial2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
658 $ hg init nested_absolute
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
659 $ echo test > nested_absolute/foo
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
660 $ hg -R nested_absolute add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
661 adding nested_absolute/foo (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
662 $ hg -R nested_absolute ci -mtest
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
663 $ cd mercurial
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
664 $ hg init nested_relative
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
665 $ echo test2 > nested_relative/foo2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
666 $ hg -R nested_relative add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
667 adding nested_relative/foo2 (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
668 $ hg -R nested_relative ci -mtest2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
669 $ hg init main
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
670 $ echo "nested_relative = ../nested_relative" > main/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
671 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
672 $ hg -R main add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
673 adding main/.hgsub (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
674 $ hg -R main ci -m "add subrepos"
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
675 $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
676 $ hg clone mercurial/main mercurial2/main
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
677 updating to branch default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
678 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
679 $ cat mercurial2/main/nested_absolute/.hg/hgrc \
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
680 > mercurial2/main/nested_relative/.hg/hgrc
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
681 [paths]
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
682 default = $TESTTMP/mercurial/nested_absolute
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
683 [paths]
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
684 default = $TESTTMP/mercurial/nested_relative
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
685 $ rm -rf mercurial mercurial2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
686
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
687 Issue1977: multirepo push should fail if subrepo push fails
11069
12f04d18143e subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 10775
diff changeset
688
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
689 $ hg init repo
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
690 $ hg init repo/s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
691 $ echo a > repo/s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
692 $ hg -R repo/s ci -Am0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
693 adding a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
694 $ echo s = s > repo/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
695 $ hg -R repo ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
696 adding .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
697 $ hg clone repo repo2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
698 updating to branch default
18720
0ade08dcb3c3 tests: remove glob lines which unnecessary match / for \ on windows
Simon Heimberg <simohe@besonet.ch>
parents: 18631
diff changeset
699 cloning subrepo s from $TESTTMP/repo/s
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
700 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
701 $ hg -q -R repo2 pull -u
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
702 $ echo 1 > repo2/s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
703 $ hg -R repo2/s ci -m2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
704 $ hg -q -R repo2/s push
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
705 $ hg -R repo2/s up -C 0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
706 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17895
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
707 $ echo 2 > repo2/s/b
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
708 $ hg -R repo2/s ci -m3 -A
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
709 adding b
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
710 created new head
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
711 $ hg -R repo2 ci -m3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
712 $ hg -q -R repo2 push
18109
9e3910db4e78 subrepo: append subrepo path to subrepo error messages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17938
diff changeset
713 abort: push creates new remote head cc505f09a8b2! (in subrepo s)
19934
bfc6ed892349 push: hide description about "-f" in the hint to prevent from using it easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
714 (merge or see "hg help push" for details about pushing new heads)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
715 [255]
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
716 $ hg -R repo update
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
717 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
17895
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
718
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
719 test if untracked file is not overwritten
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
720
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
721 $ echo issue3276_ok > repo/s/b
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
722 $ hg -R repo2 push -f -q
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
723 $ hg -R repo update
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
724 b: untracked file differs
18109
9e3910db4e78 subrepo: append subrepo path to subrepo error messages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17938
diff changeset
725 abort: untracked files in working directory differ from files in requested revision (in subrepo s)
17895
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
726 [255]
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
727
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
728 $ cat repo/s/b
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
729 issue3276_ok
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
730 $ rm repo/s/b
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
731 $ hg -R repo revert --all
17907
ce2c709a8e90 test-subrepo: adapt for Windows after 17c030014ddf
Adrian Buehlmann <adrian@cadifra.com>
parents: 17895
diff changeset
732 reverting repo/.hgsubstate (glob)
17895
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
733 reverting subrepo s
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
734 $ hg -R repo update
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
735 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
736 $ cat repo/s/b
17c030014ddf subrepo: only do clean update when overwrite is set (issue3276)
Simon Heimberg <simohe@besonet.ch>
parents: 17345
diff changeset
737 2
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
738 $ rm -rf repo2 repo
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
739
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
740
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
741 Issue1852 subrepos with relative paths always push/pull relative to default
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
742
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
743 Prepare a repo with subrepo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
744
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
745 $ hg init issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
746 $ cd issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
747 $ hg init sub/repo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
748 $ echo test > sub/repo/foo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
749 $ hg -R sub/repo add sub/repo/foo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
750 $ echo sub/repo = sub/repo > .hgsub
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
751 $ hg add .hgsub
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
752 $ hg ci -mtest
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
753 committing subrepository sub/repo (glob)
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
754 $ echo test >> sub/repo/foo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
755 $ hg ci -mtest
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
756 committing subrepository sub/repo (glob)
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
757 $ cd ..
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
758
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
759 Create repo without default path, pull top repo, and see what happens on update
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
760
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
761 $ hg init issue1852b
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
762 $ hg -R issue1852b pull issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
763 pulling from issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
764 requesting all changes
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
765 adding changesets
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
766 adding manifests
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
767 adding file changes
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
768 added 2 changesets with 3 changes to 2 files
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
769 (run 'hg update' to get a working copy)
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
770 $ hg -R issue1852b update
18109
9e3910db4e78 subrepo: append subrepo path to subrepo error messages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17938
diff changeset
771 abort: default path for subrepository not found (in subrepo sub/repo) (glob)
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
772 [255]
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
773
18965
0062508b1900 ui: add support for fully printing chained exception stacks in ui.traceback()
Matt Harbison <matt_harbison@yahoo.com>
parents: 18943
diff changeset
774 Ensure a full traceback, not just the SubrepoAbort part
0062508b1900 ui: add support for fully printing chained exception stacks in ui.traceback()
Matt Harbison <matt_harbison@yahoo.com>
parents: 18943
diff changeset
775
0062508b1900 ui: add support for fully printing chained exception stacks in ui.traceback()
Matt Harbison <matt_harbison@yahoo.com>
parents: 18943
diff changeset
776 $ hg -R issue1852b update --traceback 2>&1 | grep 'raise util\.Abort'
0062508b1900 ui: add support for fully printing chained exception stacks in ui.traceback()
Matt Harbison <matt_harbison@yahoo.com>
parents: 18943
diff changeset
777 raise util.Abort(_("default path for subrepository not found"))
0062508b1900 ui: add support for fully printing chained exception stacks in ui.traceback()
Matt Harbison <matt_harbison@yahoo.com>
parents: 18943
diff changeset
778
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
779 Pull -u now doesn't help
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
780
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
781 $ hg -R issue1852b pull -u issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
782 pulling from issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
783 searching for changes
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
784 no changes found
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
785
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
786 Try the same, but with pull -u
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
787
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
788 $ hg init issue1852c
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
789 $ hg -R issue1852c pull -r0 -u issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
790 pulling from issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
791 adding changesets
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
792 adding manifests
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
793 adding file changes
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
794 added 1 changesets with 2 changes to 2 files
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
795 cloning subrepo sub/repo from issue1852a/sub/repo (glob)
12852
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
796 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
797
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
798 Try to push from the other side
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
799
12852
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
800 $ hg -R issue1852a push `pwd`/issue1852c
19218
475a4b13263f tests: backport some glob fixups
Matt Mackall <mpm@selenic.com>
parents: 19165
diff changeset
801 pushing to $TESTTMP/issue1852c (glob)
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
802 pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
12852
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
803 searching for changes
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
804 no changes found
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
805 searching for changes
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
806 adding changesets
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
807 adding manifests
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
808 adding file changes
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
809 added 1 changesets with 1 changes to 1 files
13233
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
810
14360
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
811 Incoming and outgoing should not use the default path:
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
812
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
813 $ hg clone -q issue1852a issue1852d
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
814 $ hg -R issue1852d outgoing --subrepos issue1852c
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
815 comparing with issue1852c
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
816 searching for changes
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
817 no changes found
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
818 comparing with issue1852c/sub/repo
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
819 searching for changes
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
820 no changes found
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
821 [1]
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
822 $ hg -R issue1852d incoming --subrepos issue1852c
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
823 comparing with issue1852c
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
824 searching for changes
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
825 no changes found
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
826 comparing with issue1852c/sub/repo
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
827 searching for changes
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
828 no changes found
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
829 [1]
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
830
13233
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
831 Check status of files when none of them belong to the first
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
832 subrepository:
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
833
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
834 $ hg init subrepo-status
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
835 $ cd subrepo-status
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
836 $ hg init subrepo-1
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
837 $ hg init subrepo-2
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
838 $ cd subrepo-2
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
839 $ touch file
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
840 $ hg add file
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
841 $ cd ..
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
842 $ echo subrepo-1 = subrepo-1 > .hgsub
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
843 $ echo subrepo-2 = subrepo-2 >> .hgsub
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
844 $ hg add .hgsub
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
845 $ hg ci -m 'Added subrepos'
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
846 committing subrepository subrepo-2
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
847 $ hg st subrepo-2/file
13322
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
848
17938
fd903f89e42b share: always set default path to work with subrepos (issue3518)
simon@laptop-tosh
parents: 17907
diff changeset
849 Check that share works with subrepo
fd903f89e42b share: always set default path to work with subrepos (issue3518)
simon@laptop-tosh
parents: 17907
diff changeset
850 $ hg --config extensions.share= share . ../shared
fd903f89e42b share: always set default path to work with subrepos (issue3518)
simon@laptop-tosh
parents: 17907
diff changeset
851 updating working directory
fd903f89e42b share: always set default path to work with subrepos (issue3518)
simon@laptop-tosh
parents: 17907
diff changeset
852 cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2
fd903f89e42b share: always set default path to work with subrepos (issue3518)
simon@laptop-tosh
parents: 17907
diff changeset
853 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd903f89e42b share: always set default path to work with subrepos (issue3518)
simon@laptop-tosh
parents: 17907
diff changeset
854 $ test -f ../shared/subrepo-1/.hg/sharedpath
fd903f89e42b share: always set default path to work with subrepos (issue3518)
simon@laptop-tosh
parents: 17907
diff changeset
855 [1]
18510
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
856 $ hg -R ../shared in
18511
798ab869b2ee share: backout fd903f89e42b, except the test
Matt Harbison <matt_harbison@yahoo.com>
parents: 18510
diff changeset
857 abort: repository default not found!
798ab869b2ee share: backout fd903f89e42b, except the test
Matt Harbison <matt_harbison@yahoo.com>
parents: 18510
diff changeset
858 [255]
18510
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
859 $ hg -R ../shared/subrepo-2 showconfig paths
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
860 paths.default=$TESTTMP/subrepo-status/subrepo-2
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
861 $ hg -R ../shared/subrepo-1 sum --remote
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
862 parent: -1:000000000000 tip (empty repository)
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
863 branch: default
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
864 commit: (clean)
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
865 update: (current)
f254ab6207ae subrepo: use sharepath if available when locating the source repo
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
866 remote: (synced)
17938
fd903f89e42b share: always set default path to work with subrepos (issue3518)
simon@laptop-tosh
parents: 17907
diff changeset
867
13322
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
868 Check hg update --clean
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
869 $ cd $TESTTMP/t
13322
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
870 $ rm -r t/t.orig
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
871 $ hg status -S --all
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
872 C .hgsub
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
873 C .hgsubstate
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
874 C a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
875 C s/.hgsub
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
876 C s/.hgsubstate
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
877 C s/a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
878 C s/ss/a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
879 C t/t
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
880 $ echo c1 > s/a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
881 $ cd s
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
882 $ echo c1 > b
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
883 $ echo c1 > c
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
884 $ hg add b
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
885 $ cd ..
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
886 $ hg status -S
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
887 M s/a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
888 A s/b
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
889 ? s/c
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
890 $ hg update -C
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
891 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
892 $ hg status -S
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
893 ? s/b
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
894 ? s/c
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
895
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
896 Sticky subrepositories, no changes
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
897 $ cd $TESTTMP/t
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
898 $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
899 925c17564ef8 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
900 $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
901 12a213df6fa9 tip
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
902 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
903 52c0adc0515a tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
904 $ hg update 11
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
905 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
906 $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
907 365661e5936a
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
908 $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
909 fc627a69481f
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
910 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
911 e95bcfa18a35
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
912
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
913 Sticky subrepositorys, file changes
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
914 $ touch s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
915 $ touch t/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
916 $ hg add -S s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
917 $ hg add -S t/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
918 $ hg id
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
919 365661e5936a+
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
920 $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
921 fc627a69481f+
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
922 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
923 e95bcfa18a35+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
924 $ hg update tip
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
925 subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
926 (M)erge, keep (l)ocal or keep (r)emote? m
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
927 subrepository sources for s differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
928 use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
929 l
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
930 subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
931 (M)erge, keep (l)ocal or keep (r)emote? m
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
932 subrepository sources for t differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
933 use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
934 l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
935 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
936 $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
937 925c17564ef8+ tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
938 $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
939 fc627a69481f+
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
940 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
941 e95bcfa18a35+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
942 $ hg update --clean tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
943 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
944
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
945 Sticky subrepository, revision updates
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
946 $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
947 925c17564ef8 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
948 $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
949 12a213df6fa9 tip
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
950 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
951 52c0adc0515a tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
952 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
953 $ hg update -r -2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
954 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
955 $ cd ../t
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
956 $ hg update -r 2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
957 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
958 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
959 $ hg update 10
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
960 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
961 (M)erge, keep (l)ocal or keep (r)emote? m
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
962 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
963 (M)erge, keep (l)ocal or keep (r)emote? m
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
964 subrepository sources for t differ (in checked out version)
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
965 use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
966 l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
967 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
968 $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
969 e45c8b14af55+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
970 $ hg -R s id
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
971 02dcf1d70411
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
972 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
973 7af322bc1198
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
974
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
975 Sticky subrepository, file changes and revision updates
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
976 $ touch s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
977 $ touch t/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
978 $ hg add -S s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
979 $ hg add -S t/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
980 $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
981 e45c8b14af55+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
982 $ hg -R s id
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
983 02dcf1d70411+
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
984 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
985 7af322bc1198+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
986 $ hg update tip
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
987 subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
988 (M)erge, keep (l)ocal or keep (r)emote? m
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
989 subrepository sources for s differ
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
990 use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)?
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
991 l
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
992 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
993 (M)erge, keep (l)ocal or keep (r)emote? m
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
994 subrepository sources for t differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
995 use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
996 l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
997 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
998 $ hg id
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
999 925c17564ef8+ tip
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1000 $ hg -R s id
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 16912
diff changeset
1001 02dcf1d70411+
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
1002 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1003 7af322bc1198+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1004
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1005 Sticky repository, update --clean
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1006 $ hg update --clean tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1007 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1008 $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1009 925c17564ef8 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1010 $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1011 12a213df6fa9 tip
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
1012 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1013 52c0adc0515a tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1014
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1015 Test subrepo already at intended revision:
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1016 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1017 $ hg update fc627a69481f
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1018 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1019 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1020 $ hg update 11
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
1021 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19225
diff changeset
1022 (M)erge, keep (l)ocal or keep (r)emote? m
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1023 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1024 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1025 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1026 11+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1027 $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1028 fc627a69481f
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
1029 $ hg -R t id
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
1030 e95bcfa18a35
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1031
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1032 Test that removing .hgsubstate doesn't break anything:
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1033
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1034 $ hg rm -f .hgsubstate
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1035 $ hg ci -mrm
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1036 nothing changed
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1037 [1]
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1038 $ hg log -vr tip
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1039 changeset: 13:925c17564ef8
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1040 tag: tip
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1041 user: test
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1042 date: Thu Jan 01 00:00:00 1970 +0000
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1043 files: .hgsubstate
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1044 description:
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1045 13
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1046
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1047
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1048
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1049 Test that removing .hgsub removes .hgsubstate:
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1050
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1051 $ hg rm .hgsub
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1052 $ hg ci -mrm2
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1053 created new head
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1054 $ hg log -vr tip
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1055 changeset: 14:2400bccd50af
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1056 tag: tip
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1057 parent: 11:365661e5936a
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1058 user: test
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1059 date: Thu Jan 01 00:00:00 1970 +0000
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1060 files: .hgsub .hgsubstate
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1061 description:
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1062 rm2
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1063
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
1064
15635
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1065 Test issue3153: diff -S with deleted subrepos
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1066
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1067 $ hg diff --nodates -S -c .
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1068 diff -r 365661e5936a -r 2400bccd50af .hgsub
15635
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1069 --- a/.hgsub
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1070 +++ /dev/null
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1071 @@ -1,2 +0,0 @@
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1072 -s = s
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1073 -t = t
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
1074 diff -r 365661e5936a -r 2400bccd50af .hgsubstate
15635
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1075 --- a/.hgsubstate
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1076 +++ /dev/null
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1077 @@ -1,2 +0,0 @@
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1078 -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
1079 -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
15636
4841035f37b6 merge with stable
Martin Geisler <mg@lazybytes.net>
parents: 15625 15635
diff changeset
1080
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1081 Test behavior of add for explicit path in subrepo:
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1082 $ cd ..
15473
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1083 $ hg init explicit
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1084 $ cd explicit
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1085 $ echo s = s > .hgsub
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1086 $ hg add .hgsub
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1087 $ hg init s
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1088 $ hg ci -m0
15410
9e99d2bbb1b1 add: support adding explicit files in subrepos
David M. Carr <david@carrclan.us>
parents: 15409
diff changeset
1089 Adding with an explicit path in a subrepo adds the file
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1090 $ echo c1 > f1
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1091 $ echo c2 > s/f2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1092 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1093 ? f1
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1094 ? s/f2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1095 $ hg add s/f2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1096 $ hg st -S
15410
9e99d2bbb1b1 add: support adding explicit files in subrepos
David M. Carr <david@carrclan.us>
parents: 15409
diff changeset
1097 A s/f2
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1098 ? f1
15410
9e99d2bbb1b1 add: support adding explicit files in subrepos
David M. Carr <david@carrclan.us>
parents: 15409
diff changeset
1099 $ hg ci -R s -m0
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1100 $ hg ci -Am1
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1101 adding f1
15410
9e99d2bbb1b1 add: support adding explicit files in subrepos
David M. Carr <david@carrclan.us>
parents: 15409
diff changeset
1102 Adding with an explicit path in a subrepo with -S has the same behavior
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1103 $ echo c3 > f3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1104 $ echo c4 > s/f4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1105 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1106 ? f3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1107 ? s/f4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1108 $ hg add -S s/f4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1109 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1110 A s/f4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1111 ? f3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1112 $ hg ci -R s -m1
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1113 $ hg ci -Ama2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1114 adding f3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1115 Adding without a path or pattern silently ignores subrepos
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1116 $ echo c5 > f5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1117 $ echo c6 > s/f6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1118 $ echo c7 > s/f7
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1119 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1120 ? f5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1121 ? s/f6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1122 ? s/f7
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1123 $ hg add
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1124 adding f5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1125 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1126 A f5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1127 ? s/f6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1128 ? s/f7
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1129 $ hg ci -R s -Am2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1130 adding f6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1131 adding f7
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1132 $ hg ci -m3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1133 Adding without a path or pattern with -S also adds files in subrepos
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1134 $ echo c8 > f8
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1135 $ echo c9 > s/f9
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1136 $ echo c10 > s/f10
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1137 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1138 ? f8
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1139 ? s/f10
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1140 ? s/f9
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1141 $ hg add -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1142 adding f8
15520
d6d7b56ec346 tests: add missing '(glob)'s to match '\' in paths in test output on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 15474
diff changeset
1143 adding s/f10 (glob)
d6d7b56ec346 tests: add missing '(glob)'s to match '\' in paths in test output on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 15474
diff changeset
1144 adding s/f9 (glob)
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1145 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1146 A f8
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1147 A s/f10
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1148 A s/f9
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1149 $ hg ci -R s -m3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1150 $ hg ci -m4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1151 Adding with a pattern silently ignores subrepos
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1152 $ echo c11 > fm11
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1153 $ echo c12 > fn12
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1154 $ echo c13 > s/fm13
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1155 $ echo c14 > s/fn14
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1156 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1157 ? fm11
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1158 ? fn12
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1159 ? s/fm13
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1160 ? s/fn14
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1161 $ hg add 'glob:**fm*'
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1162 adding fm11
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1163 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1164 A fm11
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1165 ? fn12
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1166 ? s/fm13
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1167 ? s/fn14
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1168 $ hg ci -R s -Am4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1169 adding fm13
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1170 adding fn14
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1171 $ hg ci -Am5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1172 adding fn12
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1173 Adding with a pattern with -S also adds matches in subrepos
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1174 $ echo c15 > fm15
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1175 $ echo c16 > fn16
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1176 $ echo c17 > s/fm17
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1177 $ echo c18 > s/fn18
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1178 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1179 ? fm15
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1180 ? fn16
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1181 ? s/fm17
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1182 ? s/fn18
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1183 $ hg add -S 'glob:**fm*'
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1184 adding fm15
15520
d6d7b56ec346 tests: add missing '(glob)'s to match '\' in paths in test output on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 15474
diff changeset
1185 adding s/fm17 (glob)
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1186 $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1187 A fm15
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1188 A s/fm17
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1189 ? fn16
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1190 ? s/fn18
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1191 $ hg ci -R s -Am5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1192 adding fn18
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1193 $ hg ci -Am6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
1194 adding fn16
15473
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1195
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1196 Test behavior of forget for explicit path in subrepo:
15474
95174c381525 forget: support forgetting explicit paths in subrepos
David M. Carr <david@carrclan.us>
parents: 15473
diff changeset
1197 Forgetting an explicit path in a subrepo untracks the file
15473
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1198 $ echo c19 > s/f19
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1199 $ hg add s/f19
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1200 $ hg st -S
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1201 A s/f19
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1202 $ hg forget s/f19
15474
95174c381525 forget: support forgetting explicit paths in subrepos
David M. Carr <david@carrclan.us>
parents: 15473
diff changeset
1203 $ hg st -S
95174c381525 forget: support forgetting explicit paths in subrepos
David M. Carr <david@carrclan.us>
parents: 15473
diff changeset
1204 ? s/f19
15473
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
1205 $ rm s/f19
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
1206 $ cd ..
18520
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1207
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1208 Courtesy phases synchronisation to publishing server does not block the push
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1209 (issue3781)
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1210
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1211 $ cp -r main issue3781
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1212 $ cp -r main issue3781-dest
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1213 $ cd issue3781-dest/s
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1214 $ hg phase tip # show we have draft changeset
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1215 5: draft
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1216 $ chmod a-w .hg/store/phaseroots # prevent phase push
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1217 $ cd ../../issue3781
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1218 $ cat >> .hg/hgrc << EOF
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1219 > [paths]
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1220 > default=../issue3781-dest/
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1221 > EOF
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1222 $ hg push
18555
b31e0be96c79 tests: fix windows test failure in test-subrepo.t
Mads Kiilerich <madski@unity3d.com>
parents: 18520
diff changeset
1223 pushing to $TESTTMP/issue3781-dest (glob)
18520
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1224 pushing subrepo s to $TESTTMP/issue3781-dest/s
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1225 searching for changes
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1226 no changes found
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1227 searching for changes
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1228 no changes found
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1229 [1]
20176
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1230 $ cd ..
18520
751135cca13c subrepo: allows to drop courtesy phase sync (issue3781)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18511
diff changeset
1231
20176
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1232 Test phase choice for newly created commit with "phases.subrepochecks"
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1233 configuration
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1234
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1235 $ cd t
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1236 $ hg update -q -r 12
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1237
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1238 $ cat >> s/ss/.hg/hgrc <<EOF
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1239 > [phases]
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1240 > new-commit = secret
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1241 > EOF
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1242 $ cat >> s/.hg/hgrc <<EOF
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1243 > [phases]
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1244 > new-commit = draft
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1245 > EOF
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1246 $ echo phasecheck1 >> s/ss/a
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1247 $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1248 committing subrepository ss
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1249 transaction abort!
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1250 rollback completed
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1251 abort: can't commit in draft phase conflicting secret from subrepository ss
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1252 [255]
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1253 $ echo phasecheck2 >> s/ss/a
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1254 $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1255 committing subrepository ss
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1256 $ hg -R s/ss phase tip
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1257 3: secret
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1258 $ hg -R s phase tip
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1259 6: draft
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1260 $ echo phasecheck3 >> s/ss/a
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1261 $ hg -R s commit -S -m phasecheck3
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1262 committing subrepository ss
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1263 warning: changes are committed in secret phase from subrepository ss
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1264 $ hg -R s/ss phase tip
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1265 4: secret
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1266 $ hg -R s phase tip
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1267 7: secret
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1268
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1269 $ cat >> t/.hg/hgrc <<EOF
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1270 > [phases]
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1271 > new-commit = draft
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1272 > EOF
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1273 $ cat >> .hg/hgrc <<EOF
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1274 > [phases]
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1275 > new-commit = public
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1276 > EOF
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1277 $ echo phasecheck4 >> s/ss/a
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1278 $ echo phasecheck4 >> t/t
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1279 $ hg commit -S -m phasecheck4
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1280 committing subrepository s
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1281 committing subrepository s/ss
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1282 warning: changes are committed in secret phase from subrepository ss
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1283 committing subrepository t
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1284 warning: changes are committed in secret phase from subrepository s
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1285 created new head
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1286 $ hg -R s/ss phase tip
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1287 5: secret
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1288 $ hg -R s phase tip
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1289 8: secret
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1290 $ hg -R t phase tip
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1291 6: draft
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1292 $ hg phase tip
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1293 15: secret
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1294
4c96c50ef937 subrepo: check phase of state in each subrepositories before committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19934
diff changeset
1295 $ cd ..