annotate tests/test-subrepo-git.t @ 23542:8b5adc6b72ae

tests: allow more flexibility in git diffstat output The output of 'git diff --stat' changed in git 1.7.10 and 1.7.11. To ensure the tests work with earlier versions of git as well, the output is now wrapped with a whitespace regex.
author Mathias De Maré <mathias.demare@gmail.com>
date Sat, 13 Dec 2014 09:45:00 +0100
parents 01a8dfc79cdc
children 7fa2189c1e87
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 21751
diff changeset
1 #require git
12992
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
2
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
3 make git commits repeatable
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
4
17022
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
5 $ echo "[core]" >> $HOME/.gitconfig
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
6 $ echo "autocrlf = false" >> $HOME/.gitconfig
12992
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
7 $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
8 $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
9 $ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
10 $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
11 $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
12 $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
13
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
14 root hg repo
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
15
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
16 $ hg init t
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
17 $ cd t
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
18 $ echo a > a
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
19 $ hg add a
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
20 $ hg commit -m a
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
21 $ cd ..
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
22
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
23 new external git repo
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
24
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
25 $ mkdir gitroot
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
26 $ cd gitroot
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
27 $ git init -q
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
28 $ echo g > g
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
29 $ git add g
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
30 $ git commit -q -m g
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
31
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
32 add subrepo clone
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
33
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
34 $ cd ../t
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
35 $ echo 's = [git]../gitroot' > .hgsub
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
36 $ git clone -q ../gitroot s
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
37 $ hg add .hgsub
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
38 $ hg commit -m 'new git subrepo'
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
39 $ hg debugsub
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
40 path s
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
41 source ../gitroot
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
42 revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
43
12995
d90fc91c8377 subrepo: update and merge works with any git branch
Eric Eisner <ede@mit.edu>
parents: 12994
diff changeset
44 record a new commit from upstream from a different branch
12992
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
45
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
46 $ cd ../gitroot
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
47 $ git checkout -q -b testing
12992
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
48 $ echo gg >> g
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
49 $ git commit -q -a -m gg
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
50
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
51 $ cd ../t/s
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
52 $ git pull -q >/dev/null 2>/dev/null
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
53 $ git checkout -q -b testing origin/testing >/dev/null
12992
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
54
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
55 $ cd ..
13182
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
56 $ hg status --subrepos
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
57 M s/g
12992
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
58 $ hg commit -m 'update git subrepo'
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
59 $ hg debugsub
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
60 path s
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
61 source ../gitroot
2b73a3279a9f subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff changeset
62 revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a
12993
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
63
13092
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
64 make $GITROOT pushable, by replacing it with a clone with nothing checked out
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
65
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
66 $ cd ..
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
67 $ git clone gitroot gitrootbare --bare -q
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
68 $ rm -rf gitroot
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
69 $ mv gitrootbare gitroot
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
70
12993
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
71 clone root
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
72
13092
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
73 $ cd t
20105
c5a0f899e47b tests: deal with new gits sending status messages to stderr
Mads Kiilerich <madski@unity3d.com>
parents: 19811
diff changeset
74 $ hg clone . ../tc 2> /dev/null
12993
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
75 updating to branch default
13525
c12088259f64 subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
76 cloning subrepo s from $TESTTMP/gitroot
12993
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
77 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
78 $ cd ../tc
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
79 $ hg debugsub
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
80 path s
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
81 source ../gitroot
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
82 revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
83
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
84 update to previous substate
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
85
13111
560b8001f765 subrepo: silence git output when ui.quiet is set
Eric Eisner <ede@mit.edu>
parents: 13092
diff changeset
86 $ hg update 1 -q
12993
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
87 $ cat s/g
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
88 g
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
89 $ hg debugsub
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
90 path s
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
91 source ../gitroot
a91334380699 subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents: 12992
diff changeset
92 revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
93
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
94 clone root, make local change
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
95
13092
83986af605e5 test-subrepo-git.t: make gitroot pushable earlier
Eric Eisner <ede@mit.edu>
parents: 13091
diff changeset
96 $ cd ../t
20105
c5a0f899e47b tests: deal with new gits sending status messages to stderr
Mads Kiilerich <madski@unity3d.com>
parents: 19811
diff changeset
97 $ hg clone . ../ta 2> /dev/null
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
98 updating to branch default
13525
c12088259f64 subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
99 cloning subrepo s from $TESTTMP/gitroot
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
100 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
101
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
102 $ cd ../ta
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
103 $ echo ggg >> s/g
13182
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
104 $ hg status --subrepos
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
105 M s/g
23523
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
106 $ hg diff --subrepos
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
107 diff --git a/s/g b/s/g
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
108 index 089258f..85341ee 100644
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
109 --- a/s/g
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
110 +++ b/s/g
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
111 @@ -1,2 +1,3 @@
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
112 g
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
113 gg
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
114 +ggg (no-eol)
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 14481
diff changeset
115 $ hg commit --subrepos -m ggg
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
116 committing subrepository s
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
117 $ hg debugsub
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
118 path s
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
119 source ../gitroot
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
120 revision 79695940086840c99328513acbe35f90fcd55e57
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
121
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
122 clone root separately, make different local change
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
123
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
124 $ cd ../t
20105
c5a0f899e47b tests: deal with new gits sending status messages to stderr
Mads Kiilerich <madski@unity3d.com>
parents: 19811
diff changeset
125 $ hg clone . ../tb 2> /dev/null
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
126 updating to branch default
13525
c12088259f64 subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
127 cloning subrepo s from $TESTTMP/gitroot
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
128 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
129
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
130 $ cd ../tb/s
23411
2d86f4e38c08 subrepo: add status support for ignored files in git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 22590
diff changeset
131 $ hg status --subrepos
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
132 $ echo f > f
23411
2d86f4e38c08 subrepo: add status support for ignored files in git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 22590
diff changeset
133 $ hg status --subrepos
2d86f4e38c08 subrepo: add status support for ignored files in git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 22590
diff changeset
134 ? s/f
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
135 $ git add f
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
136 $ cd ..
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
137
13182
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
138 $ hg status --subrepos
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
139 A s/f
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 14481
diff changeset
140 $ hg commit --subrepos -m f
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
141 committing subrepository s
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
142 $ hg debugsub
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
143 path s
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
144 source ../gitroot
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
145 revision aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
146
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
147 user b push changes
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
148
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
149 $ hg push 2>/dev/null
17022
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
150 pushing to $TESTTMP/t (glob)
13029
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
151 pushing branch testing of subrepo s
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
152 searching for changes
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
153 adding changesets
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
154 adding manifests
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
155 adding file changes
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
156 added 1 changesets with 1 changes to 1 files
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
157
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
158 user a pulls, merges, commits
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
159
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
160 $ cd ../ta
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
161 $ hg pull
17022
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
162 pulling from $TESTTMP/t (glob)
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
163 searching for changes
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
164 adding changesets
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
165 adding manifests
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
166 adding file changes
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
167 added 1 changesets with 1 changes to 1 files (+1 heads)
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
168 (run 'hg heads' to see heads, 'hg merge' to merge)
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
169 $ hg merge 2>/dev/null
21401
2c364f7801c8 subrepo: use subrepo shortid method to generate subrepo diverged promptchoice
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21024
diff changeset
170 subrepository s diverged (local revision: 7969594, remote revision: aa84837)
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19049
diff changeset
171 (M)erge, keep (l)ocal or keep (r)emote? m
13569
3ab3b892d223 subrepo: show the source that git pulls
Eric Eisner <ede@mit.edu>
parents: 13560
diff changeset
172 pulling subrepo s from $TESTTMP/gitroot
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
173 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
174 (branch merge, don't forget to commit)
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
175 $ cat s/f
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
176 f
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
177 $ cat s/g
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
178 g
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
179 gg
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
180 ggg
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 14481
diff changeset
181 $ hg commit --subrepos -m 'merge'
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
182 committing subrepository s
13182
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
183 $ hg status --subrepos --rev 1:5
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
184 M .hgsubstate
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
185 M s/g
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
186 A s/f
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
187 $ hg debugsub
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
188 path s
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
189 source ../gitroot
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
190 revision f47b465e1bce645dbf37232a00574aa1546ca8d3
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
191 $ hg push 2>/dev/null
17022
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
192 pushing to $TESTTMP/t (glob)
13029
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
193 pushing branch testing of subrepo s
12994
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
194 searching for changes
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
195 adding changesets
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
196 adding manifests
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
197 adding file changes
845c602b8635 subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents: 12993
diff changeset
198 added 2 changesets with 2 changes to 1 files
12996
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
199
13029
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
200 make upstream git changes
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
201
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
202 $ cd ..
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
203 $ git clone -q gitroot gitclone
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
204 $ cd gitclone
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
205 $ echo ff >> f
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
206 $ git commit -q -a -m ff
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
207 $ echo fff >> f
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
208 $ git commit -q -a -m fff
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
209 $ git push origin testing 2>/dev/null
13029
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
210
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
211 make and push changes to hg without updating the subrepo
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
212
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
213 $ cd ../t
20105
c5a0f899e47b tests: deal with new gits sending status messages to stderr
Mads Kiilerich <madski@unity3d.com>
parents: 19811
diff changeset
214 $ hg clone . ../td 2>&1 | egrep -v '^Cloning into|^done\.'
13029
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
215 updating to branch default
13525
c12088259f64 subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
216 cloning subrepo s from $TESTTMP/gitroot
13029
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
217 checking out detached HEAD in subrepo s
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
218 check out a git branch if you intend to make changes
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
219 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
220 $ cd ../td
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
221 $ echo aa >> a
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
222 $ hg commit -m aa
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
223 $ hg push
17022
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
224 pushing to $TESTTMP/t (glob)
13029
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
225 searching for changes
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
226 adding changesets
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
227 adding manifests
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
228 adding file changes
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
229 added 1 changesets with 1 changes to 1 files
f930032aa6d5 subrepo: lazier git push logic
Eric Eisner <ede@mit.edu>
parents: 13027
diff changeset
230
13087
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
231 sync to upstream git, distribute changes
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
232
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
233 $ cd ../ta
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
234 $ hg pull -u -q
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
235 $ cd s
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
236 $ git pull -q >/dev/null 2>/dev/null
13087
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
237 $ cd ..
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
238 $ hg commit -m 'git upstream sync'
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
239 $ hg debugsub
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
240 path s
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
241 source ../gitroot
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
242 revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
243 $ hg push -q
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
244
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
245 $ cd ../tb
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
246 $ hg pull -q
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
247 $ hg update 2>/dev/null
13569
3ab3b892d223 subrepo: show the source that git pulls
Eric Eisner <ede@mit.edu>
parents: 13560
diff changeset
248 pulling subrepo s from $TESTTMP/gitroot
13087
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
249 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
250 $ hg debugsub
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
251 path s
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
252 source ../gitroot
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
253 revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc
cca0779b4832 subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents: 13029
diff changeset
254
19013
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
255 create a new git branch
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
256
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
257 $ cd s
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
258 $ git checkout -b b2
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
259 Switched to a new branch 'b2'
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
260 $ echo a>a
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
261 $ git add a
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
262 $ git commit -qm 'add a'
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
263 $ cd ..
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
264 $ hg commit -m 'add branch in s'
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
265
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
266 pulling new git branch should not create tracking branch named 'origin/b2'
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
267 (issue3870)
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
268 $ cd ../td/s
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
269 $ git remote set-url origin $TESTTMP/tb/s
19049
2e5476980a57 subrepo: fix test breakage introduced in 2b34d004e644
Kevin Bullock <kbullock@ringworld.org>
parents: 19013
diff changeset
270 $ git branch --no-track oldtesting
19013
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
271 $ cd ..
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
272 $ hg pull -q ../tb
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
273 $ hg up
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
274 From $TESTTMP/tb/s
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
275 * [new branch] b2 -> origin/b2
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
276 Previous HEAD position was f47b465... merge
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
277 Switched to a new branch 'b2'
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
278 pulling subrepo s from $TESTTMP/tb/s
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
279 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2b34d004e644 subrepo: add regression test for issue3870
Kevin Bullock <kbullock@ringworld.org>
parents: 18109
diff changeset
280
12996
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
281 update to a revision without the subrepo, keeping the local git repository
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
282
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
283 $ cd ../t
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
284 $ hg up 0
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
285 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
13010
6bdae8ea0b48 test-subrepo-git.t: portability fix.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12996
diff changeset
286 $ ls -a s
12996
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
287 .
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
288 ..
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
289 .git
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
290
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
291 $ hg up 2
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
292 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
13010
6bdae8ea0b48 test-subrepo-git.t: portability fix.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12996
diff changeset
293 $ ls -a s
12996
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
294 .
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
295 ..
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
296 .git
3a42651b0a62 subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents: 12995
diff changeset
297 g
13027
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
298
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
299 archive subrepos
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
300
13091
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
301 $ cd ../tc
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
302 $ hg pull -q
8cecea387574 test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents: 13087
diff changeset
303 $ hg archive --subrepos -r 5 ../archive 2>/dev/null
13569
3ab3b892d223 subrepo: show the source that git pulls
Eric Eisner <ede@mit.edu>
parents: 13560
diff changeset
304 pulling subrepo s from $TESTTMP/gitroot
13027
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
305 $ cd ../archive
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
306 $ cat s/f
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
307 f
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
308 $ cat s/g
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
309 g
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
310 gg
7f2ecb64140d subrepo: archive git subrepos
Eric Eisner <ede@mit.edu>
parents: 13010
diff changeset
311 ggg
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
312
17108
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
313 $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null
17114
ca75bd99f740 tests: ignore pax_global_header in test-subrepo-git.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17108
diff changeset
314 $ find ../archive_x | sort | grep -v pax_global_header
17108
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
315 ../archive_x
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
316 ../archive_x/.hg_archival.txt
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
317 ../archive_x/.hgsub
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
318 ../archive_x/.hgsubstate
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
319 ../archive_x/a
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
320 ../archive_x/s
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
321 ../archive_x/s/g
1894dac619de subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents: 17022
diff changeset
322
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
323 create nested repo
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
324
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
325 $ cd ..
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
326 $ hg init outer
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
327 $ cd outer
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
328 $ echo b>b
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
329 $ hg add b
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
330 $ hg commit -m b
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
331
20105
c5a0f899e47b tests: deal with new gits sending status messages to stderr
Mads Kiilerich <madski@unity3d.com>
parents: 19811
diff changeset
332 $ hg clone ../t inner 2> /dev/null
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
333 updating to branch default
13525
c12088259f64 subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
334 cloning subrepo s from $TESTTMP/gitroot
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
335 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
336 $ echo inner = inner > .hgsub
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
337 $ hg add .hgsub
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
338 $ hg commit -m 'nested sub'
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
339
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
340 nested commit
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
341
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
342 $ echo ffff >> inner/s/f
13182
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
343 $ hg status --subrepos
2537bd17421d subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents: 13181
diff changeset
344 M inner/s/f
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 14481
diff changeset
345 $ hg commit --subrepos -m nested
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
346 committing subrepository inner
17022
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
347 committing subrepository inner/s (glob)
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
348
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
349 nested archive
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
350
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
351 $ hg archive --subrepos ../narchive
13296
5dda6c708138 Ignore pax_global_header that some tar versions write as a file.
Lee Cantey <lcantey@embarcadero.com>
parents: 13182
diff changeset
352 $ ls ../narchive/inner/s | grep -v pax_global_header
13181
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
353 f
413bef846806 subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13111
diff changeset
354 g
13324
e5617047c926 subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents: 13296
diff changeset
355
13460
64bb8e586a92 subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13428
diff changeset
356 relative source expansion
64bb8e586a92 subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13428
diff changeset
357
64bb8e586a92 subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13428
diff changeset
358 $ cd ..
64bb8e586a92 subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13428
diff changeset
359 $ mkdir d
20105
c5a0f899e47b tests: deal with new gits sending status messages to stderr
Mads Kiilerich <madski@unity3d.com>
parents: 19811
diff changeset
360 $ hg clone t d/t 2> /dev/null
13460
64bb8e586a92 subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13428
diff changeset
361 updating to branch default
13525
c12088259f64 subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
362 cloning subrepo s from $TESTTMP/gitroot
13460
64bb8e586a92 subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13428
diff changeset
363 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
64bb8e586a92 subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents: 13428
diff changeset
364
13553
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
365 Don't crash if the subrepo is missing
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
366
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
367 $ hg clone t missing -q
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
368 $ cd missing
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
369 $ rm -rf s
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
370 $ hg status -S
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
371 $ hg sum | grep commit
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
372 commit: 1 subrepos
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
373 $ hg push -q
18109
9e3910db4e78 subrepo: append subrepo path to subrepo error messages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17345
diff changeset
374 abort: subrepo s is missing (in subrepo s)
13553
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
375 [255]
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 14481
diff changeset
376 $ hg commit --subrepos -qm missing
18109
9e3910db4e78 subrepo: append subrepo path to subrepo error messages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17345
diff changeset
377 abort: subrepo s is missing (in subrepo s)
13553
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
378 [255]
20105
c5a0f899e47b tests: deal with new gits sending status messages to stderr
Mads Kiilerich <madski@unity3d.com>
parents: 19811
diff changeset
379 $ hg update -C 2> /dev/null
13560
a2734c8322ac merge with stable
Patrick Mezard <pmezard@gmail.com>
parents: 13558
diff changeset
380 cloning subrepo s from $TESTTMP/gitroot
13553
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
381 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
382 $ hg sum | grep commit
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
383 commit: (clean)
dea6efdd7ec4 subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents: 13460
diff changeset
384
14469
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
385 Don't crash if the .hgsubstate entry is missing
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
386
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
387 $ hg update 1 -q
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
388 $ hg rm .hgsubstate
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
389 $ hg commit .hgsubstate -m 'no substate'
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
390 nothing changed
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
391 [1]
14469
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
392 $ hg tag -l nosubstate
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
393 $ hg manifest
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
394 .hgsub
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
395 .hgsubstate
14469
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
396 a
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
397
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
398 $ hg status -S
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
399 R .hgsubstate
14469
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
400 $ hg sum | grep commit
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
401 commit: 1 removed, 1 subrepos (new branch head)
14469
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
402
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
403 $ hg commit -m 'restore substate'
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
404 nothing changed
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
405 [1]
14469
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
406 $ hg manifest
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
407 .hgsub
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
408 .hgsubstate
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
409 a
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
410 $ hg sum | grep commit
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
411 commit: 1 removed, 1 subrepos (new branch head)
14469
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
412
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
413 $ hg update -qC nosubstate
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
414 $ ls s
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 15531
diff changeset
415 g
14469
2fdea636f254 subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents: 13553
diff changeset
416
15531
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
417 issue3109: false positives in git diff-index
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
418
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
419 $ hg update -q
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
420 $ touch -t 200001010000 s/g
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
421 $ hg status --subrepos
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
422 $ touch -t 200001010000 s/g
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
423 $ hg sum | grep commit
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
424 commit: (clean)
0810ccc51f0a subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 15321
diff changeset
425
13324
e5617047c926 subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents: 13296
diff changeset
426 Check hg update --clean
13331
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
427 $ cd $TESTTMP/ta
13324
e5617047c926 subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents: 13296
diff changeset
428 $ echo > s/g
e5617047c926 subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents: 13296
diff changeset
429 $ cd s
e5617047c926 subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents: 13296
diff changeset
430 $ echo c1 > f1
e5617047c926 subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents: 13296
diff changeset
431 $ echo c1 > f2
e5617047c926 subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents: 13296
diff changeset
432 $ git add f1
e5617047c926 subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents: 13296
diff changeset
433 $ cd ..
13331
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
434 $ hg status -S
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
435 M s/g
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
436 A s/f1
23411
2d86f4e38c08 subrepo: add status support for ignored files in git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 22590
diff changeset
437 ? s/f2
13331
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
438 $ ls s
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
439 f
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
440 f1
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
441 f2
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
442 g
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
443 $ hg update --clean
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
444 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
445 $ hg status -S
23411
2d86f4e38c08 subrepo: add status support for ignored files in git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 22590
diff changeset
446 ? s/f1
2d86f4e38c08 subrepo: add status support for ignored files in git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 22590
diff changeset
447 ? s/f2
13331
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
448 $ ls s
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
449 f
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
450 f1
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
451 f2
9f2c6892e004 test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents: 13324
diff changeset
452 g
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
453
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
454 Sticky subrepositories, no changes
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
455 $ cd $TESTTMP/ta
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
456 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
457 7
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
458 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
459 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
460 32a343883b74769118bb1d3b4b1fbf9156f4dddc
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
461 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
462 $ hg update 1 > /dev/null 2>&1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
463 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
464 1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
465 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
466 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
467 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
468 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
469
21024
7731a2281cf0 spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents: 20105
diff changeset
470 Sticky subrepositories, file changes
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
471 $ touch s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
472 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
473 $ git add f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
474 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
475 $ hg id -n
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 17114
diff changeset
476 1+
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
477 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
478 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
479 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
480 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
481 $ hg update 4
21401
2c364f7801c8 subrepo: use subrepo shortid method to generate subrepo diverged promptchoice
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21024
diff changeset
482 subrepository s diverged (local revision: da5f5b1, remote revision: aa84837)
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19049
diff changeset
483 (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: 13331
diff changeset
484 subrepository sources for s differ
22590
d4c972b97fee subrepo: remove superfluous newline from subrepo prompt
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
485 use (l)ocal source (da5f5b1) or (r)emote source (aa84837)? l
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
486 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: 13331
diff changeset
487 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
488 4+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
489 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
490 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
491 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
492 $ cd ..
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17255
diff changeset
493 $ hg update --clean tip > /dev/null 2>&1
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
494
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
495 Sticky subrepository, revision updates
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
496 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
497 7
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
498 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
499 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
500 32a343883b74769118bb1d3b4b1fbf9156f4dddc
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
501 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
502 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
503 $ git checkout aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
504 Previous HEAD position was 32a3438... fff
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
505 HEAD is now at aa84837... f
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
506 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
507 $ hg update 1
21401
2c364f7801c8 subrepo: use subrepo shortid method to generate subrepo diverged promptchoice
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21024
diff changeset
508 subrepository s diverged (local revision: 32a3438, remote revision: da5f5b1)
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19049
diff changeset
509 (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: 13331
diff changeset
510 subrepository sources for s differ (in checked out version)
22590
d4c972b97fee subrepo: remove superfluous newline from subrepo prompt
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
511 use (l)ocal source (32a3438) or (r)emote source (da5f5b1)? l
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
512 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: 13331
diff changeset
513 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
514 1+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
515 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
516 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
517 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
518 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
519
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
520 Sticky subrepository, file changes and revision updates
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
521 $ touch s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
522 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
523 $ git add f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
524 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
525 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
526 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
527 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
528 1+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
529 $ hg update 7
21401
2c364f7801c8 subrepo: use subrepo shortid method to generate subrepo diverged promptchoice
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 21024
diff changeset
530 subrepository s diverged (local revision: 32a3438, remote revision: 32a3438)
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19049
diff changeset
531 (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: 13331
diff changeset
532 subrepository sources for s differ
22590
d4c972b97fee subrepo: remove superfluous newline from subrepo prompt
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
533 use (l)ocal source (32a3438) or (r)emote source (32a3438)? l
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
534 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: 13331
diff changeset
535 $ hg id -n
17255
3e856d8abe9c identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents: 17114
diff changeset
536 7+
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
537 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
538 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
539 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
540 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
541
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
542 Sticky repository, update --clean
16264
0628290d98df tests: ignore git's output in test-subrepo-git.t
Javi Merino <cibervicho@gmail.com>
parents: 15531
diff changeset
543 $ hg update --clean tip 2>/dev/null
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
544 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: 13331
diff changeset
545 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
546 7
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
547 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
548 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
549 32a343883b74769118bb1d3b4b1fbf9156f4dddc
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
550 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
551
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
552 Test subrepo already at intended revision:
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
553 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
554 $ git checkout 32a343883b74769118bb1d3b4b1fbf9156f4dddc
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
555 HEAD is now at 32a3438... fff
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
556 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
557 $ hg update 1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
558 Previous HEAD position was 32a3438... fff
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
559 HEAD is now at da5f5b1... g
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
560 2 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: 13331
diff changeset
561 $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
562 1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
563 $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
564 $ git rev-parse HEAD
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
565 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
566 $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13331
diff changeset
567
16527
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16271
diff changeset
568 Test forgetting files, not implemented in git subrepo, used to
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16271
diff changeset
569 traceback
17022
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
570 #if no-windows
16527
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16271
diff changeset
571 $ hg forget 'notafile*'
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16271
diff changeset
572 notafile*: No such file or directory
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16271
diff changeset
573 [1]
17022
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
574 #else
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
575 $ hg forget 'notafile'
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
576 notafile: * (glob)
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
577 [1]
8a38839ae1dc test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents: 16913
diff changeset
578 #endif
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16527
diff changeset
579
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16527
diff changeset
580 $ cd ..
21564
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
581
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
582 Test sanitizing ".hg/hgrc" in subrepo
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
583
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
584 $ cd t
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
585 $ hg tip -q
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
586 7:af6d2edbb0d3
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
587 $ hg update -q -C af6d2edbb0d3
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
588 $ cd s
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
589 $ git checkout -q -b sanitize-test
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
590 $ mkdir .hg
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
591 $ echo '.hg/hgrc in git repo' > .hg/hgrc
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
592 $ mkdir -p sub/.hg
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
593 $ echo 'sub/.hg/hgrc in git repo' > sub/.hg/hgrc
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
594 $ git add .hg sub
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
595 $ git commit -qm 'add .hg/hgrc to be sanitized at hg update'
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
596 $ git push -q origin sanitize-test
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
597 $ cd ..
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
598 $ grep ' s$' .hgsubstate
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
599 32a343883b74769118bb1d3b4b1fbf9156f4dddc s
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
600 $ hg commit -qm 'commit with git revision including .hg/hgrc'
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
601 $ hg parents -q
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
602 8:3473d20bddcf
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
603 $ grep ' s$' .hgsubstate
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
604 c4069473b459cf27fd4d7c2f50c4346b4e936599 s
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
605 $ cd ..
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
606
21566
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
607 $ hg -R tc pull -q
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
608 $ hg -R tc update -q -C 3473d20bddcf 2>&1 | sort
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
609 warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' (glob)
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
610 warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' (glob)
21564
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
611 $ cd tc
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
612 $ hg parents -q
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
613 8:3473d20bddcf
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
614 $ grep ' s$' .hgsubstate
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
615 c4069473b459cf27fd4d7c2f50c4346b4e936599 s
21748
8621125a1718 tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents: 21567
diff changeset
616 $ test -f s/.hg/hgrc
21564
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
617 [1]
21748
8621125a1718 tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents: 21567
diff changeset
618 $ test -f s/sub/.hg/hgrc
21564
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
619 [1]
2e91d4964ecd subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
620 $ cd ..
21565
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
621
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
622 additional test for "git merge --ff" route:
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
623
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
624 $ cd t
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
625 $ hg tip -q
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
626 8:3473d20bddcf
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
627 $ hg update -q -C af6d2edbb0d3
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
628 $ cd s
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
629 $ git checkout -q testing
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
630 $ mkdir .hg
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
631 $ echo '.hg/hgrc in git repo' > .hg/hgrc
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
632 $ mkdir -p sub/.hg
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
633 $ echo 'sub/.hg/hgrc in git repo' > sub/.hg/hgrc
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
634 $ git add .hg sub
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
635 $ git commit -qm 'add .hg/hgrc to be sanitized at hg update (git merge --ff)'
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
636 $ git push -q origin testing
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
637 $ cd ..
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
638 $ grep ' s$' .hgsubstate
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
639 32a343883b74769118bb1d3b4b1fbf9156f4dddc s
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
640 $ hg commit -qm 'commit with git revision including .hg/hgrc'
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
641 $ hg parents -q
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
642 9:ed23f7fe024e
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
643 $ grep ' s$' .hgsubstate
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
644 f262643c1077219fbd3858d54e78ef050ef84fbf s
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
645 $ cd ..
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
646
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
647 $ cd tc
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
648 $ hg update -q -C af6d2edbb0d3
21748
8621125a1718 tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents: 21567
diff changeset
649 $ test -f s/.hg/hgrc
21565
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
650 [1]
21748
8621125a1718 tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents: 21567
diff changeset
651 $ test -f s/sub/.hg/hgrc
21565
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
652 [1]
21566
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
653 $ cd ..
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
654 $ hg -R tc pull -q
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
655 $ hg -R tc update -q -C ed23f7fe024e 2>&1 | sort
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
656 warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' (glob)
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
657 warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' (glob)
a01988cd9b61 subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21565
diff changeset
658 $ cd tc
21565
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
659 $ hg parents -q
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
660 9:ed23f7fe024e
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
661 $ grep ' s$' .hgsubstate
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
662 f262643c1077219fbd3858d54e78ef050ef84fbf s
21748
8621125a1718 tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents: 21567
diff changeset
663 $ test -f s/.hg/hgrc
21565
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
664 [1]
21748
8621125a1718 tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents: 21567
diff changeset
665 $ test -f s/sub/.hg/hgrc
21565
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
666 [1]
21567
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
667
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
668 Test that sanitizing is omitted in meta data area:
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
669
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
670 $ mkdir s/.git/.hg
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
671 $ echo '.hg/hgrc in git metadata area' > s/.git/.hg/hgrc
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
672 $ hg update -q -C af6d2edbb0d3
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
673 checking out detached HEAD in subrepo s
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
674 check out a git branch if you intend to make changes
5900bc09e684 subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21566
diff changeset
675
23523
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
676 check differences made by most recent change
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
677 $ cd s
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
678 $ cat > foobar << EOF
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
679 > woopwoop
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
680 >
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
681 > foo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
682 > bar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
683 > EOF
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
684 $ git add foobar
21565
7f7f634d073d subrepo: invoke "_sanitize()" also after "git merge --ff"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21564
diff changeset
685 $ cd ..
23523
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
686
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
687 $ hg diff --subrepos
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
688 diff --git a/s/foobar b/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
689 new file mode 100644
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
690 index 0000000..8a5a5e2
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
691 --- /dev/null
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
692 +++ b/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
693 @@ -0,0 +1,4 @@
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
694 +woopwoop
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
695 +
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
696 +foo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
697 +bar (no-eol)
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
698
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
699 $ hg commit --subrepos -m "Added foobar"
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
700 committing subrepository s
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
701 created new head
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
702
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
703 $ hg diff -c . --subrepos --nodates
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
704 diff -r af6d2edbb0d3 -r 255ee8cf690e .hgsubstate
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
705 --- a/.hgsubstate
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
706 +++ b/.hgsubstate
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
707 @@ -1,1 +1,1 @@
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
708 -32a343883b74769118bb1d3b4b1fbf9156f4dddc s
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
709 +fd4dbf828a5b2fcd36b2bcf21ea773820970d129 s
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
710 diff --git a/s/foobar b/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
711 new file mode 100644
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
712 index 0000000..8a5a5e2
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
713 --- /dev/null
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
714 +++ b/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
715 @@ -0,0 +1,4 @@
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
716 +woopwoop
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
717 +
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
718 +foo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
719 +bar (no-eol)
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
720
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
721 check output when only diffing the subrepository
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
722 $ hg diff -c . --subrepos s
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
723 diff --git a/s/foobar b/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
724 new file mode 100644
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
725 index 0000000..8a5a5e2
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
726 --- /dev/null
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
727 +++ b/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
728 @@ -0,0 +1,4 @@
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
729 +woopwoop
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
730 +
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
731 +foo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
732 +bar (no-eol)
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
733
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
734 check output when diffing something else
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
735 $ hg diff -c . --subrepos .hgsubstate --nodates
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
736 diff -r af6d2edbb0d3 -r 255ee8cf690e .hgsubstate
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
737 --- a/.hgsubstate
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
738 +++ b/.hgsubstate
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
739 @@ -1,1 +1,1 @@
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
740 -32a343883b74769118bb1d3b4b1fbf9156f4dddc s
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
741 +fd4dbf828a5b2fcd36b2bcf21ea773820970d129 s
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
742
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
743 add new changes, including whitespace
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
744 $ cd s
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
745 $ cat > foobar << EOF
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
746 > woop woop
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
747 >
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
748 > foo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
749 > bar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
750 > EOF
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
751 $ echo foo > barfoo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
752 $ git add barfoo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
753 $ cd ..
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
754
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
755 $ hg diff --subrepos --ignore-all-space
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
756 diff --git a/s/barfoo b/s/barfoo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
757 new file mode 100644
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
758 index 0000000..257cc56
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
759 --- /dev/null
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
760 +++ b/s/barfoo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
761 @@ -0,0 +1 @@
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
762 +foo (no-eol)
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
763 $ hg diff --subrepos s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
764 diff --git a/s/foobar b/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
765 index 8a5a5e2..bd5812a 100644
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
766 --- a/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
767 +++ b/s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
768 @@ -1,4 +1,4 @@
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
769 -woopwoop
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
770 +woop woop
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
771
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
772 foo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
773 bar (no-eol)
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
774
23542
8b5adc6b72ae tests: allow more flexibility in git diffstat output
Mathias De Maré <mathias.demare@gmail.com>
parents: 23523
diff changeset
775 execute a diffstat
8b5adc6b72ae tests: allow more flexibility in git diffstat output
Mathias De Maré <mathias.demare@gmail.com>
parents: 23523
diff changeset
776 the output contains a regex, because git 1.7.10 and 1.7.11
8b5adc6b72ae tests: allow more flexibility in git diffstat output
Mathias De Maré <mathias.demare@gmail.com>
parents: 23523
diff changeset
777 change the amount of whitespace
23523
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
778 $ hg diff --subrepos --stat
23542
8b5adc6b72ae tests: allow more flexibility in git diffstat output
Mathias De Maré <mathias.demare@gmail.com>
parents: 23523
diff changeset
779 \s*barfoo |\s*1 + (re)
8b5adc6b72ae tests: allow more flexibility in git diffstat output
Mathias De Maré <mathias.demare@gmail.com>
parents: 23523
diff changeset
780 \s*foobar |\s*2 +- (re)
23523
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
781 2 files changed, 2 insertions(+), 1 deletion(-) (no-eol)
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
782
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
783 ensure adding include/exclude ignores the subrepo
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
784 $ hg diff --subrepos -I s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
785 $ hg diff --subrepos -X s/foobar
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
786
01a8dfc79cdc subrepo: add partial diff support for git subrepos
Mathias De Maré <mathias.demare@gmail.com>
parents: 23411
diff changeset
787 $ cd ..