annotate tests/test-clone.t @ 16719:e7bf09acd410

localrepo: add branchtip() method for faster single-branch lookups For the PyPy repo with 744 branches and 843 branch heads, this brings hg log -r default over NFS from: CallCount Recursive Total(ms) Inline(ms) module:lineno(function) 3249 0 1.3222 1.3222 <open> 3244 0 0.6211 0.6211 <method 'close' of 'file' objects> 3243 0 0.0800 0.0800 <method 'read' of 'file' objects> 3241 0 0.0660 0.0660 <method 'seek' of 'file' objects> 3905 0 0.0476 0.0476 <zlib.decompress> 3281 0 2.6756 0.0472 mercurial.changelog:182(read) +3281 0 2.5256 0.0453 +mercurial.revlog:881(revision) +3276 0 0.0389 0.0196 +mercurial.changelog:28(decodeextra) +6562 0 0.0123 0.0123 +<method 'split' of 'str' objects> +6562 0 0.0408 0.0073 +mercurial.encoding:61(tolocal) +3281 0 0.0054 0.0054 +<method 'index' of 'str' objects> 3241 0 2.2464 0.0456 mercurial.revlog:818(_loadchunk) +3241 0 0.6205 0.6205 +<method 'close' of 'file' objects> +3241 0 0.0765 0.0765 +<method 'read' of 'file' objects> +3241 0 0.0660 0.0660 +<method 'seek' of 'file' objects> +3241 0 1.4209 0.0135 +mercurial.store:374(__call__) +3241 0 0.0122 0.0107 +mercurial.revlog:810(_addchunk) 3281 0 2.5256 0.0453 mercurial.revlog:881(revision) +3280 0 0.0175 0.0175 +mercurial.revlog:305(rev) +3281 0 2.2819 0.0119 +mercurial.revlog:847(_chunkraw) +3281 0 0.0603 0.0083 +mercurial.revlog:945(_checkhash) +3281 0 0.0051 0.0051 +mercurial.revlog:349(flags) +3281 0 0.0040 0.0040 +<mercurial.mpatch.patches> 13682 0 0.0479 0.0248 <method 'decode' of 'str' objects> +7418 0 0.0228 0.0076 +encodings.utf_8:15(decode) +1 0 0.0003 0.0000 +encodings:71(search_function) 3248 0 1.3995 0.0246 mercurial.scmutil:218(__call__) +3248 0 1.3222 1.3222 +<open> +3248 0 0.0235 0.0184 +os.path:80(split) +3248 0 0.0084 0.0068 +mercurial.scmutil:92(__call__) Time: real 2.750 secs (user 0.680+0.000 sys 0.360+0.000) down to: CallCount Recursive Total(ms) Inline(ms) module:lineno(function) 55 31 0.0197 0.0163 <__import__> +1 0 0.0006 0.0002 +mercurial.context:8(<module>) +1 0 0.0042 0.0001 +mercurial.revlog:12(<module>) +1 0 0.0002 0.0001 +mercurial.match:8(<module>) +1 0 0.0003 0.0001 +mercurial.dirstate:7(<module>) +1 0 0.0057 0.0001 +mercurial.changelog:8(<module>) 1 0 0.0117 0.0032 mercurial.localrepo:525(_readbranchcache) +844 0 0.0015 0.0015 +<binascii.unhexlify> +845 0 0.0010 0.0010 +<method 'split' of 'str' objects> +843 0 0.0045 0.0009 +mercurial.encoding:61(tolocal) +843 0 0.0004 0.0004 +<method 'setdefault' of 'dict' objects> +1 0 0.0003 0.0003 +<method 'close' of 'file' objects> 3 0 0.0029 0.0029 <method 'read' of 'file' objects> 9 0 0.0018 0.0018 <open> 990 0 0.0017 0.0017 <binascii.unhexlify> 53 0 0.0016 0.0016 mercurial.demandimport:43(__init__) 862 0 0.0015 0.0015 <_codecs.utf_8_decode> 862 0 0.0037 0.0014 <method 'decode' of 'str' objects> +862 0 0.0023 0.0008 +encodings.utf_8:15(decode) 981 0 0.0011 0.0011 <method 'split' of 'str' objects> 861 0 0.0046 0.0009 mercurial.encoding:61(tolocal) +861 0 0.0037 0.0014 +<method 'decode' of 'str' objects> 862 0 0.0023 0.0008 encodings.utf_8:15(decode) +862 0 0.0015 0.0015 +<_codecs.utf_8_decode> 4 0 0.0008 0.0008 <method 'close' of 'file' objects> 179 154 0.0202 0.0004 mercurial.demandimport:83(__getattribute__) +36 11 0.0199 0.0003 +mercurial.demandimport:55(_load) +72 0 0.0001 0.0001 +mercurial.demandimport:83(__getattribute__) +36 0 0.0000 0.0000 +<getattr> 1 0 0.0015 0.0004 mercurial.tags:148(_readtagcache) Time: real 0.060 secs (user 0.030+0.000 sys 0.010+0.000)
author Brodie Rao <brodie@sf.io>
date Sun, 13 May 2012 14:04:04 +0200
parents fc8c7a5ccc4a
children cda5402b1739
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
1 Prepare repo a:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
2
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13058
diff changeset
3 $ hg init a
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
4 $ cd a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
5 $ echo a > a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
6 $ hg add a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
7 $ hg commit -m test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
8 $ echo first line > b
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
9 $ hg add b
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
10
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
11 Create a non-inlined filelog:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
12
15522
cf0f3cb8a332 tests: don't use stdout redirection for test data
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
13 $ python -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))'
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
14 $ for j in 0 1 2 3 4 5 6 7 8 9; do
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
15 > cat data1 >> b
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
16 > hg commit -m test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
17 > done
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
18
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
19 List files in store/data (should show a 'b.d'):
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
20
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
21 $ for i in .hg/store/data/*; do
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
22 > echo $i
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
23 > done
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
24 .hg/store/data/a.i
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
25 .hg/store/data/b.d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
26 .hg/store/data/b.i
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
27
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
28 Default operation:
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
29
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
30 $ hg clone . ../b
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
31 updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
32 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
33 $ cd ../b
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
34 $ cat a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
35 a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
36 $ hg verify
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
37 checking changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
38 checking manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
39 crosschecking files in changesets and manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
40 checking files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
41 2 files, 11 changesets, 11 total revisions
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
42
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
43 Invalid dest '' must abort:
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
44
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
45 $ hg clone . ''
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 15520
diff changeset
46 abort: * (glob)
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
47 [255]
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
48
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
49 No update, with debug option:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
50
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
51 $ hg --debug clone -U . ../c
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
52 linked 8 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
53 $ cd ../c
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
54 $ cat a 2>/dev/null || echo "a not present"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
55 a not present
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
56 $ hg verify
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
57 checking changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
58 checking manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
59 crosschecking files in changesets and manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
60 checking files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
61 2 files, 11 changesets, 11 total revisions
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
62
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
63 Default destination:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
64
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
65 $ mkdir ../d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
66 $ cd ../d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
67 $ hg clone ../a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
68 destination directory: a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
69 updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
70 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
71 $ cd a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
72 $ hg cat a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
73 a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
74 $ cd ../..
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
75
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
76 Check that we drop the 'file:' from the path before writing the .hgrc:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
77
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
78 $ hg clone file:a e
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
79 updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
80 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
81 $ grep 'file:' e/.hg/hgrc
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11839
diff changeset
82 [1]
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
83
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
84 Check that path aliases are expanded:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
85
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
86 $ hg clone -q -U --config 'paths.foobar=a#0' foobar f
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
87 $ hg -R f showconfig paths.default
15520
d6d7b56ec346 tests: add missing '(glob)'s to match '\' in paths in test output on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 14553
diff changeset
88 $TESTTMP/a#0 (glob)
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
89
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
90 Use --pull:
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
91
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
92 $ hg clone --pull a g
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
93 requesting all changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
94 adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
95 adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
96 adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
97 added 11 changesets with 11 changes to 2 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
98 updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
99 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
100 $ hg -R g verify
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
101 checking changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
102 checking manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
103 crosschecking files in changesets and manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
104 checking files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
105 2 files, 11 changesets, 11 total revisions
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
106
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
107 Invalid dest '' with --pull must abort (issue2528):
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
108
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
109 $ hg clone --pull a ''
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 15520
diff changeset
110 abort: * (glob)
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
111 [255]
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
112
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
113 Clone to '.':
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
114
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
115 $ mkdir h
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
116 $ cd h
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
117 $ hg clone ../a .
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
118 updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
119 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
120 $ cd ..
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
121
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
122
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
123 *** Tests for option -u ***
5225
76c4cadb49fc clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 1926
diff changeset
124
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
125 Adding some more history to repo a:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
126
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
127 $ cd a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
128 $ hg tag ref1
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
129 $ echo the quick brown fox >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
130 $ hg ci -m "hacked default"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
131 $ hg up ref1
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
132 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
133 $ hg branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
134 marked working directory as branch stable
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14553
diff changeset
135 (branches are permanent and global, did you want a bookmark?)
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
136 $ echo some text >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
137 $ hg ci -m "starting branch stable"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
138 $ hg tag ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
139 $ echo some more text >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
140 $ hg ci -m "another change for branch stable"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
141 $ hg up ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
142 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
143 $ hg parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
144 changeset: 13:e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
145 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
146 tag: ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
147 parent: 10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
148 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
149 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
150 summary: starting branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
151
5225
76c4cadb49fc clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 1926
diff changeset
152
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
153 Repo a has two heads:
6088
3b96cefc1b2b clone: expand the path before saving it in .hg/hgrc
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5225
diff changeset
154
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
155 $ hg heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
156 changeset: 15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
157 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
158 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
159 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
160 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
161 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
162
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
163 changeset: 12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
164 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
165 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
166 summary: hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
167
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
168
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
169 $ cd ..
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
170
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
171
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
172 Testing --noupdate with --updaterev (must abort):
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
173
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
174 $ hg clone --noupdate --updaterev 1 a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
175 abort: cannot specify both --noupdate and --updaterev
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11839
diff changeset
176 [255]
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
177
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
178
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
179 Testing clone -u:
6947
a7fcb43af82e increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 6088
diff changeset
180
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
181 $ hg clone -u . a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
182 updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
183 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
184
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
185 Repo ua has both heads:
7927
a218ba5f60df allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents: 6947
diff changeset
186
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
187 $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
188 changeset: 15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
189 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
190 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
191 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
192 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
193 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
194
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
195 changeset: 12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
196 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
197 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
198 summary: hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
199
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
200
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
201 Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
202
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
203 $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
204 e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
205 $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
206 e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
207
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
208 $ rm -r ua
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
209
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
210
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
211 Testing clone --pull -u:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
212
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
213 $ hg clone --pull -u . a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
214 requesting all changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
215 adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
216 adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
217 adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
218 added 16 changesets with 16 changes to 3 files (+1 heads)
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
219 updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
220 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
221
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
222 Repo ua has both heads:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
223
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
224 $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
225 changeset: 15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
226 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
227 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
228 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
229 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
230 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
231
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
232 changeset: 12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
233 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
234 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
235 summary: hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
236
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
237
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
238 Same revision checked out in repo a and ua:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
239
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
240 $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
241 e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
242 $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
243 e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
244
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
245 $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
246
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
247
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
248 Testing clone -u <branch>:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
249
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
250 $ hg clone -u stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
251 updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
252 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
253
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
254 Repo ua has both heads:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
255
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
256 $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
257 changeset: 15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
258 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
259 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
260 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
261 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
262 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
263
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
264 changeset: 12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
265 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
266 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
267 summary: hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
268
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
269
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
270 Branch 'stable' is checked out:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
271
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
272 $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
273 changeset: 15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
274 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
275 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
276 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
277 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
278 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
279
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
280
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
281 $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
282
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
283
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
284 Testing default checkout:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
285
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
286 $ hg clone a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
287 updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
288 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
289
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
290 Repo ua has both heads:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
291
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
292 $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
293 changeset: 15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
294 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
295 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
296 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
297 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
298 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
299
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
300 changeset: 12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
301 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
302 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
303 summary: hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
304
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
305
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
306 Branch 'default' is checked out:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
307
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
308 $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
309 changeset: 12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
310 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
311 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
312 summary: hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
313
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
314
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
315 $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
316
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
317
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
318 Testing #<branch>:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
319
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
320 $ hg clone -u . a#stable ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
321 adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
322 adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
323 adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
324 added 14 changesets with 14 changes to 3 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
325 updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
326 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
327
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
328 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
329
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
330 $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
331 changeset: 13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
332 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
333 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
334 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
335 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
336 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
337
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
338 changeset: 10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
339 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
340 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
341 summary: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
342
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
343
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
344 Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
345
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
346 $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
347 e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
348 $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
349 e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
350
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
351 $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
352
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
353
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
354 Testing -u -r <branch>:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
355
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
356 $ hg clone -u . -r stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
357 adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
358 adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
359 adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
360 added 14 changesets with 14 changes to 3 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
361 updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
362 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
363
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
364 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
365
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
366 $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
367 changeset: 13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
368 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
369 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
370 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
371 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
372 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
373
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
374 changeset: 10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
375 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
376 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
377 summary: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
378
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
379
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
380 Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
381
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
382 $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
383 e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
384 $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
385 e8ece76546a6
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
386
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
387 $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
388
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
389
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
390 Testing -r <branch>:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
391
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
392 $ hg clone -r stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
393 adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
394 adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
395 adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
396 added 14 changesets with 14 changes to 3 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
397 updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
398 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
399
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
400 Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6):
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
401
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
402 $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
403 changeset: 13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
404 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
405 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
406 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
407 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
408 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
409
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
410 changeset: 10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
411 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
412 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
413 summary: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
414
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
415
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
416 Branch 'stable' is checked out:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
417
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
418 $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
419 changeset: 13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
420 branch: stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
421 tag: tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
422 user: test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
423 date: Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
424 summary: another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
425
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
426
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
427 $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
428
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
429
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
430 Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
431 iterable in addbranchrevs()
11544
be5e86c80628 hg.clone: fix branch value when passing a repo object (issue2267)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11295
diff changeset
432
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
433 $ cat <<EOF > simpleclone.py
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
434 > from mercurial import ui, hg
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
435 > myui = ui.ui()
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
436 > repo = hg.repository(myui, 'a')
14553
d976542986d2 hg: add opts argument to clone for internal remoteui
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13956
diff changeset
437 > hg.clone(myui, {}, repo, dest="ua")
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
438 > EOF
11544
be5e86c80628 hg.clone: fix branch value when passing a repo object (issue2267)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11295
diff changeset
439
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
440 $ python simpleclone.py
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
441 updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
442 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
443
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
444 $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
445
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
446 $ cat <<EOF > branchclone.py
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
447 > from mercurial import ui, hg
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
448 > myui = ui.ui()
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
449 > repo = hg.repository(myui, 'a')
14553
d976542986d2 hg: add opts argument to clone for internal remoteui
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13956
diff changeset
450 > hg.clone(myui, {}, repo, dest="ua", branch=["stable",])
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
451 > EOF
11818
b1ae33b813cb hg.clone: do not ignore branch argument when source is a repo object
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11544
diff changeset
452
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
453 $ python branchclone.py
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
454 adding changesets
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
455 adding manifests
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
456 adding file changes
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
457 added 14 changesets with 14 changes to 3 files
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
458 updating to branch stable
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
459 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
460 $ rm -r ua