tests/test-clone.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 26 Apr 2024 19:10:35 +0100
changeset 51626 865efc020c33
parent 51492 2e8a88e5809f
permissions -rw-r--r--
dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 39489
diff changeset
    13
  $ "$PYTHON" -c 'open("data1", "wb").write(b"".join(b"%d\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
37338
cbc4425e81b5 tests: conditionalize tests based on presence of revlogs for files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36217
diff changeset
    21
#if reporevlogstore
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    22
  $ for i in .hg/store/data/*; do
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    23
  >   echo $i
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    24
  > done
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    25
  .hg/store/data/a.i
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    26
  .hg/store/data/b.d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    27
  .hg/store/data/b.i
37338
cbc4425e81b5 tests: conditionalize tests based on presence of revlogs for files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36217
diff changeset
    28
#endif
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    29
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    30
Trigger branchcache creation:
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    31
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    32
  $ hg branches
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    33
  default                       10:a7949464abda
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    34
  $ ls .hg/cache
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    35
  branch2-served
23786
7d63398fbfd1 branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents: 23096
diff changeset
    36
  rbc-names-v1
7d63398fbfd1 branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents: 23096
diff changeset
    37
  rbc-revs-v1
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    38
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    39
Default operation:
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
    40
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    41
  $ hg clone . ../b
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    42
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    43
  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
    44
  $ cd ../b
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    45
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    46
Ensure branchcache got copied over:
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    47
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    48
  $ ls .hg/cache
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46071
diff changeset
    49
  branch2-base
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    50
  branch2-served
32494
53a67ba9fb44 local-clone: also copy revs-branch-cache files
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
    51
  rbc-names-v1
53a67ba9fb44 local-clone: also copy revs-branch-cache files
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
    52
  rbc-revs-v1
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46071
diff changeset
    53
  tags2
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46071
diff changeset
    54
  tags2-served
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    55
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    56
  $ cat a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    57
  a
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48526
diff changeset
    58
  $ hg verify -q
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    59
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    60
Invalid dest '' must abort:
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    61
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    62
  $ hg clone . ''
17159
36a3016811d1 localrepo: use the path relative to "self.vfs" instead of "path" argument
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17135
diff changeset
    63
  abort: empty destination path is not valid
45847
d68618954ade errors: use InputError for some errors on `hg clone`
Martin von Zweigbergk <martinvonz@google.com>
parents: 45839
diff changeset
    64
  [10]
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    65
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    66
No update, with debug option:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    67
16971
8aeb2f1ae94c tests: introduce hghave hardlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 16898
diff changeset
    68
#if hardlink
25125
bd625cd4e5e7 progress: get the extremely verbose output out of default debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24611
diff changeset
    69
  $ hg --debug clone -U . ../c --config progress.debug=true
51492
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    70
  linking: 1/12 files (8.33%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    71
  linking: 2/12 files (16.67%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    72
  linking: 3/12 files (25.00%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    73
  linking: 4/12 files (33.33%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    74
  linking: 5/12 files (41.67%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    75
  linking: 6/12 files (50.00%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    76
  linking: 7/12 files (58.33%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    77
  linking: 8/12 files (66.67%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    78
  linking: 9/12 files (75.00%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    79
  linking: 10/12 files (83.33%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    80
  linking: 11/12 files (91.67%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    81
  linking: 12/12 files (100.00%) (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    82
  linked 12 files (no-rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    83
  linking: 1/14 files (7.14%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    84
  linking: 2/14 files (14.29%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    85
  linking: 3/14 files (21.43%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    86
  linking: 4/14 files (28.57%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    87
  linking: 5/14 files (35.71%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    88
  linking: 6/14 files (42.86%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    89
  linking: 7/14 files (50.00%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    90
  linking: 8/14 files (57.14%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    91
  linking: 9/14 files (64.29%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    92
  linking: 10/14 files (71.43%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    93
  linking: 11/14 files (78.57%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    94
  linking: 12/14 files (85.71%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    95
  linking: 13/14 files (92.86%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    96
  linking: 14/14 files (100.00%) (rust !)
2e8a88e5809f branchcache: stop writing more branchcache file on disk than needed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51181
diff changeset
    97
  linked 14 files (rust !)
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46071
diff changeset
    98
  updating the branch cache
16971
8aeb2f1ae94c tests: introduce hghave hardlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 16898
diff changeset
    99
#else
25241
aa36204766e4 tests: fix test-clone on vfat
Matt Mackall <mpm@selenic.com>
parents: 25125
diff changeset
   100
  $ hg --debug clone -U . ../c --config progress.debug=true
40617
e5f54c4ec075 copystore: provide unit to ui.makeprogress()
Anton Shestakov <av6@dwimlabs.net>
parents: 40369
diff changeset
   101
  linking: 1 files
e5f54c4ec075 copystore: provide unit to ui.makeprogress()
Anton Shestakov <av6@dwimlabs.net>
parents: 40369
diff changeset
   102
  copying: 2 files
e5f54c4ec075 copystore: provide unit to ui.makeprogress()
Anton Shestakov <av6@dwimlabs.net>
parents: 40369
diff changeset
   103
  copying: 3 files
e5f54c4ec075 copystore: provide unit to ui.makeprogress()
Anton Shestakov <av6@dwimlabs.net>
parents: 40369
diff changeset
   104
  copying: 4 files
e5f54c4ec075 copystore: provide unit to ui.makeprogress()
Anton Shestakov <av6@dwimlabs.net>
parents: 40369
diff changeset
   105
  copying: 5 files
e5f54c4ec075 copystore: provide unit to ui.makeprogress()
Anton Shestakov <av6@dwimlabs.net>
parents: 40369
diff changeset
   106
  copying: 6 files
e5f54c4ec075 copystore: provide unit to ui.makeprogress()
Anton Shestakov <av6@dwimlabs.net>
parents: 40369
diff changeset
   107
  copying: 7 files
e5f54c4ec075 copystore: provide unit to ui.makeprogress()
Anton Shestakov <av6@dwimlabs.net>
parents: 40369
diff changeset
   108
  copying: 8 files
16971
8aeb2f1ae94c tests: introduce hghave hardlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 16898
diff changeset
   109
#endif
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   110
  $ cd ../c
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
   111
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
   112
Ensure branchcache got copied over:
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
   113
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
   114
  $ ls .hg/cache
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46071
diff changeset
   115
  branch2-base
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
   116
  branch2-served
32494
53a67ba9fb44 local-clone: also copy revs-branch-cache files
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
   117
  rbc-names-v1
53a67ba9fb44 local-clone: also copy revs-branch-cache files
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 31830
diff changeset
   118
  rbc-revs-v1
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46071
diff changeset
   119
  tags2
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46071
diff changeset
   120
  tags2-served
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
   121
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   122
  $ cat a 2>/dev/null || echo "a not present"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   123
  a not present
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48526
diff changeset
   124
  $ hg verify -q
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
   125
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   126
Default destination:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   127
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   128
  $ mkdir ../d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   129
  $ cd ../d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   130
  $ hg clone ../a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   131
  destination directory: a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   132
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   133
  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
   134
  $ cd a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   135
  $ hg cat a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   136
  a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   137
  $ cd ../..
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
   138
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   139
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
   140
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   141
  $ hg clone file:a e
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   142
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   143
  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
   144
  $ grep 'file:' e/.hg/hgrc
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11839
diff changeset
   145
  [1]
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   146
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   147
Check that path aliases are expanded:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   148
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   149
  $ 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
   150
  $ hg -R f showconfig paths.default
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34885
diff changeset
   151
  $TESTTMP/a#0
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   152
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   153
Use --pull:
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
   154
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   155
  $ hg clone --pull a g
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   156
  requesting all changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   157
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   158
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   159
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   160
  added 11 changesets with 11 changes to 2 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33773
diff changeset
   161
  new changesets acb14030fe0a:a7949464abda
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   162
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   163
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48526
diff changeset
   164
  $ hg -R g verify -q
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   165
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
   166
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
   167
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
   168
  $ hg clone --pull a ''
17159
36a3016811d1 localrepo: use the path relative to "self.vfs" instead of "path" argument
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17135
diff changeset
   169
  abort: empty destination path is not valid
45847
d68618954ade errors: use InputError for some errors on `hg clone`
Martin von Zweigbergk <martinvonz@google.com>
parents: 45839
diff changeset
   170
  [10]
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
   171
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   172
Clone to '.':
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
  $ mkdir h
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   175
  $ cd h
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   176
  $ hg clone ../a .
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   177
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   178
  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
   179
  $ cd ..
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   180
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   181
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   182
*** 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
   183
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   184
Adding some more history to repo a:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   185
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   186
  $ cd a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   187
  $ hg tag ref1
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   188
  $ echo the quick brown fox >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   189
  $ hg ci -m "hacked default"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   190
  $ hg up ref1
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   191
  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
   192
  $ hg branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   193
  marked working directory as branch stable
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14553
diff changeset
   194
  (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
   195
  $ echo some text >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   196
  $ hg ci -m "starting branch stable"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   197
  $ hg tag ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   198
  $ echo some more text >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   199
  $ hg ci -m "another change for branch stable"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   200
  $ hg up ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   201
  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
   202
  $ hg parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   203
  changeset:   13:e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   204
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   205
  tag:         ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   206
  parent:      10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   207
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   208
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   209
  summary:     starting branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   210
  
5225
76c4cadb49fc clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 1926
diff changeset
   211
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   212
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
   213
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   214
  $ hg heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   215
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   216
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   217
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   218
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   219
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   220
  summary:     another change for branch stable
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
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   223
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   224
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   225
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   226
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   227
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   228
  $ cd ..
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   229
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   230
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   231
Testing --noupdate with --updaterev (must abort):
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   232
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   233
  $ hg clone --noupdate --updaterev 1 a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   234
  abort: cannot specify both --noupdate and --updaterev
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45462
diff changeset
   235
  [10]
11806
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
Testing clone -u:
6947
a7fcb43af82e increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 6088
diff changeset
   239
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   240
  $ hg clone -u . a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   241
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   242
  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
   243
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   244
Repo ua has both heads:
7927
a218ba5f60df allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents: 6947
diff changeset
   245
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   246
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   247
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   248
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   249
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   250
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   251
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   252
  summary:     another change for branch stable
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
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   255
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   256
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   257
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   258
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   259
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   260
Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   261
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   262
  $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   263
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   264
  $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   265
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   266
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   267
  $ rm -r ua
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   268
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
Testing clone --pull -u:
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 clone --pull -u . a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   273
  requesting all changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   274
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   275
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   276
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   277
  added 16 changesets with 16 changes to 3 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33773
diff changeset
   278
  new changesets acb14030fe0a:0aae7cf88f0d
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   279
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   280
  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
   281
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   282
Repo ua has both heads:
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
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   285
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   286
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   287
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   288
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   289
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   290
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   291
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   292
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   293
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   294
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   295
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   296
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   297
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   298
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
   299
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   300
  $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   301
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   302
  $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   303
  e8ece76546a6
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
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   306
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   307
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   308
Testing clone -u <branch>:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   309
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   310
  $ hg clone -u stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   311
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   312
  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
   313
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   314
Repo ua has both heads:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   315
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   316
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   317
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   318
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   319
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   320
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   321
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   322
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   323
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   324
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   325
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   326
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   327
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   328
  
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   329
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   330
Branch 'stable' is checked out:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   331
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   332
  $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   333
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   334
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   335
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   336
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   337
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   338
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   339
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   340
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   341
  $ rm -r ua
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
Testing default checkout:
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 clone a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   347
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   348
  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
   349
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   350
Repo ua has both heads:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   351
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   352
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   353
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   354
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   355
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   356
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   357
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   358
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   359
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   360
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   361
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   362
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   363
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   364
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   365
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   366
Branch 'default' is checked out:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   367
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   368
  $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   369
  changeset:   12:f21241060d6a
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:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   373
  
17869
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   374
Test clone with a branch named "@" (issue3677)
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   375
17869
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   376
  $ hg -R ua branch @
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   377
  marked working directory as branch @
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   378
  $ hg -R ua commit -m 'created branch @'
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   379
  $ hg clone ua atbranch
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   380
  updating to branch default
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   381
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   382
  $ hg -R atbranch heads
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   383
  changeset:   16:798b6d97153e
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   384
  branch:      @
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   385
  tag:         tip
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   386
  parent:      12:f21241060d6a
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   387
  user:        test
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   388
  date:        Thu Jan 01 00:00:00 1970 +0000
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   389
  summary:     created branch @
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   390
  
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   391
  changeset:   15:0aae7cf88f0d
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   392
  branch:      stable
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   393
  user:        test
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   394
  date:        Thu Jan 01 00:00:00 1970 +0000
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   395
  summary:     another change for branch stable
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   396
  
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   397
  changeset:   12:f21241060d6a
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   398
  user:        test
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   399
  date:        Thu Jan 01 00:00:00 1970 +0000
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   400
  summary:     hacked default
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   401
  
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   402
  $ hg -R atbranch parents
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   403
  changeset:   12:f21241060d6a
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   404
  user:        test
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   405
  date:        Thu Jan 01 00:00:00 1970 +0000
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   406
  summary:     hacked default
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   407
  
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   408
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   409
  $ rm -r ua atbranch
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   410
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   411
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   412
Testing #<branch>:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   413
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   414
  $ hg clone -u . a#stable ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   415
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   416
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   417
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   418
  added 14 changesets with 14 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33773
diff changeset
   419
  new changesets acb14030fe0a:0aae7cf88f0d
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   420
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   421
  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
   422
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   423
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
   424
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   425
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   426
  changeset:   13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   427
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   428
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   429
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   430
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   431
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   432
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   433
  changeset:   10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   434
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   435
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   436
  summary:     test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   437
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   438
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   439
Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   440
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   441
  $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   442
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   443
  $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   444
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   445
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   446
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   447
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   448
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   449
Testing -u -r <branch>:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   450
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   451
  $ hg clone -u . -r stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   452
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   453
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   454
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   455
  added 14 changesets with 14 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33773
diff changeset
   456
  new changesets acb14030fe0a:0aae7cf88f0d
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   457
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   458
  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
   459
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   460
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
   461
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   462
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   463
  changeset:   13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   464
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   465
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   466
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   467
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   468
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   469
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   470
  changeset:   10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   471
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   472
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   473
  summary:     test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   474
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   475
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   476
Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   477
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   478
  $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   479
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   480
  $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   481
  e8ece76546a6
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   482
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   483
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   484
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   485
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   486
Testing -r <branch>:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   487
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   488
  $ hg clone -r stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   489
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   490
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   491
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   492
  added 14 changesets with 14 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33773
diff changeset
   493
  new changesets acb14030fe0a:0aae7cf88f0d
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   494
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   495
  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
   496
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   497
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
   498
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   499
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   500
  changeset:   13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   501
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   502
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   503
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   504
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   505
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   506
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   507
  changeset:   10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   508
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   509
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   510
  summary:     test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   511
  
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   512
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   513
Branch 'stable' is checked out:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   514
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   515
  $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   516
  changeset:   13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   517
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   518
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   519
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   520
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   521
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   522
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   523
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   524
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   525
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   526
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
   527
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
   528
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
   529
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   530
  $ cat <<EOF > simpleclone.py
40369
ef6cab7930b3 py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 40219
diff changeset
   531
  > from mercurial import hg, ui as uimod
ef6cab7930b3 py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 40219
diff changeset
   532
  > myui = uimod.ui.load()
37668
2a42ca2679e2 py3: add b'' prefixes to make values bytes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 37424
diff changeset
   533
  > repo = hg.repository(myui, b'a')
2a42ca2679e2 py3: add b'' prefixes to make values bytes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 37424
diff changeset
   534
  > hg.clone(myui, {}, repo, dest=b"ua")
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   535
  > EOF
11544
be5e86c80628 hg.clone: fix branch value when passing a repo object (issue2267)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11295
diff changeset
   536
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 39489
diff changeset
   537
  $ "$PYTHON" simpleclone.py
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   538
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   539
  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
   540
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   541
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   542
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   543
  $ cat <<EOF > branchclone.py
40369
ef6cab7930b3 py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 40219
diff changeset
   544
  > from mercurial import extensions, hg, ui as uimod
ef6cab7930b3 py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 40219
diff changeset
   545
  > myui = uimod.ui.load()
17135
06733dfe1a43 test-clone: load extensions before doing anything
Bryan O'Sullivan <bryano@fb.com>
parents: 16971
diff changeset
   546
  > extensions.loadall(myui)
40729
c93d046d4300 extensions: add "uipopulate" hook, called per instance, not per process
Yuya Nishihara <yuya@tcha.org>
parents: 40617
diff changeset
   547
  > extensions.populateui(myui)
37668
2a42ca2679e2 py3: add b'' prefixes to make values bytes
Pulkit Goyal <7895pulkit@gmail.com>
parents: 37424
diff changeset
   548
  > repo = hg.repository(myui, b'a')
41734
6462bbb91b53 tests: bulk change to avoid "unneeded trailing ',' ..." error of check-code.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 41303
diff changeset
   549
  > hg.clone(myui, {}, repo, dest=b"ua", branch=[b"stable"])
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   550
  > 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
   551
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 39489
diff changeset
   552
  $ "$PYTHON" branchclone.py
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   553
  adding changesets
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   554
  adding manifests
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   555
  adding file changes
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   556
  added 14 changesets with 14 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33773
diff changeset
   557
  new changesets acb14030fe0a:0aae7cf88f0d
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   558
  updating to branch stable
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   559
  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
   560
  $ rm -r ua
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   561
47795
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   562
Local clones don't get confused by unusual experimental.evolution options
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   563
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   564
  $ hg clone \
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   565
  >   --config experimental.evolution=allowunstable,allowdivergence,exchange \
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   566
  >   a ua
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   567
  updating to branch default
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   568
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   569
  $ rm -r ua
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   570
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   571
  $ hg clone \
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   572
  >   --config experimental.evolution.createmarkers=no \
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   573
  >   --config experimental.evolution.allowunstable=yes \
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   574
  >   --config experimental.evolution.allowdivergence=yes \
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   575
  >   --config experimental.evolution.exchange=yes \
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   576
  >   a ua
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   577
  updating to branch default
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   578
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b1e1559f5a45 obsolete: disable other evolution config options if createmarkers is off
Anton Shestakov <av6@dwimlabs.net>
parents: 47447
diff changeset
   579
  $ rm -r ua
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   580
17756
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   581
Test clone with special '@' bookmark:
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   582
  $ cd a
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   583
  $ hg bookmark -r a7949464abda @  # branch point of stable from default
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   584
  $ hg clone . ../i
17882
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   585
  updating to bookmark @
17756
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   586
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   587
  $ hg id -i ../i
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   588
  a7949464abda
17882
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   589
  $ rm -r ../i
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   590
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   591
  $ hg bookmark -f -r stable @
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   592
  $ hg bookmarks
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   593
     @                         15:0aae7cf88f0d
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   594
  $ hg clone . ../i
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   595
  updating to bookmark @ on branch stable
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   596
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   597
  $ hg id -i ../i
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   598
  0aae7cf88f0d
17881
603d4fbad36d test-clone: fix directory level
Adrian Buehlmann <adrian@cadifra.com>
parents: 17872
diff changeset
   599
  $ cd "$TESTTMP"
17756
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   600
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   601
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   602
Testing failures:
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   603
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   604
  $ mkdir fail
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   605
  $ cd fail
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   606
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   607
No local source
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   608
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   609
  $ hg clone a b
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45847
diff changeset
   610
  abort: repository a not found
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   611
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   612
43947
b4c82b704180 py3: force bytestr conversion of "reason" in scmutil.callcatch()
Denis Laxalde <denis@laxalde.org>
parents: 42897
diff changeset
   613
Invalid URL
b4c82b704180 py3: force bytestr conversion of "reason" in scmutil.callcatch()
Denis Laxalde <denis@laxalde.org>
parents: 42897
diff changeset
   614
b4c82b704180 py3: force bytestr conversion of "reason" in scmutil.callcatch()
Denis Laxalde <denis@laxalde.org>
parents: 42897
diff changeset
   615
  $ hg clone http://invalid:url/a b
b4c82b704180 py3: force bytestr conversion of "reason" in scmutil.callcatch()
Denis Laxalde <denis@laxalde.org>
parents: 42897
diff changeset
   616
  abort: error: nonnumeric port: 'url'
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   617
  [100]
43947
b4c82b704180 py3: force bytestr conversion of "reason" in scmutil.callcatch()
Denis Laxalde <denis@laxalde.org>
parents: 42897
diff changeset
   618
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   619
No remote source
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   620
23059
6ecd1ff8c42c tests: add "(glob)" for l10n messages in test-clone.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   621
#if windows
31008
636cf3f7620d tests: use LOCALIP
Jun Wu <quark@fb.com>
parents: 30559
diff changeset
   622
  $ hg clone http://$LOCALIP:3121/a b
23059
6ecd1ff8c42c tests: add "(glob)" for l10n messages in test-clone.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   623
  abort: error: * (glob)
46071
f4f07cc92a47 tests: update the exit status codes for Windows specific tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 46070
diff changeset
   624
  [100]
23059
6ecd1ff8c42c tests: add "(glob)" for l10n messages in test-clone.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   625
#else
31008
636cf3f7620d tests: use LOCALIP
Jun Wu <quark@fb.com>
parents: 30559
diff changeset
   626
  $ hg clone http://$LOCALIP:3121/a b
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   627
  abort: error: *refused* (glob)
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   628
  [100]
23059
6ecd1ff8c42c tests: add "(glob)" for l10n messages in test-clone.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   629
#endif
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   630
  $ rm -rf b # work around bug with http clone
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   631
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   632
20008
e54a078153f7 tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents: 18227
diff changeset
   633
#if unix-permissions no-root
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   634
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   635
Inaccessible source
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   636
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   637
  $ mkdir a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   638
  $ chmod 000 a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   639
  $ hg clone a b
50320
adecb1ab4a0d tests: add a rewriting step to detect EACCES errors
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49825
diff changeset
   640
  abort: $EACCES$: *$TESTTMP/fail/a/.hg* (glob)
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   641
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   642
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   643
Inaccessible destination
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   644
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   645
  $ hg init b
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   646
  $ cd b
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   647
  $ hg clone . ../a
50320
adecb1ab4a0d tests: add a rewriting step to detect EACCES errors
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 49825
diff changeset
   648
  abort: $EACCES$: *../a* (glob)
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   649
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   650
  $ cd ..
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   651
  $ chmod 700 a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   652
  $ rm -r a b
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   653
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   654
#endif
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   655
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   656
16898
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   657
#if fifo
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   658
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   659
Source of wrong type
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   660
16898
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   661
  $ mkfifo a
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   662
  $ hg clone a b
40219
7ba6b880b09a py3: glob some difference between py2 and py3 output
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 40176
diff changeset
   663
  abort: $ENOTDIR$: *$TESTTMP/fail/a/.hg* (glob)
16898
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   664
  [255]
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   665
  $ rm a
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   666
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   667
#endif
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   668
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   669
Default destination, same directory
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   670
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   671
  $ hg init q
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   672
  $ hg clone q
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   673
  destination directory: q
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   674
  abort: destination 'q' is not empty
45847
d68618954ade errors: use InputError for some errors on `hg clone`
Martin von Zweigbergk <martinvonz@google.com>
parents: 45839
diff changeset
   675
  [10]
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   676
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   677
destination directory not empty
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   678
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17307
diff changeset
   679
  $ mkdir a
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   680
  $ echo stuff > a/a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   681
  $ hg clone q a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   682
  abort: destination 'a' is not empty
45847
d68618954ade errors: use InputError for some errors on `hg clone`
Martin von Zweigbergk <martinvonz@google.com>
parents: 45839
diff changeset
   683
  [10]
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   684
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   685
20008
e54a078153f7 tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents: 18227
diff changeset
   686
#if unix-permissions no-root
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   687
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   688
leave existing directory in place after clone failure
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   689
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   690
  $ hg init c
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   691
  $ cd c
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   692
  $ echo c > c
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   693
  $ hg commit -A -m test
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   694
  adding c
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   695
  $ chmod -rx .hg/store/data
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   696
  $ cd ..
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   697
  $ mkdir d
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   698
  $ hg clone c d 2> err
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   699
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   700
  $ test -d d
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   701
  $ test -d d/.hg
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   702
  [1]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   703
17424
e7cfe3587ea4 fix trivial spelling errors
Mads Kiilerich <mads@kiilerich.com>
parents: 17345
diff changeset
   704
re-enable perm to allow deletion
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   705
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   706
  $ chmod +rx c/.hg/store/data
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   707
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   708
#endif
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   709
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   710
  $ cd ..
20825
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   711
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   712
Test clone from the repository in (emulated) revlog format 0 (issue4203):
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   713
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   714
  $ mkdir issue4203
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   715
  $ mkdir -p src/.hg
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   716
  $ echo foo > src/foo
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   717
  $ hg -R src add src/foo
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   718
  $ hg -R src commit -m '#0'
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   719
  $ hg -R src log -q
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   720
  0:e1bab28bca43
50725
7e5be4a7cda7 tests: use grep -E instead of obsolescent egrep
Mads Kiilerich <mads@kiilerich.com>
parents: 50320
diff changeset
   721
  $ hg -R src debugrevlog -c | grep -E 'format|flags'
41303
c953c2a94d68 revlog: fix resolution of revlog version 0
Yuya Nishihara <yuya@tcha.org>
parents: 40792
diff changeset
   722
  format : 0
c953c2a94d68 revlog: fix resolution of revlog version 0
Yuya Nishihara <yuya@tcha.org>
parents: 40792
diff changeset
   723
  flags  : (none)
42419
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 41965
diff changeset
   724
  $ hg root -R src -T json | sed 's|\\\\|\\|g'
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 41965
diff changeset
   725
  [
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 41965
diff changeset
   726
   {
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 41965
diff changeset
   727
    "hgpath": "$TESTTMP/src/.hg",
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 41965
diff changeset
   728
    "reporoot": "$TESTTMP/src",
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 41965
diff changeset
   729
    "storepath": "$TESTTMP/src/.hg"
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 41965
diff changeset
   730
   }
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 41965
diff changeset
   731
  ]
20825
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   732
  $ hg clone -U -q src dst
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   733
  $ hg -R dst log -q
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   734
  0:e1bab28bca43
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   735
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   736
Create repositories to test auto sharing functionality
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   737
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   738
  $ cat >> $HGRCPATH << EOF
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   739
  > [extensions]
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   740
  > share=
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   741
  > EOF
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   742
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   743
  $ hg init empty
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   744
  $ hg init source1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   745
  $ cd source1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   746
  $ echo initial1 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   747
  $ hg -q commit -A -m initial
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   748
  $ echo second > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   749
  $ hg commit -m second
20825
dda11e799529 hg: use "os.path.join()" to join path components which may be empty (issue4203)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20008
diff changeset
   750
  $ cd ..
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   751
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   752
  $ hg init filteredrev0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   753
  $ cd filteredrev0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   754
  $ cat >> .hg/hgrc << EOF
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   755
  > [experimental]
34866
1644623ab096 config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   756
  > evolution.createmarkers=True
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   757
  > EOF
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   758
  $ echo initial1 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   759
  $ hg -q commit -A -m initial0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   760
  $ hg -q up -r null
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   761
  $ echo initial2 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   762
  $ hg -q commit -A -m initial1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   763
  $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8
42893
34a46d48d24e debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42419
diff changeset
   764
  1 new obsolescence markers
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33335
diff changeset
   765
  obsoleted 1 changesets
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   766
  $ cd ..
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   767
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   768
  $ hg -q clone --pull source1a source1b
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   769
  $ cd source1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   770
  $ hg bookmark bookA
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   771
  $ echo 1a > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   772
  $ hg commit -m 1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   773
  $ cd ../source1b
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   774
  $ hg -q up -r 0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   775
  $ echo head1 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>