annotate tests/test-mq-subrepo.t @ 24562:e55449dae606

test-hgweb-json: fix URL for file revision tests Likely a copy and paste fail.
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 31 Mar 2015 21:49:10 -0700
parents 1ff35d76421c
children b39afa36006a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
1 $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
2 > [ui]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
3 > commitsubrepos = Yes
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
4 > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
5 > mq =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
6 > record =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
7 > [diff]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
8 > nodates = 1
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22589
diff changeset
9 > EOF
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
10
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
11 $ stdin=`pwd`/stdin.tmp
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
12
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
13 fn to create new repository w/dirty subrepo, and cd into it
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
14 $ mkrepo() {
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
15 > hg init $1
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
16 > cd $1
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
17 > hg qinit
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
18 > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
19
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
20 fn to create dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
21 $ mksubrepo() {
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
22 > hg init $1
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
23 > cd $1
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
24 > echo a > a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
25 > hg add
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
26 > cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
27 > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
28
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
29 $ testadd() {
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
30 > cat - > "$stdin"
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
31 > mksubrepo sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
32 > echo sub = sub >> .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
33 > hg add .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
34 > echo % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
35 > hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
36 > echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
37 > cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
38 > echo [$?]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
39 > hg -R sub ci -m0sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
40 > echo % update substate when adding .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
41 > hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
42 > echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
43 > cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
44 > hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
45 > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
46
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
47 $ testmod() {
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
48 > cat - > "$stdin"
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
49 > mksubrepo sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
50 > echo sub2 = sub2 >> .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
51 > echo % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
52 > hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
53 > echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
54 > cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
55 > echo [$?]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
56 > hg -R sub2 ci -m0sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
57 > echo % update substate when modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
58 > hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
59 > echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
60 > cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
61 > hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
62 > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
63
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
64 $ testrm1() {
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
65 > cat - > "$stdin"
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
66 > mksubrepo sub3
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
67 > echo sub3 = sub3 >> .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
68 > hg ci -Aqmsub3
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
69 > $EXTRA
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
70 > echo b >> sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
71 > hg rm .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
72 > echo % update substate when removing .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
73 > hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
74 > echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
75 > cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
76 > echo % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
77 > hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
78 > }
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
79
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
80 $ testrm2() {
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
81 > cat - > "$stdin"
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
82 > mksubrepo sub4
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
83 > echo sub4 = sub4 >> .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
84 > hg ci -Aqmsub4
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
85 > $EXTRA
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
86 > hg rm .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
87 > echo % update substate when removing .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
88 > hg status -S
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
89 > echo '%' $*
13241
bb43a9abca80 test-mq-subrepo.t: correctly forward stdin to test functions
Patrick Mezard <pmezard@gmail.com>
parents: 13174
diff changeset
90 > cat "$stdin" | hg $*
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
91 > echo % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
92 > hg debugsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
93 > }
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
94
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
95
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
96 handle subrepos safely on qnew
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
97
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
98 $ mkrepo repo-2499-qnew
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
99 $ testadd qnew -X path:no-effect -m0 0.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
100 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
101 % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
102 A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
103 A sub/a
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
104 % qnew -X path:no-effect -m0 0.diff
24471
1ff35d76421c subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24235
diff changeset
105 abort: uncommitted changes in subrepository 'sub'
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
106 [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
107 % update substate when adding .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
108 A .hgsub
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
109 % qnew -X path:no-effect -m0 0.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
110 path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
111 source sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
112 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
113
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
114 $ testmod qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
115 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
116 % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
117 M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
118 A sub2/a
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
119 % qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff
24471
1ff35d76421c subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24235
diff changeset
120 abort: uncommitted changes in subrepository 'sub2'
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
121 [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
122 % update substate when modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
123 M .hgsub
20785
7f7c8ef31c5d qnew: omit meaningless and harmful putting subrepositories into target list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19811
diff changeset
124 % qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
125 path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
126 source sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
127 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
128 path sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
129 source sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
130 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
131
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
132 $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
133 patch queue now empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
134 $ testrm1 qnew -m2 2.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
135 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
136 % update substate when removing .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
137 M sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
138 R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
139 % qnew -m2 2.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
140 % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
141
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
142 $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
143 patch queue now empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
144 $ testrm2 qnew -m3 3.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
145 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
146 % update substate when removing .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
147 R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
148 % qnew -m3 3.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
149 % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
150
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
151 $ cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
152
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
153
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
154 handle subrepos safely on qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
155
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
156 $ mkrepo repo-2499-qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
157 $ hg qnew -m0 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
158 $ testadd qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
159 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
160 % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
161 A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
162 A sub/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
163 % qrefresh
24471
1ff35d76421c subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24235
diff changeset
164 abort: uncommitted changes in subrepository 'sub'
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
165 [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
166 % update substate when adding .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
167 A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
168 % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
169 path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
170 source sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
171 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
172
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
173 $ hg qnew -m1 1.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
174 $ testmod qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
175 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
176 % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
177 M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
178 A sub2/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
179 % qrefresh
24471
1ff35d76421c subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24235
diff changeset
180 abort: uncommitted changes in subrepository 'sub2'
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
181 [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
182 % update substate when modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
183 M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
184 % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
185 path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
186 source sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
187 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
188 path sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
189 source sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
190 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
191
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
192 $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
193 patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
194 $ EXTRA='hg qnew -m2 2.diff'
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
195 $ testrm1 qrefresh
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
196 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
197 % update substate when removing .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
198 M sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
199 R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
200 % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
201 % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
202
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
203 $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
204 patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
205 $ EXTRA='hg qnew -m3 3.diff'
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
206 $ testrm2 qrefresh
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
207 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
208 % update substate when removing .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
209 R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
210 % qrefresh
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
211 % debugsub should be empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
212 $ EXTRA=
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
213
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
214 $ cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
215
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
216
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
217 handle subrepos safely on qpush/qpop
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
218 (and we cannot qpop / qpush with a modified subrepo)
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
219
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
220 $ mkrepo repo-2499-qpush
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
221 $ mksubrepo sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
222 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
223 $ hg -R sub ci -m0sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
224 $ echo sub = sub > .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
225 $ hg add .hgsub
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
226 $ hg commit -m0
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
227 $ hg debugsub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
228 path sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
229 source sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
230 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
231 $ echo foo > ./sub/a
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
232 $ hg -R sub commit -m foo
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
233 $ hg commit -m1
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
234 $ hg qimport -r "0:tip"
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
235 $ hg -R sub id --id
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
236 aa037b301eba
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
237
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
238 qpop
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
239 $ hg -R sub update 0000
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
240 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
241 $ hg qpop
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
242 abort: local changed subrepos found, refresh first
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
243 [255]
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
244 $ hg revert sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
245 reverting subrepo sub
23348
bbe56e07e07a tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 23172
diff changeset
246 adding sub/a (glob)
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
247 $ hg qpop
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
248 popping 1.diff
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
249 now at: 0.diff
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
250 $ hg status -AS
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
251 C .hgsub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
252 C .hgsubstate
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
253 C sub/a
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
254 $ hg -R sub id --id
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
255 b2fdb12cd82b
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
256
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
257 qpush
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
258 $ hg -R sub update 0000
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
259 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
260 $ hg qpush
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
261 abort: local changed subrepos found, refresh first
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
262 [255]
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
263 $ hg revert sub
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
264 reverting subrepo sub
23348
bbe56e07e07a tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 23172
diff changeset
265 adding sub/a (glob)
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
266 $ hg qpush
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
267 applying 1.diff
19811
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19638
diff changeset
268 subrepository sub diverged (local revision: b2fdb12cd82b, remote revision: aa037b301eba)
5e10d41e7b9c merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19638
diff changeset
269 (M)erge, keep (l)ocal or keep (r)emote? m
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
270 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19636
6bbce5efc67b mq: look for modified subrepos when checking for local changes
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 17537
diff changeset
271 now at: 1.diff
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
272 $ hg status -AS
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
273 C .hgsub
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
274 C .hgsubstate
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
275 C sub/a
19638
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
276 $ hg -R sub id --id
20096384754f mq: update subrepos when applying / unapplying patches that change .hgsubstate
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 19636
diff changeset
277 aa037b301eba
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
278
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
279 $ cd ..
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
280
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
281
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
282 handle subrepos safely on qrecord
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
283
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
284 $ mkrepo repo-2499-qrecord
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
285 $ testadd qrecord --config ui.interactive=1 -m0 0.diff <<EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
286 > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
287 > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
288 > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
289 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
290 % abort when adding .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
291 A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
292 A sub/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
293 % qrecord --config ui.interactive=1 -m0 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
294 diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
295 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
296 examine changes to '.hgsub'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
297
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
298 @@ -0,0 +1,1 @@
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
299 +sub = sub
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
300 record this change to '.hgsub'? [Ynesfdaq?] y
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
301
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
302 warning: subrepo spec file .hgsub not found
24471
1ff35d76421c subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24235
diff changeset
303 abort: uncommitted changes in subrepository 'sub'
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
304 [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
305 % update substate when adding .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
306 A .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
307 % qrecord --config ui.interactive=1 -m0 0.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
308 diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
309 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
310 examine changes to '.hgsub'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
311
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
312 @@ -0,0 +1,1 @@
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
313 +sub = sub
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
314 record this change to '.hgsub'? [Ynesfdaq?] y
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
315
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23348
diff changeset
316 warning: subrepo spec file .hgsub not found
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
317 path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
318 source sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
319 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
320 $ testmod qrecord --config ui.interactive=1 -m1 1.diff <<EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
321 > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
322 > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
323 > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
324 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
325 % abort when modifying .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
326 M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
327 A sub2/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
328 % qrecord --config ui.interactive=1 -m1 1.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
329 diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
330 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
331 examine changes to '.hgsub'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
332
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
333 @@ -1,1 +1,2 @@
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
334 sub = sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
335 +sub2 = sub2
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
336 record this change to '.hgsub'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
337
24471
1ff35d76421c subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24235
diff changeset
338 abort: uncommitted changes in subrepository 'sub2'
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
339 [255]
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
340 % update substate when modifying .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
341 M .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
342 % qrecord --config ui.interactive=1 -m1 1.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
343 diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
344 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
345 examine changes to '.hgsub'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
346
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
347 @@ -1,1 +1,2 @@
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
348 sub = sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
349 +sub2 = sub2
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
350 record this change to '.hgsub'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
351
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
352 path sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
353 source sub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
354 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
355 path sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
356 source sub2
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
357 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
358
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
359 $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
360 patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
361 $ testrm1 qrecord --config ui.interactive=1 -m2 2.diff <<EOF
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
362 > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
363 > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
364 > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
365 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
366 % update substate when removing .hgsub w/dirty subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
367 M sub3/a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
368 R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
369 % qrecord --config ui.interactive=1 -m2 2.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
370 diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
371 deleted file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
372 examine changes to '.hgsub'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
373
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
374 % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
375
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
376 $ hg qpop -qa
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
377 patch queue now empty
13510
d0be955f358c tests: test-mq-subrepo.t Solaris 10 sh compliance
Mads Kiilerich <mads@kiilerich.com>
parents: 13300
diff changeset
378 $ testrm2 qrecord --config ui.interactive=1 -m3 3.diff <<EOF
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
379 > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
380 > y
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
381 > EOF
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
382 adding a
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
383 % update substate when removing .hgsub w/clean updated subrepo
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
384 R .hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
385 % qrecord --config ui.interactive=1 -m3 3.diff
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
386 diff --git a/.hgsub b/.hgsub
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
387 deleted file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
388 examine changes to '.hgsub'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22546
diff changeset
389
13174
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
390 % debugsub should be empty
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
391
be7e8e9bc5e5 mq: update .hgsubstate if subrepos are clean (issue2499)
Kevin Bullock <kbullock@ringworld.org>
parents:
diff changeset
392 $ cd ..
14898
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
393
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
394
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
395 correctly handle subrepos with patch queues
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
396 $ mkrepo repo-subrepo-with-queue
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
397 $ mksubrepo sub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
398 adding a
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
399 $ hg -R sub qnew sub0.diff
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
400 $ echo sub = sub >> .hgsub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
401 $ hg add .hgsub
95ced9f5bf29 subrepo: don't commit in subrepo if it's clean
Kevin Bullock <kbullock@ringworld.org>
parents: 13510
diff changeset
402 $ hg qnew 0.diff
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16324
diff changeset
403
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16324
diff changeset
404 $ cd ..
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
405
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
406 check whether MQ operations can import updated .hgsubstate correctly
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
407 both into 'revision' and 'patch file under .hg/patches':
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
408
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
409 $ hg init importing-hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
410 $ cd importing-hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
411
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
412 $ echo a > a
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
413 $ hg commit -u test -d '0 0' -Am '#0 in parent'
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
414 adding a
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
415 $ hg init sub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
416 $ echo sa > sub/sa
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
417 $ hg -R sub commit -u test -d '0 0' -Am '#0 in sub'
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
418 adding sa
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
419 $ echo 'sub = sub' > .hgsub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
420 $ touch .hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
421 $ hg add .hgsub .hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
422
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
423 $ hg qnew -u test -d '0 0' import-at-qnew
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
424 $ hg -R sub parents --template '{node} sub\n'
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
425 b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
426 $ cat .hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
427 b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
428 $ hg diff -c tip
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
429 diff -r f499373e340c -r f69e96d86e75 .hgsub
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
430 --- /dev/null
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
431 +++ b/.hgsub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
432 @@ -0,0 +1,1 @@
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
433 +sub = sub
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
434 diff -r f499373e340c -r f69e96d86e75 .hgsubstate
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
435 --- /dev/null
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
436 +++ b/.hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
437 @@ -0,0 +1,1 @@
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
438 +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
439 $ cat .hg/patches/import-at-qnew
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
440 # HG changeset patch
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
441 # User test
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
442 # Date 0 0
22521
3f948469bac0 mq: write '# Parent ' lines with two spaces like export does (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22520
diff changeset
443 # Parent f499373e340cdca5d01dee904aeb42dd2a325e71
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
444
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
445 diff -r f499373e340c -r f69e96d86e75 .hgsub
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
446 --- /dev/null
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
447 +++ b/.hgsub
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
448 @@ -0,0 +1,1 @@
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
449 +sub = sub
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
450 diff -r f499373e340c -r f69e96d86e75 .hgsubstate
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
451 --- /dev/null
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
452 +++ b/.hgsubstate
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
453 @@ -0,0 +1,1 @@
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
454 +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
455 $ hg parents --template '{node}\n'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
456 f69e96d86e75a6d4fd88285dc9697acb23951041
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
457 $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
458 .hgsub .hgsubstate
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
459
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
460 check also whether qnew not including ".hgsubstate" explicitly causes
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
461 as same result (in node hash) as one including it.
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
462
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
463 $ hg qpop -a -q
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
464 patch queue now empty
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
465 $ hg qdelete import-at-qnew
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
466 $ echo 'sub = sub' > .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
467 $ hg add .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
468 $ rm -f .hgsubstate
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
469 $ hg qnew -u test -d '0 0' import-at-qnew
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
470 $ hg parents --template '{node}\n'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
471 f69e96d86e75a6d4fd88285dc9697acb23951041
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
472 $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
473 .hgsub .hgsubstate
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
474
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
475 check whether qrefresh imports updated .hgsubstate correctly
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
476
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
477 $ hg qpop
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
478 popping import-at-qnew
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
479 patch queue now empty
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
480 $ hg qpush
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
481 applying import-at-qnew
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
482 now at: import-at-qnew
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
483 $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
484 .hgsub .hgsubstate
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
485
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
486 $ hg qnew import-at-qrefresh
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
487 $ echo sb > sub/sb
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
488 $ hg -R sub commit -u test -d '0 0' -Am '#1 in sub'
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
489 adding sb
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
490 $ hg qrefresh -u test -d '0 0'
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
491 $ hg -R sub parents --template '{node} sub\n'
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
492 88ac1bef5ed43b689d1d200b59886b675dec474b sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
493 $ cat .hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
494 88ac1bef5ed43b689d1d200b59886b675dec474b sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
495 $ hg diff -c tip
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
496 diff -r 05b056bb9c8c -r d987bec230f4 .hgsubstate
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
497 --- a/.hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
498 +++ b/.hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
499 @@ -1,1 +1,1 @@
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
500 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
501 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
502 $ cat .hg/patches/import-at-qrefresh
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
503 # HG changeset patch
22546
aac5482db318 mq: refactor patchheader header ordering to match export (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22521
diff changeset
504 # User test
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
505 # Date 0 0
22521
3f948469bac0 mq: write '# Parent ' lines with two spaces like export does (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22520
diff changeset
506 # Parent 05b056bb9c8c05ff15258b84fd42ab3527271033
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
507
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
508 diff -r 05b056bb9c8c .hgsubstate
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
509 --- a/.hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
510 +++ b/.hgsubstate
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
511 @@ -1,1 +1,1 @@
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
512 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
513 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
514 $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
515 .hgsubstate
17152
f287d4a62031 mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17151
diff changeset
516
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
517 $ hg qrefresh -u test -d '0 0'
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
518 $ cat .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
519 88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
520 $ hg diff -c tip
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
521 diff -r 05b056bb9c8c -r d987bec230f4 .hgsubstate
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
522 --- a/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
523 +++ b/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
524 @@ -1,1 +1,1 @@
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
525 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
526 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
527 $ cat .hg/patches/import-at-qrefresh
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
528 # HG changeset patch
22546
aac5482db318 mq: refactor patchheader header ordering to match export (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22521
diff changeset
529 # User test
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
530 # Date 0 0
22521
3f948469bac0 mq: write '# Parent ' lines with two spaces like export does (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22520
diff changeset
531 # Parent 05b056bb9c8c05ff15258b84fd42ab3527271033
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
532
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
533 diff -r 05b056bb9c8c .hgsubstate
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
534 --- a/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
535 +++ b/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
536 @@ -1,1 +1,1 @@
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
537 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
538 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
539 $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
540 .hgsubstate
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
541
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
542 $ hg update -C tip
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
543 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
544 $ hg qpop -a
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
545 popping import-at-qrefresh
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
546 popping import-at-qnew
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
547 patch queue now empty
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
548
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
549 $ hg -R sub update -C 0
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
550 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
551 $ echo 'sub = sub' > .hgsub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
552 $ hg commit -Am '#1 in parent'
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
553 adding .hgsub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
554 $ hg -R sub update -C 1
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
555 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17537
31f32a96e1e3 Merge spelling fixes
Bryan O'Sullivan <bryano@fb.com>
parents: 17529
diff changeset
556 $ hg commit -Am '#2 in parent (but will be rolled back soon)'
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
557 $ hg rollback
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
558 repository tip rolled back to revision 1 (undo commit)
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
559 working directory now based on revision 1
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
560 $ hg status
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
561 M .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
562 $ hg qnew -u test -d '0 0' checkstate-at-qnew
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
563 $ hg -R sub parents --template '{node} sub\n'
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
564 88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
565 $ cat .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
566 88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
567 $ hg diff -c tip
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
568 diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
569 --- a/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
570 +++ b/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
571 @@ -1,1 +1,1 @@
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
572 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
573 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
574 $ cat .hg/patches/checkstate-at-qnew
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
575 # HG changeset patch
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
576 # User test
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
577 # Date 0 0
22521
3f948469bac0 mq: write '# Parent ' lines with two spaces like export does (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 22520
diff changeset
578 # Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
579
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
580 diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
581 --- a/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
582 +++ b/.hgsubstate
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
583 @@ -1,1 +1,1 @@
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
584 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
585 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
586 $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
587 .hgsubstate
17153
54da604fefee mq: check subrepo synchronizations against parent of workdir or other appropriate context
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17152
diff changeset
588
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
589 check whether qrefresh not including ".hgsubstate" explicitly causes
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
590 as same result (in node hash) as one including it.
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
591
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
592 $ hg update -C -q 0
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
593 $ hg qpop -a -q
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
594 patch queue now empty
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
595 $ hg qnew -u test -d '0 0' add-hgsub-at-qrefresh
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
596 $ echo 'sub = sub' > .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
597 $ echo > .hgsubstate
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
598 $ hg add .hgsub .hgsubstate
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
599 $ hg qrefresh -u test -d '0 0'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
600 $ hg parents --template '{node}\n'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
601 7c48c35501aae6770ed9c2517014628615821a8e
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
602 $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
603 .hgsub .hgsubstate
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
604
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
605 $ hg qpop -a -q
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
606 patch queue now empty
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
607 $ hg qdelete add-hgsub-at-qrefresh
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
608 $ hg qnew -u test -d '0 0' add-hgsub-at-qrefresh
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
609 $ echo 'sub = sub' > .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
610 $ hg add .hgsub
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
611 $ rm -f .hgsubstate
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
612 $ hg qrefresh -u test -d '0 0'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
613 $ hg parents --template '{node}\n'
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
614 7c48c35501aae6770ed9c2517014628615821a8e
20827
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
615 $ hg parents --template '{files}\n'
ca5dd216cb62 localrepo: omit ".hgsubstate" also from "added" files
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20786
diff changeset
616 .hgsub .hgsubstate
20786
d666da075b91 mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20785
diff changeset
617
17151
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
618 $ cd ..
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
619
986df5249b65 mq: add ".hgsubstate" to patch target list only if it is not listed up yet
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 16913
diff changeset
620 $ cd ..