Mercurial > hg
annotate tests/test-subrepo-git.t @ 17474:f85816af6294
obsolete: add a high level function to create an obsolete marker
This function is designed to be used by all code that creates new
obsolete markers in the local repository.
It is not used by debugobsolete because debugobsolete allows the
use of an unknown hash as argument.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 24 Aug 2012 21:16:23 +0200 |
parents | 4f8054d3171b |
children | 9e3910db4e78 |
rev | line source |
---|---|
12992
2b73a3279a9f
subrepo: support for adding a git subrepo
Eric Eisner <ede@mit.edu>
parents:
diff
changeset
|
1 $ "$TESTDIR/hghave" git || exit 80 |
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 |
12993
a91334380699
subrepo: cloning and updating of git subrepos
Eric Eisner <ede@mit.edu>
parents:
12992
diff
changeset
|
74 $ hg clone . ../tc |
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 |
12994
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
97 $ hg clone . ../ta |
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 |
15321
e174353e8cda
subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents:
14481
diff
changeset
|
106 $ hg commit --subrepos -m ggg |
13181
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
107 committing subrepository s |
12994
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
108 $ hg debugsub |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
109 path s |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
110 source ../gitroot |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
111 revision 79695940086840c99328513acbe35f90fcd55e57 |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
112 |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
113 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
|
114 |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
115 $ cd ../t |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
116 $ hg clone . ../tb |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
117 updating to branch default |
13525
c12088259f64
subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
118 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
|
119 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
|
120 |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
121 $ cd ../tb/s |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
122 $ echo f > f |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
123 $ git add f |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
124 $ cd .. |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
125 |
13182
2537bd17421d
subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents:
13181
diff
changeset
|
126 $ hg status --subrepos |
2537bd17421d
subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents:
13181
diff
changeset
|
127 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
|
128 $ hg commit --subrepos -m f |
13181
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
129 committing subrepository s |
12994
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
130 $ hg debugsub |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
131 path s |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
132 source ../gitroot |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
133 revision aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
134 |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
135 user b push changes |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
136 |
13091
8cecea387574
test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents:
13087
diff
changeset
|
137 $ 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
|
138 pushing to $TESTTMP/t (glob) |
13029 | 139 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
|
140 searching for changes |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
141 adding changesets |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
142 adding manifests |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
143 adding file changes |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
144 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
|
145 |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
146 user a pulls, merges, commits |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
147 |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
148 $ cd ../ta |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
149 $ hg pull |
17022
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
150 pulling from $TESTTMP/t (glob) |
12994
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
151 searching for changes |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
152 adding changesets |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
153 adding manifests |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
154 adding file changes |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
155 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
|
156 (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
|
157 $ hg merge 2>/dev/null |
13569
3ab3b892d223
subrepo: show the source that git pulls
Eric Eisner <ede@mit.edu>
parents:
13560
diff
changeset
|
158 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
|
159 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
|
160 (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
|
161 $ cat s/f |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
162 f |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
163 $ cat s/g |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
164 g |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
165 gg |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
166 ggg |
15321
e174353e8cda
subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents:
14481
diff
changeset
|
167 $ hg commit --subrepos -m 'merge' |
13181
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
168 committing subrepository s |
13182
2537bd17421d
subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents:
13181
diff
changeset
|
169 $ hg status --subrepos --rev 1:5 |
2537bd17421d
subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents:
13181
diff
changeset
|
170 M .hgsubstate |
2537bd17421d
subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents:
13181
diff
changeset
|
171 M s/g |
2537bd17421d
subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents:
13181
diff
changeset
|
172 A s/f |
12994
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
173 $ hg debugsub |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
174 path s |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
175 source ../gitroot |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
176 revision f47b465e1bce645dbf37232a00574aa1546ca8d3 |
13091
8cecea387574
test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents:
13087
diff
changeset
|
177 $ 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
|
178 pushing to $TESTTMP/t (glob) |
13029 | 179 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
|
180 searching for changes |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
181 adding changesets |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
182 adding manifests |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
183 adding file changes |
845c602b8635
subrepo: allow git subrepos to push and merge
Eric Eisner <ede@mit.edu>
parents:
12993
diff
changeset
|
184 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
|
185 |
13029 | 186 make upstream git changes |
187 | |
188 $ cd .. | |
189 $ git clone -q gitroot gitclone | |
190 $ cd gitclone | |
191 $ echo ff >> f | |
192 $ git commit -q -a -m ff | |
193 $ echo fff >> f | |
194 $ git commit -q -a -m fff | |
13091
8cecea387574
test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents:
13087
diff
changeset
|
195 $ git push origin testing 2>/dev/null |
13029 | 196 |
197 make and push changes to hg without updating the subrepo | |
198 | |
199 $ cd ../t | |
200 $ hg clone . ../td | |
201 updating to branch default | |
13525
c12088259f64
subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
202 cloning subrepo s from $TESTTMP/gitroot |
13029 | 203 checking out detached HEAD in subrepo s |
204 check out a git branch if you intend to make changes | |
205 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
206 $ cd ../td | |
207 $ echo aa >> a | |
208 $ hg commit -m aa | |
209 $ hg push | |
17022
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
210 pushing to $TESTTMP/t (glob) |
13029 | 211 searching for changes |
212 adding changesets | |
213 adding manifests | |
214 adding file changes | |
215 added 1 changesets with 1 changes to 1 files | |
216 | |
13087
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
217 sync to upstream git, distribute changes |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
218 |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
219 $ cd ../ta |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
220 $ hg pull -u -q |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
221 $ cd s |
13091
8cecea387574
test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents:
13087
diff
changeset
|
222 $ 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
|
223 $ cd .. |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
224 $ hg commit -m 'git upstream sync' |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
225 $ hg debugsub |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
226 path s |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
227 source ../gitroot |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
228 revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
229 $ hg push -q |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
230 |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
231 $ cd ../tb |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
232 $ hg pull -q |
13091
8cecea387574
test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents:
13087
diff
changeset
|
233 $ hg update 2>/dev/null |
13569
3ab3b892d223
subrepo: show the source that git pulls
Eric Eisner <ede@mit.edu>
parents:
13560
diff
changeset
|
234 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
|
235 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
|
236 $ hg debugsub |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
237 path s |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
238 source ../gitroot |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
239 revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
cca0779b4832
subrepo: lazily update git's local tracking branches
Eric Eisner <ede@mit.edu>
parents:
13029
diff
changeset
|
240 |
12996
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
241 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
|
242 |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
243 $ cd ../t |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
244 $ hg up 0 |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
245 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
|
246 $ ls -a s |
12996
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
247 . |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
248 .. |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
249 .git |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
250 |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
251 $ hg up 2 |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
252 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
|
253 $ ls -a s |
12996
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
254 . |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
255 .. |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
256 .git |
3a42651b0a62
subrepo: removing (and restoring) git subrepo state
Eric Eisner <ede@mit.edu>
parents:
12995
diff
changeset
|
257 g |
13027 | 258 |
259 archive subrepos | |
260 | |
13091
8cecea387574
test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents:
13087
diff
changeset
|
261 $ cd ../tc |
8cecea387574
test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents:
13087
diff
changeset
|
262 $ hg pull -q |
8cecea387574
test-subrepo-git.t: silence git output
Eric Eisner <ede@mit.edu>
parents:
13087
diff
changeset
|
263 $ 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
|
264 pulling subrepo s from $TESTTMP/gitroot |
13027 | 265 $ cd ../archive |
266 $ cat s/f | |
267 f | |
268 $ cat s/g | |
269 g | |
270 gg | |
271 ggg | |
13181
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
272 |
17108
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17022
diff
changeset
|
273 $ 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
|
274 $ 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
|
275 ../archive_x |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17022
diff
changeset
|
276 ../archive_x/.hg_archival.txt |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17022
diff
changeset
|
277 ../archive_x/.hgsub |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17022
diff
changeset
|
278 ../archive_x/.hgsubstate |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17022
diff
changeset
|
279 ../archive_x/a |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17022
diff
changeset
|
280 ../archive_x/s |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17022
diff
changeset
|
281 ../archive_x/s/g |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17022
diff
changeset
|
282 |
13181
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
283 create nested repo |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
284 |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
285 $ cd .. |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
286 $ hg init outer |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
287 $ cd outer |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
288 $ echo b>b |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
289 $ hg add b |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
290 $ hg commit -m b |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
291 |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
292 $ hg clone ../t inner |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
293 updating to branch default |
13525
c12088259f64
subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
294 cloning subrepo s from $TESTTMP/gitroot |
13181
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
295 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
|
296 $ echo inner = inner > .hgsub |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
297 $ hg add .hgsub |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
298 $ hg commit -m 'nested sub' |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
299 |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
300 nested commit |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
301 |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
302 $ echo ffff >> inner/s/f |
13182
2537bd17421d
subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents:
13181
diff
changeset
|
303 $ hg status --subrepos |
2537bd17421d
subrepo: basic support for status of git subrepos
Eric Eisner <ede@mit.edu>
parents:
13181
diff
changeset
|
304 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
|
305 $ hg commit --subrepos -m nested |
13181
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
306 committing subrepository inner |
17022
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
307 committing subrepository inner/s (glob) |
13181
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
308 |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
309 nested archive |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
310 |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
311 $ 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
|
312 $ 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
|
313 f |
413bef846806
subrepo: fix subrelpath for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13111
diff
changeset
|
314 g |
13324
e5617047c926
subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents:
13296
diff
changeset
|
315 |
13460
64bb8e586a92
subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13428
diff
changeset
|
316 relative source expansion |
64bb8e586a92
subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13428
diff
changeset
|
317 |
64bb8e586a92
subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13428
diff
changeset
|
318 $ cd .. |
64bb8e586a92
subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13428
diff
changeset
|
319 $ mkdir d |
64bb8e586a92
subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13428
diff
changeset
|
320 $ hg clone t d/t |
64bb8e586a92
subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13428
diff
changeset
|
321 updating to branch default |
13525
c12088259f64
subrepo: show the source that git clones
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
322 cloning subrepo s from $TESTTMP/gitroot |
13460
64bb8e586a92
subrepo: expand relative sources for git subrepos
Eric Eisner <ede@mit.edu>
parents:
13428
diff
changeset
|
323 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
|
324 |
13553
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
325 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
|
326 |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
327 $ hg clone t missing -q |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
328 $ cd missing |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
329 $ rm -rf s |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
330 $ hg status -S |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
331 $ hg sum | grep commit |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
332 commit: 1 subrepos |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
333 $ hg push -q |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
334 abort: subrepo s is missing |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
335 [255] |
15321
e174353e8cda
subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents:
14481
diff
changeset
|
336 $ hg commit --subrepos -qm missing |
13553
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
337 abort: subrepo s is missing |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
338 [255] |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
339 $ hg update -C |
13560 | 340 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
|
341 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
|
342 $ hg sum | grep commit |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
343 commit: (clean) |
dea6efdd7ec4
subrepo: don't crash when git repo is missing
Eric Eisner <ede@mit.edu>
parents:
13460
diff
changeset
|
344 |
14469
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
345 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
|
346 |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
347 $ 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
|
348 $ hg rm .hgsubstate |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
349 $ 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
|
350 nothing changed |
b254f827b7a6
subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents:
15531
diff
changeset
|
351 [1] |
14469
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
352 $ 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
|
353 $ hg manifest |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
354 .hgsub |
16073
b254f827b7a6
subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents:
15531
diff
changeset
|
355 .hgsubstate |
14469
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
356 a |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
357 |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
358 $ hg status -S |
16073
b254f827b7a6
subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents:
15531
diff
changeset
|
359 R .hgsubstate |
14469
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
360 $ hg sum | grep commit |
16073
b254f827b7a6
subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents:
15531
diff
changeset
|
361 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
|
362 |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
363 $ 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
|
364 nothing changed |
b254f827b7a6
subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents:
15531
diff
changeset
|
365 [1] |
14469
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
366 $ hg manifest |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
367 .hgsub |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
368 .hgsubstate |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
369 a |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
370 $ hg sum | grep commit |
16073
b254f827b7a6
subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents:
15531
diff
changeset
|
371 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
|
372 |
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
373 $ 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
|
374 $ ls s |
16073
b254f827b7a6
subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents:
15531
diff
changeset
|
375 g |
14469
2fdea636f254
subrepo: don't crash when git .hgsubstate is empty (issue2716)
Eric Eisner <ede@alum.mit.edu>
parents:
13553
diff
changeset
|
376 |
15531
0810ccc51f0a
subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents:
15321
diff
changeset
|
377 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
|
378 |
0810ccc51f0a
subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents:
15321
diff
changeset
|
379 $ hg update -q |
0810ccc51f0a
subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents:
15321
diff
changeset
|
380 $ touch -t 200001010000 s/g |
0810ccc51f0a
subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents:
15321
diff
changeset
|
381 $ hg status --subrepos |
0810ccc51f0a
subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents:
15321
diff
changeset
|
382 $ touch -t 200001010000 s/g |
0810ccc51f0a
subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents:
15321
diff
changeset
|
383 $ hg sum | grep commit |
0810ccc51f0a
subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents:
15321
diff
changeset
|
384 commit: (clean) |
0810ccc51f0a
subrepo: fix git status false positive (issue3109)
Eric Roshan Eisner <ede@alum.mit.edu>
parents:
15321
diff
changeset
|
385 |
13324
e5617047c926
subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents:
13296
diff
changeset
|
386 Check hg update --clean |
13331
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
387 $ 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
|
388 $ echo > s/g |
e5617047c926
subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents:
13296
diff
changeset
|
389 $ cd s |
e5617047c926
subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents:
13296
diff
changeset
|
390 $ echo c1 > f1 |
e5617047c926
subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents:
13296
diff
changeset
|
391 $ echo c1 > f2 |
e5617047c926
subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents:
13296
diff
changeset
|
392 $ git add f1 |
e5617047c926
subrepo: make update -C clean the working directory for git subrepos
Erik Zielke <ez@aragost.com>
parents:
13296
diff
changeset
|
393 $ cd .. |
13331
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
394 $ hg status -S |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
395 M s/g |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
396 A s/f1 |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
397 $ ls s |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
398 f |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
399 f1 |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
400 f2 |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
401 g |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
402 $ hg update --clean |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
403 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
|
404 $ hg status -S |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
405 $ ls s |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
406 f |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
407 f1 |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
408 f2 |
9f2c6892e004
test-subrepo-git.t: make compatible with old git
Eric Eisner <ede@mit.edu>
parents:
13324
diff
changeset
|
409 g |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
410 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
411 Sticky subrepositories, no changes |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
412 $ cd $TESTTMP/ta |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
413 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
414 7 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
415 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
416 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
417 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
418 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
419 $ 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
|
420 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
421 1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
422 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
423 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
424 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
425 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
426 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
427 Sticky subrepositorys, file changes |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
428 $ touch s/f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
429 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
430 $ git add f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
431 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
432 $ hg id -n |
17255
3e856d8abe9c
identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents:
17114
diff
changeset
|
433 1+ |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
434 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
435 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
436 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
437 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
438 $ hg update 4 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
439 subrepository sources for s differ |
13428
5ef29e0dd418
subrepos: print short git changeset ids
Kevin Bullock <kbullock@ringworld.org>
parents:
13417
diff
changeset
|
440 use (l)ocal source (da5f5b1) or (r)emote source (aa84837)? |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
441 l |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
442 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
|
443 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
444 4+ |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
445 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
446 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
447 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
448 $ cd .. |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
17255
diff
changeset
|
449 $ 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
|
450 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
451 Sticky subrepository, revision updates |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
452 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
453 7 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
454 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
455 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
456 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
457 $ cd .. |
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 checkout aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
460 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
|
461 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
|
462 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
463 $ hg update 1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
464 subrepository sources for s differ (in checked out version) |
13428
5ef29e0dd418
subrepos: print short git changeset ids
Kevin Bullock <kbullock@ringworld.org>
parents:
13417
diff
changeset
|
465 use (l)ocal source (32a3438) or (r)emote source (da5f5b1)? |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
466 l |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
467 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
|
468 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
469 1+ |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
470 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
471 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
472 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
473 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
474 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
475 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
|
476 $ touch s/f1 |
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 add f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
479 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
480 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
481 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
482 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
483 1+ |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
484 $ hg update 7 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
485 subrepository sources for s differ |
13428
5ef29e0dd418
subrepos: print short git changeset ids
Kevin Bullock <kbullock@ringworld.org>
parents:
13417
diff
changeset
|
486 use (l)ocal source (32a3438) or (r)emote source (32a3438)? |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
487 l |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
488 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
|
489 $ hg id -n |
17255
3e856d8abe9c
identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents:
17114
diff
changeset
|
490 7+ |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
491 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
492 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
493 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
494 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
495 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
496 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
|
497 $ 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
|
498 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
|
499 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
500 7 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
501 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
502 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
503 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
504 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
505 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
506 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
|
507 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
508 $ git checkout 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
509 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
|
510 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
511 $ hg update 1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
512 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
|
513 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
|
514 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
|
515 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
516 1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
517 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
518 $ git rev-parse HEAD |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
519 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
520 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13331
diff
changeset
|
521 |
16527
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16271
diff
changeset
|
522 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
|
523 traceback |
17022
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
524 #if no-windows |
16527
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16271
diff
changeset
|
525 $ hg forget 'notafile*' |
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16271
diff
changeset
|
526 notafile*: No such file or directory |
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16271
diff
changeset
|
527 [1] |
17022
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
528 #else |
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
529 $ hg forget 'notafile' |
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
530 notafile: * (glob) |
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
531 [1] |
8a38839ae1dc
test-subrepo-git.t: adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16913
diff
changeset
|
532 #endif |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16527
diff
changeset
|
533 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16527
diff
changeset
|
534 $ cd .. |