Mercurial > hg-stable
annotate tests/test-subrepo-svn.t @ 43125:56494a2bfe2f
perf: document `perfdirstatefoldmap`
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 08 Oct 2019 01:48:10 -0400 |
parents | f6540aba8e3e |
children | e598c874b4af |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
21930
diff
changeset
|
1 #require svn15 |
10178 | 2 |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
3 $ SVNREPOPATH=`pwd`/svn-repo |
41510
e095a9688a31
tests: quote $PYTHON for py3 support on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41494
diff
changeset
|
4 $ SVNREPOURL="`"$PYTHON" $TESTDIR/svnurlof.py \"$SVNREPOPATH\"`" |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
5 |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
6 $ filter_svn_output () { |
28533
dfd5a6830ea7
tests: make tests for convert with svn portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26374
diff
changeset
|
7 > egrep -v 'Committing|Transmitting|Updating|(^$)' || true |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
8 > } |
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
9 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
10 create subversion repo |
10178 | 11 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
12 $ WCROOT="`pwd`/svn-wc" |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
13 $ svnadmin create svn-repo |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
14 $ svn co "$SVNREPOURL" svn-wc |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
15 Checked out revision 0. |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
16 $ cd svn-wc |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
17 $ mkdir src |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
18 $ echo alpha > src/alpha |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
19 $ svn add src |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
20 A src |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
21 A src/alpha |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
22 $ mkdir externals |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
23 $ echo other > externals/other |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
24 $ svn add externals |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
25 A externals |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
26 A externals/other |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
27 $ svn ci -qm 'Add alpha' |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
28 $ svn up -q |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
29 $ echo "externals -r1 $SVNREPOURL/externals" > extdef |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
30 $ svn propset -F extdef svn:externals src |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
31 property 'svn:externals' set on 'src' |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
32 $ svn ci -qm 'Setting externals' |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
33 $ cd .. |
10178 | 34 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
35 create hg repo |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
36 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
37 $ mkdir sub |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
38 $ cd sub |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
39 $ hg init t |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
40 $ cd t |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
41 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
42 first revision, no sub |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
43 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
44 $ echo a > a |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
45 $ hg ci -Am0 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
46 adding a |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
47 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
48 add first svn sub with leading whitespaces |
10178 | 49 |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
50 $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub |
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
51 $ echo "subdir/s = [svn] $SVNREPOURL/src" >> .hgsub |
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
52 $ svn co --quiet "$SVNREPOURL"/src s |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
53 $ mkdir subdir |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
54 $ svn co --quiet "$SVNREPOURL"/src subdir/s |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
55 $ hg add .hgsub |
34965
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
56 |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
57 svn subrepo is disabled by default |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
58 |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
59 $ hg ci -m1 |
34967
1a314176da9c
subrepo: use per-type config options to enable subrepos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34965
diff
changeset
|
60 abort: svn subrepos not allowed |
34965
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
61 (see 'hg help config.subrepos' for details) |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
62 [255] |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
63 |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
64 so enable it |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
65 |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
66 $ cat >> $HGRCPATH <<EOF |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
67 > [subrepos] |
34967
1a314176da9c
subrepo: use per-type config options to enable subrepos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34965
diff
changeset
|
68 > svn:allowed = true |
34965
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
69 > EOF |
846942fd6d15
subrepo: disable git and svn subrepos by default (BC) (SEC)
Yuya Nishihara <yuya@tcha.org>
parents:
33658
diff
changeset
|
70 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
71 $ hg ci -m1 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
72 |
12798
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
73 make sure we avoid empty commits (issue2445) |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
74 |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
75 $ hg sum |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
76 parent: 1:* tip (glob) |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
77 1 |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
78 branch: default |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
79 commit: (clean) |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
80 update: (current) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25125
diff
changeset
|
81 phases: 2 draft |
12798
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
82 $ hg ci -moops |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
83 nothing changed |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
84 [1] |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
85 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
86 debugsub |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
87 |
12366
c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents:
12365
diff
changeset
|
88 $ hg debugsub |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
89 path s |
35450
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35400
diff
changeset
|
90 source file:/*/$TESTTMP/svn-repo/src (glob) |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
91 revision 2 |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
92 path subdir/s |
35450
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35400
diff
changeset
|
93 source file:/*/$TESTTMP/svn-repo/src (glob) |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
94 revision 2 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
95 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
96 change file in svn and hg, commit |
10178 | 97 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
98 $ echo a >> a |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
99 $ echo alpha >> s/alpha |
12798
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
100 $ hg sum |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
101 parent: 1:* tip (glob) |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
102 1 |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
103 branch: default |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
104 commit: 1 modified, 1 subrepos |
3d6ba8c2b1b8
subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents:
12668
diff
changeset
|
105 update: (current) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25125
diff
changeset
|
106 phases: 2 draft |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
107 $ hg commit --subrepos -m 'Message!' | filter_svn_output |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
108 committing subrepository s |
12377
a5b77eb0409b
tests: various fixes for new unified test pattern format
Matt Mackall <mpm@selenic.com>
parents:
12376
diff
changeset
|
109 Sending*s/alpha (glob) |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
110 Committed revision 3. |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
111 Fetching external item into '*s/externals'* (glob) |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
112 External at revision 1. |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
113 At revision 3. |
12366
c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents:
12365
diff
changeset
|
114 $ hg debugsub |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
115 path s |
35450
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35400
diff
changeset
|
116 source file:/*/$TESTTMP/svn-repo/src (glob) |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
117 revision 3 |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
118 path subdir/s |
35450
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35400
diff
changeset
|
119 source file:/*/$TESTTMP/svn-repo/src (glob) |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
120 revision 2 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
121 |
16529
3d5d204a08c7
subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents:
16527
diff
changeset
|
122 missing svn file, commit should fail |
3d5d204a08c7
subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents:
16527
diff
changeset
|
123 |
3d5d204a08c7
subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents:
16527
diff
changeset
|
124 $ rm s/alpha |
3d5d204a08c7
subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents:
16527
diff
changeset
|
125 $ hg commit --subrepos -m 'abort on missing file' |
3d5d204a08c7
subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents:
16527
diff
changeset
|
126 committing subrepository s |
33365
6d88468d435b
subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents:
30060
diff
changeset
|
127 abort: cannot commit missing svn entries (in subrepository "s") |
16529
3d5d204a08c7
subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents:
16527
diff
changeset
|
128 [255] |
3d5d204a08c7
subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents:
16527
diff
changeset
|
129 $ svn revert s/alpha > /dev/null |
3d5d204a08c7
subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents:
16527
diff
changeset
|
130 |
13287
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
131 add an unrelated revision in svn and update the subrepo to without |
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
132 bringing any changes. |
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
133 |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
134 $ svn mkdir "$SVNREPOURL/unrelated" -qm 'create unrelated' |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
135 $ svn up -q s |
13287
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
136 $ hg sum |
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
137 parent: 2:* tip (glob) |
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
138 Message! |
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
139 branch: default |
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
140 commit: (clean) |
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
141 update: (current) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25125
diff
changeset
|
142 phases: 3 draft |
13287
d0e0d3d43e14
subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents:
13015
diff
changeset
|
143 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
144 $ echo a > s/a |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
145 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
146 should be empty despite change to s/a |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
147 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
148 $ hg st |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
149 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
150 add a commit from svn |
10178 | 151 |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
152 $ cd "$WCROOT/src" |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
153 $ svn up -q |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
154 $ echo xyz >> alpha |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
155 $ svn propset svn:mime-type 'text/xml' alpha |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
156 property 'svn:mime-type' set on 'alpha' |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
157 $ svn ci -qm 'amend a from svn' |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
158 $ cd ../../sub/t |
10178 | 159 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
160 this commit from hg will fail |
10178 | 161 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
162 $ echo zzz >> s/alpha |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
163 $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date' |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
164 committing subrepository s |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
165 abort: svn:*Commit failed (details follow): (glob) |
12366
c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents:
12365
diff
changeset
|
166 [255] |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
167 $ svn revert -q s/alpha |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10267
diff
changeset
|
168 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
169 this commit fails because of meta changes |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
170 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
171 $ svn propset svn:mime-type 'text/html' s/alpha |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
172 property 'svn:mime-type' set on 's/alpha' |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
173 $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date' |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
174 committing subrepository s |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
175 abort: svn:*Commit failed (details follow): (glob) |
12366
c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents:
12365
diff
changeset
|
176 [255] |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
177 $ svn revert -q s/alpha |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
178 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
179 this commit fails because of externals changes |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10267
diff
changeset
|
180 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
181 $ echo zzz > s/externals/other |
15321
e174353e8cda
subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents:
15282
diff
changeset
|
182 $ hg ci --subrepos -m 'amend externals from hg' |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
183 committing subrepository s |
33365
6d88468d435b
subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents:
30060
diff
changeset
|
184 abort: cannot commit svn externals (in subrepository "s") |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12209
diff
changeset
|
185 [255] |
12209
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
186 $ hg diff --subrepos -r 1:2 | grep -v diff |
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
187 --- a/.hgsubstate Thu Jan 01 00:00:00 1970 +0000 |
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
188 +++ b/.hgsubstate Thu Jan 01 00:00:00 1970 +0000 |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
189 @@ -1,2 +1,2 @@ |
12209
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
190 -2 s |
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
191 +3 s |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
192 2 subdir/s |
12209
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
193 --- a/a Thu Jan 01 00:00:00 1970 +0000 |
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
194 +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
195 @@ -1,1 +1,2 @@ |
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
196 a |
affec9fb56ef
subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents:
11916
diff
changeset
|
197 +a |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
198 $ svn revert -q s/externals/other |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10267
diff
changeset
|
199 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
200 this commit fails because of externals meta changes |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
201 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
202 $ svn propset svn:mime-type 'text/html' s/externals/other |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
203 property 'svn:mime-type' set on 's/externals/other' |
15321
e174353e8cda
subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents:
15282
diff
changeset
|
204 $ hg ci --subrepos -m 'amend externals from hg' |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
205 committing subrepository s |
33365
6d88468d435b
subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents:
30060
diff
changeset
|
206 abort: cannot commit svn externals (in subrepository "s") |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12209
diff
changeset
|
207 [255] |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
208 $ svn revert -q s/externals/other |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10267
diff
changeset
|
209 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
210 clone |
10178 | 211 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
212 $ cd .. |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
213 $ hg clone t tc |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
214 updating to branch default |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
215 A tc/s/alpha |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
216 U tc/s |
13907
a0ed0d0dd713
subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents:
13559
diff
changeset
|
217 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
218 Fetching external item into 'tc/s/externals'* (glob) |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
219 A tc/s/externals/other |
13907
a0ed0d0dd713
subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents:
13559
diff
changeset
|
220 Checked out external at revision 1. |
a0ed0d0dd713
subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents:
13559
diff
changeset
|
221 |
a0ed0d0dd713
subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents:
13559
diff
changeset
|
222 Checked out revision 3. |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
223 A tc/subdir/s/alpha |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
224 U tc/subdir/s |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
225 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
226 Fetching external item into 'tc/subdir/s/externals'* (glob) |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
227 A tc/subdir/s/externals/other |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
228 Checked out external at revision 1. |
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
229 |
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
230 Checked out revision 2. |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
231 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
232 $ cd tc |
10954
33119d0252c1
subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents:
10791
diff
changeset
|
233 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
234 debugsub in clone |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
235 |
12366
c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents:
12365
diff
changeset
|
236 $ hg debugsub |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
237 path s |
35450
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35400
diff
changeset
|
238 source file:/*/$TESTTMP/svn-repo/src (glob) |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
239 revision 3 |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
240 path subdir/s |
35450
991e4404e910
tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
Matt Harbison <matt_harbison@yahoo.com>
parents:
35400
diff
changeset
|
241 source file:/*/$TESTTMP/svn-repo/src (glob) |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
242 revision 2 |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
243 |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
244 verify subrepo is contained within the repo directory |
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
245 |
39739
5495ceab5637
py3: use print as a function in tests/test-subrepo-svn.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
39723
diff
changeset
|
246 $ "$PYTHON" -c "from __future__ import print_function; import os.path; print(os.path.exists('s'))" |
11916
d1ea16ca6520
tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents:
11142
diff
changeset
|
247 True |
12930
9bb180abc4d0
subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents:
12798
diff
changeset
|
248 |
9bb180abc4d0
subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents:
12798
diff
changeset
|
249 update to nullrev (must delete the subrepo) |
9bb180abc4d0
subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents:
12798
diff
changeset
|
250 |
9bb180abc4d0
subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents:
12798
diff
changeset
|
251 $ hg up null |
9bb180abc4d0
subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents:
12798
diff
changeset
|
252 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
13015
82ca0c43bc44
subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents:
12930
diff
changeset
|
253 $ ls |
13322
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
254 |
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
255 Check hg update --clean |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
256 $ cd "$TESTTMP/sub/t" |
13322
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
257 $ cd s |
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
258 $ echo c0 > alpha |
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
259 $ echo c1 > f1 |
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
260 $ echo c1 > f2 |
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
261 $ svn add f1 -q |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
262 $ svn status | sort |
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
263 |
13410
1f2b2c33d386
tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents:
13332
diff
changeset
|
264 ? * a (glob) |
1f2b2c33d386
tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents:
13332
diff
changeset
|
265 ? * f2 (glob) |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
266 A * f1 (glob) |
13410
1f2b2c33d386
tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents:
13332
diff
changeset
|
267 M * alpha (glob) |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
268 Performing status on external item at 'externals'* (glob) |
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
269 X * externals (glob) |
13332
927e3940bfc3
subrepo: fix update -C with svn subrepos when cwd != repo.root
Patrick Mezard <pmezard@gmail.com>
parents:
13322
diff
changeset
|
270 $ cd ../.. |
927e3940bfc3
subrepo: fix update -C with svn subrepos when cwd != repo.root
Patrick Mezard <pmezard@gmail.com>
parents:
13322
diff
changeset
|
271 $ hg -R t update -C |
13322
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
272 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
273 Fetching external item into 't/s/externals'* (glob) |
13322
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
274 Checked out external at revision 1. |
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
275 |
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
276 Checked out revision 3. |
c19b9282d3a7
subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents:
13287
diff
changeset
|
277 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
13332
927e3940bfc3
subrepo: fix update -C with svn subrepos when cwd != repo.root
Patrick Mezard <pmezard@gmail.com>
parents:
13322
diff
changeset
|
278 $ cd t/s |
16526
f2cc0ffb09de
test-subrepo-svn: fix non-determinism
Patrick Mezard <patrick@mezard.eu>
parents:
16451
diff
changeset
|
279 $ svn status | sort |
f2cc0ffb09de
test-subrepo-svn: fix non-determinism
Patrick Mezard <patrick@mezard.eu>
parents:
16451
diff
changeset
|
280 |
13410
1f2b2c33d386
tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents:
13332
diff
changeset
|
281 ? * a (glob) |
1f2b2c33d386
tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents:
13332
diff
changeset
|
282 ? * f1 (glob) |
1f2b2c33d386
tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents:
13332
diff
changeset
|
283 ? * f2 (glob) |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
284 Performing status on external item at 'externals'* (glob) |
16526
f2cc0ffb09de
test-subrepo-svn: fix non-determinism
Patrick Mezard <patrick@mezard.eu>
parents:
16451
diff
changeset
|
285 X * externals (glob) |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
286 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
287 Sticky subrepositories, no changes |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
288 $ cd "$TESTTMP/sub/t" |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
289 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
290 2 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
291 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
292 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
293 3 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
294 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
295 $ hg update 1 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
296 U *s/alpha (glob) |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
297 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
298 Fetching external item into '*s/externals'* (glob) |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
299 Checked out external at revision 1. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
300 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
301 Checked out revision 2. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
302 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
303 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
304 1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
305 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
306 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
307 2 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
308 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
309 |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
19811
diff
changeset
|
310 Sticky subrepositories, file changes |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
311 $ touch s/f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
312 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
313 $ svn add f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
314 A f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
315 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
316 $ hg id -n |
17255
3e856d8abe9c
identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents:
17108
diff
changeset
|
317 1+ |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
318 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
319 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
320 2M |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
321 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
322 $ hg update tip |
19811
5e10d41e7b9c
merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
19799
diff
changeset
|
323 subrepository s diverged (local revision: 2, remote revision: 3) |
42588
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
324 you can (m)erge, keep (l)ocal [working copy] or keep (r)emote [destination]. |
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
325 what do you want to do? m |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
326 subrepository sources for s differ |
42588
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
327 you can use (l)ocal source (2) or (r)emote source (3). |
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
328 what do you want to do? l |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
329 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
330 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
331 2+ |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
332 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
333 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
334 2M |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
335 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
336 $ hg update --clean tip |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
337 U *s/alpha (glob) |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
338 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
339 Fetching external item into '*s/externals'* (glob) |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
340 Checked out external at revision 1. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
341 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
342 Checked out revision 3. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
343 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
344 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
345 Sticky subrepository, revision updates |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
346 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
347 2 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
348 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
349 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
350 3 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
351 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
352 $ cd s |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
353 $ svn update -qr 1 |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
354 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
355 $ hg update 1 |
19811
5e10d41e7b9c
merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
19799
diff
changeset
|
356 subrepository s diverged (local revision: 3, remote revision: 2) |
42588
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
357 you can (m)erge, keep (l)ocal [working copy] or keep (r)emote [destination]. |
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
358 what do you want to do? m |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
359 subrepository sources for s differ (in checked out version) |
42588
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
360 you can use (l)ocal source (1) or (r)emote source (2). |
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
361 what do you want to do? l |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
362 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
363 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
364 1+ |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
365 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
366 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
367 1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
368 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
369 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
370 Sticky subrepository, file changes and revision updates |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
371 $ touch s/f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
372 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
373 $ svn add f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
374 A f1 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
375 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
376 1M |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
377 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
378 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
379 1+ |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
380 $ hg update tip |
19811
5e10d41e7b9c
merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
19799
diff
changeset
|
381 subrepository s diverged (local revision: 3, remote revision: 3) |
42588
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
382 you can (m)erge, keep (l)ocal [working copy] or keep (r)emote [destination]. |
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
383 what do you want to do? m |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
384 subrepository sources for s differ |
42588
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
385 you can use (l)ocal source (1) or (r)emote source (3). |
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
386 what do you want to do? l |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
387 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
388 $ hg id -n |
17255
3e856d8abe9c
identity: show trailing '+' for dirty subrepos (issue2839)
Patrick Mezard <patrick@mezard.eu>
parents:
17108
diff
changeset
|
389 2+ |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
390 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
391 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
392 1M |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
393 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
394 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
395 Sticky repository, update --clean |
17032
7dd82e0c43ea
test-subrepo-svn.t: partially adapt for Windows
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16898
diff
changeset
|
396 $ hg update --clean tip | grep -v 's[/\]externals[/\]other' |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
397 U *s/alpha (glob) |
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
398 U *s (glob) |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
399 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
400 Fetching external item into '*s/externals'* (glob) |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
401 Checked out external at revision 1. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
402 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
403 Checked out revision 3. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
404 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
405 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
406 2 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
407 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
408 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
409 3 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
410 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
411 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
412 Test subrepo already at intended revision: |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
413 $ cd s |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
414 $ svn update -qr 2 |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
415 $ cd .. |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
416 $ hg update 1 |
19811
5e10d41e7b9c
merge: let the user choose to merge, keep local or keep remote subrepo revisions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
19799
diff
changeset
|
417 subrepository s diverged (local revision: 3, remote revision: 2) |
42588
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
418 you can (m)erge, keep (l)ocal [working copy] or keep (r)emote [destination]. |
f6540aba8e3e
subrepos: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41510
diff
changeset
|
419 what do you want to do? m |
13417
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
420 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
421 $ hg id -n |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
422 1+ |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
423 $ cd s |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
424 $ svnversion |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
425 2 |
0748e18be470
subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents:
13410
diff
changeset
|
426 $ cd .. |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
427 |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
428 Test case where subversion would fail to update the subrepo because there |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
429 are unknown directories being replaced by tracked ones (happens with rebase). |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
430 |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
431 $ cd "$WCROOT/src" |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
432 $ mkdir dir |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
433 $ echo epsilon.py > dir/epsilon.py |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
434 $ svn add dir |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
435 A dir |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
436 A dir/epsilon.py |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
437 $ svn ci -qm 'Add dir/epsilon.py' |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
438 $ cd ../.. |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
439 $ hg init rebaserepo |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
440 $ cd rebaserepo |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
441 $ svn co -r5 --quiet "$SVNREPOURL"/src s |
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
442 $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
443 $ hg add .hgsub |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
444 $ hg ci -m addsub |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
445 $ echo a > a |
23963
8f02682ff3b0
subrepo: don't abort in add when non-hg subrepos are present (issue4513)
Matt Harbison <matt_harbison@yahoo.com>
parents:
22947
diff
changeset
|
446 $ hg add . |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
447 adding a |
23963
8f02682ff3b0
subrepo: don't abort in add when non-hg subrepos are present (issue4513)
Matt Harbison <matt_harbison@yahoo.com>
parents:
22947
diff
changeset
|
448 $ hg ci -m adda |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
449 $ hg up 0 |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
450 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
451 $ svn up -qr6 s |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
452 $ hg ci -m updatesub |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
453 created new head |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
454 $ echo pyc > s/dir/epsilon.pyc |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
455 $ hg up 1 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
456 D *s/dir (glob) |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
457 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
458 Fetching external item into '*s/externals'* (glob) |
14050
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
459 Checked out external at revision 1. |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
460 |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
461 Checked out revision 5. |
9e8a9d45945c
subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents:
13559
diff
changeset
|
462 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
16898
bb91c602d4ad
tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents:
16554
diff
changeset
|
463 $ hg up -q 2 |
14664
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
464 |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
465 Modify one of the externals to point to a different path so we can |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
466 test having obstructions when switching branches on checkout: |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
467 $ hg checkout tip |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
468 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
469 $ echo "obstruct = [svn] $SVNREPOURL/externals" >> .hgsub |
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
470 $ svn co -r5 --quiet "$SVNREPOURL"/externals obstruct |
15372
695ac6aca77f
check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents:
15346
diff
changeset
|
471 $ hg commit -m 'Start making obstructed working copy' |
14664
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
472 $ hg book other |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
473 $ hg co -r 'p1(tip)' |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
474 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21404
ca275f7ec576
update: when deactivating a bookmark, print a message
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
475 (leaving bookmark other) |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
476 $ echo "obstruct = [svn] $SVNREPOURL/src" >> .hgsub |
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
477 $ svn co -r5 --quiet "$SVNREPOURL"/src obstruct |
14664
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
478 $ hg commit -m 'Other branch which will be obstructed' |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
479 created new head |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
480 |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
481 Switching back to the head where we have another path mapped to the |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
482 same subrepo should work if the subrepo is clean. |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
483 $ hg co other |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
484 A *obstruct/other (glob) |
14664
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
485 Checked out revision 1. |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
486 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21503
10f15e34d86c
update: show message when a bookmark is activated by update
Stephen Lee <sphen.lee@gmail.com>
parents:
21404
diff
changeset
|
487 (activating bookmark other) |
14664
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
488 |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
489 This is surprising, but is also correct based on the current code: |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
490 $ echo "updating should (maybe) fail" > obstruct/other |
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
491 $ hg co tip |
19799
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
18364
diff
changeset
|
492 abort: uncommitted changes |
ab3e42225dbc
update: add error message for dirty non-linear update with no rev
Siddharth Agarwal <sid0@fb.com>
parents:
18364
diff
changeset
|
493 (commit or update --clean to discard changes) |
14664
0ae98cd2a83f
svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents:
14052
diff
changeset
|
494 [255] |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
495 |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
496 Point to a Subversion branch which has since been deleted and recreated |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
497 First, create that condition in the repository. |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
498 |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
499 $ hg ci --subrepos -m cleanup | filter_svn_output |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
500 committing subrepository obstruct |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
501 Sending obstruct/other |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
502 Committed revision 7. |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
503 At revision 7. |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
504 $ svn mkdir -qm "baseline" $SVNREPOURL/trunk |
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
505 $ svn copy -qm "initial branch" $SVNREPOURL/trunk $SVNREPOURL/branch |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
506 $ svn co --quiet "$SVNREPOURL"/branch tempwc |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
507 $ cd tempwc |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
508 $ echo "something old" > somethingold |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
509 $ svn add somethingold |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
510 A somethingold |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
511 $ svn ci -qm 'Something old' |
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
512 $ svn rm -qm "remove branch" $SVNREPOURL/branch |
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
513 $ svn copy -qm "recreate branch" $SVNREPOURL/trunk $SVNREPOURL/branch |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
514 $ svn up -q |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
515 $ echo "something new" > somethingnew |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
516 $ svn add somethingnew |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
517 A somethingnew |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
518 $ svn ci -qm 'Something new' |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
519 $ cd .. |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
520 $ rm -rf tempwc |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
521 $ svn co "$SVNREPOURL/branch"@10 recreated |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
522 A recreated/somethingold |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
523 Checked out revision 10. |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
524 $ echo "recreated = [svn] $SVNREPOURL/branch" >> .hgsub |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
525 $ hg ci -m addsub |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
526 $ cd recreated |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
527 $ svn up -q |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
528 $ cd .. |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
529 $ hg ci -m updatesub |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
530 $ hg up -r-2 |
15607
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
531 D *recreated/somethingnew (glob) |
fab28a577a38
test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents:
15372
diff
changeset
|
532 A *recreated/somethingold (glob) |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
533 Checked out revision 10. |
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
534 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21404
ca275f7ec576
update: when deactivating a bookmark, print a message
Siddharth Agarwal <sid0@fb.com>
parents:
21024
diff
changeset
|
535 (leaving bookmark other) |
15282
d4addef0ec74
tests: don't use 'test -e'
Mads Kiilerich <mads@kiilerich.com>
parents:
14820
diff
changeset
|
536 $ test -f recreated/somethingold |
14820
7ef125fa9b35
subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents:
14664
diff
changeset
|
537 |
16450
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
538 Test archive |
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
539 |
25125
bd625cd4e5e7
progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25111
diff
changeset
|
540 $ hg archive -S ../archive-all --debug --config progress.debug=true |
16450
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
541 archiving: 0/2 files (0.00%) |
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
542 archiving: .hgsub 1/2 files (50.00%) |
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
543 archiving: .hgsubstate 2/2 files (100.00%) |
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
544 archiving (obstruct): 0/1 files (0.00%) |
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
545 archiving (obstruct): 1/1 files (100.00%) |
18364
6252b4f1c4b4
subrepos: process subrepos in sorted order
Mads Kiilerich <mads@kiilerich.com>
parents:
18109
diff
changeset
|
546 archiving (recreated): 0/1 files (0.00%) |
6252b4f1c4b4
subrepos: process subrepos in sorted order
Mads Kiilerich <mads@kiilerich.com>
parents:
18109
diff
changeset
|
547 archiving (recreated): 1/1 files (100.00%) |
16450
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
548 archiving (s): 0/2 files (0.00%) |
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
549 archiving (s): 1/2 files (50.00%) |
c9c8c9053119
archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents:
15607
diff
changeset
|
550 archiving (s): 2/2 files (100.00%) |
16527
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16526
diff
changeset
|
551 |
25125
bd625cd4e5e7
progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25111
diff
changeset
|
552 $ hg archive -S ../archive-exclude --debug --config progress.debug=true -X **old |
17108
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
553 archiving: 0/2 files (0.00%) |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
554 archiving: .hgsub 1/2 files (50.00%) |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
555 archiving: .hgsubstate 2/2 files (100.00%) |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
556 archiving (obstruct): 0/1 files (0.00%) |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
557 archiving (obstruct): 1/1 files (100.00%) |
18364
6252b4f1c4b4
subrepos: process subrepos in sorted order
Mads Kiilerich <mads@kiilerich.com>
parents:
18109
diff
changeset
|
558 archiving (recreated): 0 files |
17108
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
559 archiving (s): 0/2 files (0.00%) |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
560 archiving (s): 1/2 files (50.00%) |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
561 archiving (s): 2/2 files (100.00%) |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
562 $ find ../archive-exclude | sort |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
563 ../archive-exclude |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
564 ../archive-exclude/.hg_archival.txt |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
565 ../archive-exclude/.hgsub |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
566 ../archive-exclude/.hgsubstate |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
567 ../archive-exclude/obstruct |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
568 ../archive-exclude/obstruct/other |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
569 ../archive-exclude/s |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
570 ../archive-exclude/s/alpha |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
571 ../archive-exclude/s/dir |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
572 ../archive-exclude/s/dir/epsilon.py |
1894dac619de
subrepo: propagate matcher to subrepos when archiving
Matt Harbison <matt_harbison@yahoo.com>
parents:
17033
diff
changeset
|
573 |
16527
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16526
diff
changeset
|
574 Test forgetting files, not implemented in svn subrepo, used to |
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16526
diff
changeset
|
575 traceback |
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16526
diff
changeset
|
576 |
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16526
diff
changeset
|
577 $ hg forget 'notafile*' |
35239
feecfefeba25
tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents:
34967
diff
changeset
|
578 notafile*: $ENOENT$ |
16527
17a1f7690b49
subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents:
16526
diff
changeset
|
579 [1] |
16554
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
580 |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
581 Test a subrepo referencing a just moved svn path. Last commit rev will |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
582 be different from the revision, and the path will be different as |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
583 well. |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
584 |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
585 $ cd "$WCROOT" |
16554
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
586 $ svn up > /dev/null |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
587 $ mkdir trunk/subdir branches |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
588 $ echo a > trunk/subdir/a |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
589 $ svn add trunk/subdir branches |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
590 A trunk/subdir |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
591 A trunk/subdir/a |
16554
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
592 A branches |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
593 $ svn ci -qm addsubdir |
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
594 $ svn cp -qm branchtrunk $SVNREPOURL/trunk $SVNREPOURL/branches/somebranch |
16554
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
595 $ cd .. |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
596 |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
597 $ hg init repo2 |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
598 $ cd repo2 |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
599 $ svn co $SVNREPOURL/branches/somebranch/subdir |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
600 A subdir/a |
16554
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
601 Checked out revision 15. |
17033
0413f68da85c
tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents:
17032
diff
changeset
|
602 $ echo "subdir = [svn] $SVNREPOURL/branches/somebranch/subdir" > .hgsub |
16554
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
603 $ hg add .hgsub |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
604 $ hg ci -m addsub |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
605 $ hg up null |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
606 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
607 $ hg up |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
608 A *subdir/a (glob) |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
609 Checked out revision 15. |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
610 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ae2664ee0223
subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents:
16530
diff
changeset
|
611 $ cd .. |
21564
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
612 |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
613 Test sanitizing ".hg/hgrc" in subrepo |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
614 |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
615 $ cd sub/t |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
616 $ hg update -q -C tip |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
617 $ cd s |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
618 $ mkdir .hg |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
619 $ echo '.hg/hgrc in svn repo' > .hg/hgrc |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
620 $ mkdir -p sub/.hg |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
621 $ echo 'sub/.hg/hgrc in svn repo' > sub/.hg/hgrc |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
622 $ svn add .hg sub |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
623 A .hg |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
624 A .hg/hgrc |
21564
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
625 A sub |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
626 A sub/.hg |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
627 A sub/.hg/hgrc |
26374
048e41e9a6ac
tests: suppress verbose output of svn transaction
Yuya Nishihara <yuya@tcha.org>
parents:
25382
diff
changeset
|
628 $ svn ci -qm 'add .hg/hgrc to be sanitized at hg update' |
21564
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
629 $ svn up -q |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
630 $ cd .. |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
631 $ hg commit -S -m 'commit with svn revision including .hg/hgrc' |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
632 $ grep ' s$' .hgsubstate |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
633 16 s |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
634 $ cd .. |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
635 |
21566
a01988cd9b61
subrepo: make "_sanitize()" take absolute path to the root of subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21564
diff
changeset
|
636 $ hg -R tc pull -u -q 2>&1 | sort |
35400
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
637 warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/.hg' |
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35239
diff
changeset
|
638 warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/sub/.hg' |
21564
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
639 $ cd tc |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
640 $ grep ' s$' .hgsubstate |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
641 16 s |
21930
a5168eb9b2bc
tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents:
21585
diff
changeset
|
642 $ test -f s/.hg/hgrc |
21564
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
643 [1] |
21930
a5168eb9b2bc
tests: cat error messages are different on Solaris
Danek Duvall <danek.duvall@oracle.com>
parents:
21585
diff
changeset
|
644 $ test -f s/sub/.hg/hgrc |
21564
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
645 [1] |
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
646 |
21567
5900bc09e684
subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21566
diff
changeset
|
647 Test that sanitizing is omitted in meta data area: |
5900bc09e684
subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21566
diff
changeset
|
648 |
5900bc09e684
subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21566
diff
changeset
|
649 $ mkdir s/.svn/.hg |
5900bc09e684
subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21566
diff
changeset
|
650 $ echo '.hg/hgrc in svn metadata area' > s/.svn/.hg/hgrc |
5900bc09e684
subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21566
diff
changeset
|
651 $ hg update -q -C '.^1' |
5900bc09e684
subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21566
diff
changeset
|
652 |
21564
2e91d4964ecd
subrepo: make "_sanitize()" work
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21024
diff
changeset
|
653 $ cd ../.. |
33655
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
654 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
655 SEC: test for ssh exploit |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
656 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
657 $ hg init ssh-vuln |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
658 $ cd ssh-vuln |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
659 $ echo "s = [svn]$SVNREPOURL/src" >> .hgsub |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
660 $ svn co --quiet "$SVNREPOURL"/src s |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
661 $ hg add .hgsub |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
662 $ hg ci -m1 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
663 $ echo "s = [svn]svn+ssh://-oProxyCommand=touch%20owned%20nested" > .hgsub |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
664 $ hg ci -m2 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
665 $ cd .. |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
666 $ hg clone ssh-vuln ssh-vuln-clone |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
667 updating to branch default |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
668 abort: potentially unsafe url: 'svn+ssh://-oProxyCommand=touch owned nested' (in subrepository "s") |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
669 [255] |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
670 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
671 also check that a percent encoded '-' (%2D) doesn't work |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
672 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
673 $ cd ssh-vuln |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
674 $ echo "s = [svn]svn+ssh://%2DoProxyCommand=touch%20owned%20nested" > .hgsub |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
675 $ hg ci -m3 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
676 $ cd .. |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
677 $ rm -r ssh-vuln-clone |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
678 $ hg clone ssh-vuln ssh-vuln-clone |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
679 updating to branch default |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
680 abort: potentially unsafe url: 'svn+ssh://-oProxyCommand=touch owned nested' (in subrepository "s") |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
681 [255] |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
682 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
683 also check that hiding the attack in the username doesn't work: |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
684 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
685 $ cd ssh-vuln |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
686 $ echo "s = [svn]svn+ssh://%2DoProxyCommand=touch%20owned%20foo@example.com/nested" > .hgsub |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
687 $ hg ci -m3 |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
688 $ cd .. |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
689 $ rm -r ssh-vuln-clone |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
690 $ hg clone ssh-vuln ssh-vuln-clone |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
691 updating to branch default |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
692 abort: potentially unsafe url: 'svn+ssh://-oProxyCommand=touch owned foo@example.com/nested' (in subrepository "s") |
60ee7af2a2ba
subrepo: add tests for svn rogue ssh urls (SEC)
Sean Farley <sean@farley.io>
parents:
33365
diff
changeset
|
693 [255] |