tests/test-clone.t
author Eugene Baranov <eug.baranov@gmail.com>
Wed, 22 Jul 2015 16:57:11 +0100
branchstable
changeset 25884 b810b59eca62
parent 25864 84074e4fc80f
child 26026 d08e7449ff27
permissions -rw-r--r--
convert: when converting from Perforce use original local encoding by default On Windows Perforce command line client uses default system locale to encode output. Using 'latin_1' causes locale-specific characters to be replaced with question marks. With this patch we will use default locale by default whilst allowing to specify it explicity with 'convert.p4.encoding' config option. This is a potentially breaking change for any scripts relying on output treated as in 'latin_1' encoding. Also because hgext.convert.convcmd overwrites detected default system locale with UTF-8 we had to introduce an import cycle in hgext.convert.p4 to retrieve originally detected encoding from hgext.convert.convcmd.
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
22947
c63a09b6b337 tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents: 22648
diff changeset
    13
  $ $PYTHON -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))'
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    14
  $ for j in 0 1 2 3 4 5 6 7 8 9; do
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    15
  >   cat data1 >> b
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    16
  >   hg commit -m test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    17
  > done
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    18
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    19
List files in store/data (should show a 'b.d'):
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    20
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    21
  $ for i in .hg/store/data/*; do
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    22
  >   echo $i
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    23
  > done
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    24
  .hg/store/data/a.i
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    25
  .hg/store/data/b.d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    26
  .hg/store/data/b.i
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    27
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    28
Trigger branchcache creation:
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    29
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    30
  $ hg branches
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    31
  default                       10:a7949464abda
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    32
  $ ls .hg/cache
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    33
  branch2-served
23786
7d63398fbfd1 branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents: 23096
diff changeset
    34
  rbc-names-v1
7d63398fbfd1 branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents: 23096
diff changeset
    35
  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
    36
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    37
Default operation:
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
    38
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    39
  $ hg clone . ../b
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    40
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    41
  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
    42
  $ cd ../b
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    43
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    44
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
    45
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    46
  $ ls .hg/cache
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    47
  branch2-served
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    48
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    49
  $ cat a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    50
  a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    51
  $ hg verify
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    52
  checking changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    53
  checking manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    54
  crosschecking files in changesets and manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    55
  checking files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    56
  2 files, 11 changesets, 11 total revisions
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    57
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    58
Invalid dest '' must abort:
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    59
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    60
  $ 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
    61
  abort: empty destination path is not valid
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    62
  [255]
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    63
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    64
No update, with debug option:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    65
16971
8aeb2f1ae94c tests: introduce hghave hardlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 16898
diff changeset
    66
#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
    67
  $ hg --debug clone -U . ../c --config progress.debug=true
24440
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23786
diff changeset
    68
  linking: 1
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23786
diff changeset
    69
  linking: 2
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23786
diff changeset
    70
  linking: 3
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23786
diff changeset
    71
  linking: 4
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23786
diff changeset
    72
  linking: 5
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23786
diff changeset
    73
  linking: 6
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23786
diff changeset
    74
  linking: 7
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23786
diff changeset
    75
  linking: 8
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    76
  linked 8 files
16971
8aeb2f1ae94c tests: introduce hghave hardlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 16898
diff changeset
    77
#else
25241
aa36204766e4 tests: fix test-clone on vfat
Matt Mackall <mpm@selenic.com>
parents: 25125
diff changeset
    78
  $ hg --debug clone -U . ../c --config progress.debug=true
24611
82fddb3d6bc0 test-clone: fix test expectations on systems without hardlinks
Augie Fackler <augie@google.com>
parents: 24440
diff changeset
    79
  linking: 1
82fddb3d6bc0 test-clone: fix test expectations on systems without hardlinks
Augie Fackler <augie@google.com>
parents: 24440
diff changeset
    80
  copying: 2
82fddb3d6bc0 test-clone: fix test expectations on systems without hardlinks
Augie Fackler <augie@google.com>
parents: 24440
diff changeset
    81
  copying: 3
82fddb3d6bc0 test-clone: fix test expectations on systems without hardlinks
Augie Fackler <augie@google.com>
parents: 24440
diff changeset
    82
  copying: 4
82fddb3d6bc0 test-clone: fix test expectations on systems without hardlinks
Augie Fackler <augie@google.com>
parents: 24440
diff changeset
    83
  copying: 5
82fddb3d6bc0 test-clone: fix test expectations on systems without hardlinks
Augie Fackler <augie@google.com>
parents: 24440
diff changeset
    84
  copying: 6
82fddb3d6bc0 test-clone: fix test expectations on systems without hardlinks
Augie Fackler <augie@google.com>
parents: 24440
diff changeset
    85
  copying: 7
82fddb3d6bc0 test-clone: fix test expectations on systems without hardlinks
Augie Fackler <augie@google.com>
parents: 24440
diff changeset
    86
  copying: 8
16971
8aeb2f1ae94c tests: introduce hghave hardlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 16898
diff changeset
    87
  copied 8 files
8aeb2f1ae94c tests: introduce hghave hardlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 16898
diff changeset
    88
#endif
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    89
  $ cd ../c
22264
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    90
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    91
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
    92
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    93
  $ ls .hg/cache
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    94
  branch2-served
4bc1fd86e915 clone: for local clones, copy over filtered branchcaches as well (issue4286)
Siddharth Agarwal <sid0@fb.com>
parents: 20825
diff changeset
    95
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    96
  $ cat a 2>/dev/null || echo "a not present"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    97
  a not present
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    98
  $ hg verify
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
    99
  checking changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   100
  checking manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   101
  crosschecking files in changesets and manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   102
  checking files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   103
  2 files, 11 changesets, 11 total revisions
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
   104
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   105
Default destination:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   106
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   107
  $ mkdir ../d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   108
  $ cd ../d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   109
  $ hg clone ../a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   110
  destination directory: a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   111
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   112
  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
   113
  $ cd a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   114
  $ hg cat a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   115
  a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   116
  $ cd ../..
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
   117
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   118
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
   119
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   120
  $ hg clone file:a e
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   121
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   122
  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
   123
  $ grep 'file:' e/.hg/hgrc
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11839
diff changeset
   124
  [1]
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   125
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   126
Check that path aliases are expanded:
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
  $ 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
   129
  $ hg -R f showconfig paths.default
15520
d6d7b56ec346 tests: add missing '(glob)'s to match '\' in paths in test output on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 14553
diff changeset
   130
  $TESTTMP/a#0 (glob)
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   131
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   132
Use --pull:
550
96ff7dae94f7 [PATCH] Tests for clone command
mpm@selenic.com
parents:
diff changeset
   133
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   134
  $ hg clone --pull a g
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   135
  requesting all changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   136
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   137
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   138
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   139
  added 11 changesets with 11 changes to 2 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   140
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   141
  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
   142
  $ hg -R g verify
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   143
  checking changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   144
  checking manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   145
  crosschecking files in changesets and manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   146
  checking files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   147
  2 files, 11 changesets, 11 total revisions
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   148
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
   149
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
   150
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
   151
  $ 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
   152
  abort: empty destination path is not valid
13058
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
   153
  [255]
5986f44ea63c test-clone.t: add basic cases for destination ''
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
   154
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   155
Clone to '.':
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   156
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   157
  $ mkdir h
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   158
  $ cd h
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   159
  $ hg clone ../a .
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   160
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   161
  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
   162
  $ cd ..
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   163
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   164
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   165
*** 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
   166
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   167
Adding some more history to repo a:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   168
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   169
  $ cd a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   170
  $ hg tag ref1
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   171
  $ echo the quick brown fox >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   172
  $ hg ci -m "hacked default"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   173
  $ hg up ref1
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   174
  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
   175
  $ hg branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   176
  marked working directory as branch stable
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 14553
diff changeset
   177
  (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
   178
  $ echo some text >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   179
  $ hg ci -m "starting branch stable"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   180
  $ hg tag ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   181
  $ echo some more text >a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   182
  $ hg ci -m "another change for branch stable"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   183
  $ hg up ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   184
  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
   185
  $ hg parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   186
  changeset:   13:e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   187
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   188
  tag:         ref2
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   189
  parent:      10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   190
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   191
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   192
  summary:     starting branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   193
  
5225
76c4cadb49fc clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 1926
diff changeset
   194
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   195
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
   196
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   197
  $ hg heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   198
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   199
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   200
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   201
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   202
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   203
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   204
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   205
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   206
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   207
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   208
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   209
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   210
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   211
  $ cd ..
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   212
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   213
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   214
Testing --noupdate with --updaterev (must abort):
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   215
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   216
  $ hg clone --noupdate --updaterev 1 a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   217
  abort: cannot specify both --noupdate and --updaterev
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11839
diff changeset
   218
  [255]
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   219
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   220
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   221
Testing clone -u:
6947
a7fcb43af82e increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 6088
diff changeset
   222
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   223
  $ hg clone -u . a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   224
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   225
  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
   226
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   227
Repo ua has both heads:
7927
a218ba5f60df allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents: 6947
diff changeset
   228
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   229
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   230
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   231
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   232
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   233
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   234
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   235
  summary:     another change for branch stable
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
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   238
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   239
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   240
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   241
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   242
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   243
Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   244
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   245
  $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   246
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   247
  $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   248
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   249
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   250
  $ rm -r ua
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   251
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   252
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   253
Testing clone --pull -u:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   254
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   255
  $ hg clone --pull -u . a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   256
  requesting all changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   257
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   258
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   259
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   260
  added 16 changesets with 16 changes to 3 files (+1 heads)
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   261
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   262
  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
   263
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   264
Repo ua has both heads:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   265
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   266
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   267
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   268
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   269
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   270
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   271
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   272
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   273
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   274
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   275
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   276
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   277
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   278
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   279
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   280
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
   281
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   282
  $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   283
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   284
  $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   285
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   286
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   287
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   288
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   289
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   290
Testing clone -u <branch>:
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
  $ hg clone -u stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   293
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   294
  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
   295
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   296
Repo ua has both heads:
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
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   299
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   300
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   301
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   302
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   303
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   304
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   305
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   306
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   307
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   308
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   309
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   310
  
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   311
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   312
Branch 'stable' is checked out:
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
  $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   315
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   316
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   317
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   318
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   319
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   320
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   321
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   322
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   323
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   324
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   325
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   326
Testing default checkout:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   327
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   328
  $ hg clone a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   329
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   330
  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
   331
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   332
Repo ua has both heads:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   333
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   334
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   335
  changeset:   15:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   336
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   337
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   338
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   339
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   340
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   341
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   342
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   343
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   344
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   345
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   346
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   347
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   348
Branch 'default' is checked out:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   349
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   350
  $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   351
  changeset:   12:f21241060d6a
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   352
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   353
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   354
  summary:     hacked default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   355
  
17869
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   356
Test clone with a branch named "@" (issue3677)
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   357
17869
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   358
  $ 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
   359
  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
   360
  $ 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
   361
  $ 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
   362
  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
   363
  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
   364
  $ 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
   365
  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
   366
  branch:      @
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   367
  tag:         tip
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   368
  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
   369
  user:        test
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   370
  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
   371
  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
   372
  
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   373
  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
   374
  branch:      stable
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   375
  user:        test
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   376
  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
   377
  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
   378
  
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   379
  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
   380
  user:        test
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   381
  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
   382
  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
   383
  
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   384
  $ 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
   385
  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
   386
  user:        test
c79b404b99ae test-clone.t: check that branch "@" is not automatically checked out
Thomas Arendsen Hein <thomas@intevation.de>
parents: 17756
diff changeset
   387
  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
   388
  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
   389
  
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
  $ rm -r ua atbranch
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   392
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   393
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   394
Testing #<branch>:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   395
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   396
  $ hg clone -u . a#stable ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   397
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   398
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   399
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   400
  added 14 changesets with 14 changes to 3 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   401
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   402
  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
   403
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   404
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
   405
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   406
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   407
  changeset:   13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   408
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   409
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   410
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   411
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   412
  summary:     another change for branch stable
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
  changeset:   10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   415
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   416
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   417
  summary:     test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   418
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   419
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   420
Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   421
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   422
  $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   423
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   424
  $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   425
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   426
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   427
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   428
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   429
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   430
Testing -u -r <branch>:
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   431
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   432
  $ hg clone -u . -r stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   433
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   434
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   435
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   436
  added 14 changesets with 14 changes to 3 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   437
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   438
  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
   439
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   440
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
   441
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   442
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   443
  changeset:   13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   444
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   445
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   446
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   447
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   448
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   449
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   450
  changeset:   10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   451
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   452
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   453
  summary:     test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   454
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   455
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   456
Same revision checked out in repo a and ua:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   457
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   458
  $ hg -R a parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   459
  e8ece76546a6
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   460
  $ hg -R ua parents --template "{node|short}\n"
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   461
  e8ece76546a6
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   462
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   463
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   464
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   465
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   466
Testing -r <branch>:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   467
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   468
  $ hg clone -r stable a ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   469
  adding changesets
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   470
  adding manifests
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   471
  adding file changes
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   472
  added 14 changesets with 14 changes to 3 files
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   473
  updating to branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   474
  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
   475
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   476
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
   477
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   478
  $ hg -R ua heads
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   479
  changeset:   13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   480
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   481
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   482
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   483
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   484
  summary:     another change for branch stable
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
  changeset:   10:a7949464abda
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   487
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   488
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   489
  summary:     test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   490
  
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   491
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   492
Branch 'stable' is checked out:
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   493
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   494
  $ hg -R ua parents
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   495
  changeset:   13:0aae7cf88f0d
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   496
  branch:      stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   497
  tag:         tip
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   498
  user:        test
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   499
  date:        Thu Jan 01 00:00:00 1970 +0000
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   500
  summary:     another change for branch stable
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   501
  
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   502
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   503
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   504
9714
2f1ab7f77ddc clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   505
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
   506
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
   507
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
   508
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   509
  $ cat <<EOF > simpleclone.py
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   510
  > from mercurial import ui, hg
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   511
  > myui = ui.ui()
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   512
  > repo = hg.repository(myui, 'a')
14553
d976542986d2 hg: add opts argument to clone for internal remoteui
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13956
diff changeset
   513
  > hg.clone(myui, {}, repo, dest="ua")
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   514
  > EOF
11544
be5e86c80628 hg.clone: fix branch value when passing a repo object (issue2267)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11295
diff changeset
   515
11806
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   516
  $ python simpleclone.py
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   517
  updating to branch default
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   518
  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
   519
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   520
  $ rm -r ua
fd66a181f575 tests: unify test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents: 11544
diff changeset
   521
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   522
  $ cat <<EOF > branchclone.py
17135
06733dfe1a43 test-clone: load extensions before doing anything
Bryan O'Sullivan <bryano@fb.com>
parents: 16971
diff changeset
   523
  > from mercurial import ui, hg, extensions
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   524
  > myui = ui.ui()
17135
06733dfe1a43 test-clone: load extensions before doing anything
Bryan O'Sullivan <bryano@fb.com>
parents: 16971
diff changeset
   525
  > extensions.loadall(myui)
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   526
  > repo = hg.repository(myui, 'a')
14553
d976542986d2 hg: add opts argument to clone for internal remoteui
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 13956
diff changeset
   527
  > hg.clone(myui, {}, repo, dest="ua", branch=["stable",])
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   528
  > 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
   529
11839
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   530
  $ python branchclone.py
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   531
  adding changesets
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   532
  adding manifests
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   533
  adding file changes
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   534
  added 14 changesets with 14 changes to 3 files
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   535
  updating to branch stable
8c034517b406 test-clone: f1c2de22b8a8 lost changes from b1ae33b813cb
Martin Geisler <mg@aragost.com>
parents: 11823
diff changeset
   536
  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
   537
  $ rm -r ua
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   538
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   539
17756
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   540
Test clone with special '@' bookmark:
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   541
  $ cd a
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   542
  $ 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
   543
  $ hg clone . ../i
17882
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   544
  updating to bookmark @
17756
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   545
  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
   546
  $ hg id -i ../i
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   547
  a7949464abda
17882
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   548
  $ rm -r ../i
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   549
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   550
  $ hg bookmark -f -r stable @
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   551
  $ hg bookmarks
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   552
     @                         15:0aae7cf88f0d
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   553
  $ hg clone . ../i
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   554
  updating to bookmark @ on branch stable
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   555
  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
   556
  $ hg id -i ../i
36ed69d4593d clone: show status "updating to bookmark @"
Adrian Buehlmann <adrian@cadifra.com>
parents: 17881
diff changeset
   557
  0aae7cf88f0d
17881
603d4fbad36d test-clone: fix directory level
Adrian Buehlmann <adrian@cadifra.com>
parents: 17872
diff changeset
   558
  $ cd "$TESTTMP"
17756
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   559
92980a8dfdfe clone: update to @ bookmark if it exists
Kevin Bullock <kbullock@ringworld.org>
parents: 17424
diff changeset
   560
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   561
Testing failures:
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   562
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   563
  $ mkdir fail
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   564
  $ cd fail
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   565
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   566
No local source
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   567
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   568
  $ hg clone a b
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   569
  abort: repository a not found!
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   570
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   571
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   572
No remote source
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   573
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
   574
#if windows
6ecd1ff8c42c tests: add "(glob)" for l10n messages in test-clone.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   575
  $ hg clone http://127.0.0.1:3121/a b
6ecd1ff8c42c tests: add "(glob)" for l10n messages in test-clone.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   576
  abort: error: * (glob)
6ecd1ff8c42c tests: add "(glob)" for l10n messages in test-clone.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   577
  [255]
6ecd1ff8c42c tests: add "(glob)" for l10n messages in test-clone.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   578
#else
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   579
  $ hg clone http://127.0.0.1:3121/a b
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   580
  abort: error: *refused* (glob)
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   581
  [255]
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
   582
#endif
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   583
  $ 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
   584
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   585
20008
e54a078153f7 tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents: 18227
diff changeset
   586
#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
   587
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   588
Inaccessible source
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   589
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   590
  $ mkdir a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   591
  $ chmod 000 a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   592
  $ hg clone a b
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   593
  abort: repository a not found!
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   594
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   595
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   596
Inaccessible destination
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   597
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   598
  $ hg init b
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   599
  $ cd b
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   600
  $ hg clone . ../a
18227
720308f741cb dispatch: show empty filename in OSError aborts
Mads Kiilerich <mads@kiilerich.com>
parents: 17882
diff changeset
   601
  abort: Permission denied: '../a'
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   602
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   603
  $ cd ..
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   604
  $ chmod 700 a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   605
  $ rm -r a b
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
#endif
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
16898
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   610
#if fifo
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   611
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   612
Source of wrong type
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   613
16898
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   614
  $ mkfifo a
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   615
  $ hg clone a b
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   616
  abort: repository a not found!
16898
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   617
  [255]
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   618
  $ rm a
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   619
bb91c602d4ad tests: change odd uses of 'if hghave' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16847
diff changeset
   620
#endif
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   621
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   622
Default destination, same directory
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   623
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   624
  $ hg init q
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   625
  $ hg clone q
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   626
  destination directory: q
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   627
  abort: destination 'q' is not empty
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   628
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   629
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   630
destination directory not empty
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   631
17345
4f8054d3171b check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents: 17307
diff changeset
   632
  $ mkdir a
16847
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   633
  $ echo stuff > a/a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   634
  $ hg clone q a
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   635
  abort: destination 'a' is not empty
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   636
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   637
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   638
20008
e54a078153f7 tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents: 18227
diff changeset
   639
#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
   640
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   641
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
   642
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   643
  $ hg init c
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   644
  $ cd c
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   645
  $ echo c > c
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   646
  $ 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
   647
  adding c
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   648
  $ 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
   649
  $ cd ..
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   650
  $ mkdir d
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   651
  $ 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
   652
  [255]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   653
  $ test -d d
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   654
  $ test -d d/.hg
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   655
  [1]
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   656
17424
e7cfe3587ea4 fix trivial spelling errors
Mads Kiilerich <mads@kiilerich.com>
parents: 17345
diff changeset
   657
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
   658
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   659
  $ 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
   660
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   661
#endif
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   662
cda5402b1739 tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann <adrian@cadifra.com>
parents: 15623
diff changeset
   663
  $ 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
   664
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
   665
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
   666
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
   667
  $ 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
   668
  $ 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
   669
  $ 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
   670
  $ 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
   671
  $ 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
   672
  $ 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
   673
  0:e1bab28bca43
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
   674
  $ 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
   675
  $ 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
   676
  0:e1bab28bca43
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   677
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   678
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
   679
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   680
  $ cat >> $HGRCPATH << EOF
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   681
  > [extensions]
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   682
  > share=
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   683
  > EOF
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   684
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   685
  $ hg init empty
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   686
  $ hg init source1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   687
  $ cd source1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   688
  $ echo initial1 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   689
  $ 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
   690
  $ echo second > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   691
  $ 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
   692
  $ cd ..
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   693
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   694
  $ hg init filteredrev0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   695
  $ cd filteredrev0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   696
  $ cat >> .hg/hgrc << EOF
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   697
  > [experimental]
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   698
  > evolution=createmarkers
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   699
  > EOF
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   700
  $ echo initial1 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   701
  $ 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
   702
  $ hg -q up -r null
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   703
  $ echo initial2 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   704
  $ 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
   705
  $ hg debugobsolete c05d5c47a5cf81401869999f3d05f7d699d2b29a e082c1832e09a7d1e78b7fd49a592d372de854c8
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   706
  $ cd ..
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   707
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   708
  $ 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
   709
  $ cd source1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   710
  $ hg bookmark bookA
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   711
  $ echo 1a > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   712
  $ hg commit -m 1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   713
  $ cd ../source1b
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   714
  $ hg -q up -r 0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   715
  $ echo head1 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   716
  $ hg commit -m head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   717
  created new head
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   718
  $ hg bookmark head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   719
  $ hg -q up -r 0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   720
  $ echo head2 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   721
  $ hg commit -m head2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   722
  created new head
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   723
  $ hg bookmark head2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   724
  $ hg -q up -r 0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   725
  $ hg branch branch1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   726
  marked working directory as branch branch1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   727
  (branches are permanent and global, did you want a bookmark?)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   728
  $ echo branch1 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   729
  $ hg commit -m branch1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   730
  $ hg -q up -r 0
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   731
  $ hg branch branch2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   732
  marked working directory as branch branch2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   733
  $ echo branch2 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   734
  $ hg commit -m branch2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   735
  $ cd ..
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   736
  $ hg init source2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   737
  $ cd source2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   738
  $ echo initial2 > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   739
  $ hg -q commit -A -m initial2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   740
  $ echo second > foo
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   741
  $ hg commit -m second
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   742
  $ cd ..
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   743
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   744
Clone with auto share from an empty repo should not result in share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   745
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   746
  $ mkdir share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   747
  $ hg --config share.pool=share clone empty share-empty
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   748
  (not using pooled storage: remote appears to be empty)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   749
  updating to branch default
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   750
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   751
  $ ls share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   752
  $ test -d share-empty/.hg/store
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   753
  $ test -f share-empty/.hg/sharedpath
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   754
  [1]
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   755
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   756
Clone with auto share from a repo with filtered revision 0 should not result in share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   757
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   758
  $ hg --config share.pool=share clone filteredrev0 share-filtered
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   759
  (not using pooled storage: unable to resolve identity of remote)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   760
  requesting all changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   761
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   762
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   763
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   764
  added 1 changesets with 1 changes to 1 files
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   765
  updating to branch default
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   766
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
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
Clone from repo with content should result in shared store being created
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   769
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   770
  $ hg --config share.pool=share clone source1a share-dest1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   771
  (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   772
  requesting all changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   773
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   774
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   775
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   776
  added 3 changesets with 3 changes to 1 files
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   777
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   778
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   779
  searching for changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   780
  no changes found
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   781
  adding remote bookmark bookA
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   782
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   783
The shared repo should have been created
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   784
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   785
  $ ls share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   786
  b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   787
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   788
The destination should point to it
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   789
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   790
  $ cat share-dest1a/.hg/sharedpath; echo
25864
84074e4fc80f test-clone: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25761
diff changeset
   791
  $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob)
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   792
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   793
The destination should have bookmarks
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   794
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   795
  $ hg -R share-dest1a bookmarks
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   796
     bookA                     2:e5bfe23c0b47
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   797
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   798
The default path should be the remote, not the share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   799
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   800
  $ hg -R share-dest1a config paths.default
25864
84074e4fc80f test-clone: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25761
diff changeset
   801
  $TESTTMP/source1a (glob)
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   802
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   803
Clone with existing share dir should result in pull + share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   804
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   805
  $ hg --config share.pool=share clone source1b share-dest1b
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   806
  (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   807
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   808
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   809
  searching for changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   810
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   811
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   812
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   813
  added 4 changesets with 4 changes to 1 files (+4 heads)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   814
  adding remote bookmark head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   815
  adding remote bookmark head2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   816
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   817
  $ ls share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   818
  b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   819
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   820
  $ cat share-dest1b/.hg/sharedpath; echo
25864
84074e4fc80f test-clone: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25761
diff changeset
   821
  $TESTTMP/share/b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1/.hg (glob)
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   822
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   823
We only get bookmarks from the remote, not everything in the share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   824
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   825
  $ hg -R share-dest1b bookmarks
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   826
     head1                     3:4a8dc1ab4c13
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   827
     head2                     4:99f71071f117
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   828
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   829
Default path should be source, not share.
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   830
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   831
  $ hg -R share-dest1b config paths.default
25864
84074e4fc80f test-clone: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25761
diff changeset
   832
  $TESTTMP/source1a (glob)
25761
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   833
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   834
Clone from unrelated repo should result in new share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   835
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   836
  $ hg --config share.pool=share clone source2 share-dest2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   837
  (sharing from new pooled repository 22aeff664783fd44c6d9b435618173c118c3448e)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   838
  requesting all changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   839
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   840
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   841
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   842
  added 2 changesets with 2 changes to 1 files
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   843
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   844
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   845
  searching for changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   846
  no changes found
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   847
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   848
  $ ls share
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   849
  22aeff664783fd44c6d9b435618173c118c3448e
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   850
  b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   851
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   852
remote naming mode works as advertised
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   853
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   854
  $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1a share-remote1a
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   855
  (sharing from new pooled repository 195bb1fcdb595c14a6c13e0269129ed78f6debde)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   856
  requesting all changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   857
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   858
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   859
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   860
  added 3 changesets with 3 changes to 1 files
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   861
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   862
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   863
  searching for changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   864
  no changes found
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   865
  adding remote bookmark bookA
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   866
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   867
  $ ls shareremote
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   868
  195bb1fcdb595c14a6c13e0269129ed78f6debde
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   869
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   870
  $ hg --config share.pool=shareremote --config share.poolnaming=remote clone source1b share-remote1b
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   871
  (sharing from new pooled repository c0d4f83847ca2a873741feb7048a45085fd47c46)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   872
  requesting all changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   873
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   874
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   875
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   876
  added 6 changesets with 6 changes to 1 files (+4 heads)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   877
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   878
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   879
  searching for changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   880
  no changes found
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   881
  adding remote bookmark head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   882
  adding remote bookmark head2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   883
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   884
  $ ls shareremote
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   885
  195bb1fcdb595c14a6c13e0269129ed78f6debde
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   886
  c0d4f83847ca2a873741feb7048a45085fd47c46
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   887
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   888
request to clone a single revision is respected in sharing mode
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   889
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   890
  $ hg --config share.pool=sharerevs clone -r 4a8dc1ab4c13 source1b share-1arev
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   891
  (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   892
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   893
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   894
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   895
  added 2 changesets with 2 changes to 1 files
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   896
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   897
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   898
  no changes found
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   899
  adding remote bookmark head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   900
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   901
  $ hg -R share-1arev log -G
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   902
  @  changeset:   1:4a8dc1ab4c13
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   903
  |  bookmark:    head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   904
  |  tag:         tip
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   905
  |  user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   906
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   907
  |  summary:     head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   908
  |
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   909
  o  changeset:   0:b5f04eac9d8f
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   910
     user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   911
     date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   912
     summary:     initial
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   913
  
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   914
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   915
making another clone should only pull down requested rev
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   916
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   917
  $ hg --config share.pool=sharerevs clone -r 99f71071f117 source1b share-1brev
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   918
  (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   919
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   920
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   921
  searching for changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   922
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   923
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   924
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   925
  added 1 changesets with 1 changes to 1 files (+1 heads)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   926
  adding remote bookmark head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   927
  adding remote bookmark head2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   928
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   929
  $ hg -R share-1brev log -G
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   930
  o  changeset:   2:99f71071f117
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   931
  |  bookmark:    head2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   932
  |  tag:         tip
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   933
  |  parent:      0:b5f04eac9d8f
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   934
  |  user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   935
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   936
  |  summary:     head2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   937
  |
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   938
  | @  changeset:   1:4a8dc1ab4c13
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   939
  |/   bookmark:    head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   940
  |    user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   941
  |    date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   942
  |    summary:     head1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   943
  |
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   944
  o  changeset:   0:b5f04eac9d8f
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   945
     user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   946
     date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   947
     summary:     initial
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   948
  
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   949
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   950
Request to clone a single branch is respected in sharing mode
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   951
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   952
  $ hg --config share.pool=sharebranch clone -b branch1 source1b share-1bbranch1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   953
  (sharing from new pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   954
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   955
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   956
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   957
  added 2 changesets with 2 changes to 1 files
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   958
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   959
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   960
  no changes found
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   961
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   962
  $ hg -R share-1bbranch1 log -G
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   963
  o  changeset:   1:5f92a6c1a1b1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   964
  |  branch:      branch1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   965
  |  tag:         tip
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   966
  |  user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   967
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   968
  |  summary:     branch1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   969
  |
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   970
  @  changeset:   0:b5f04eac9d8f
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   971
     user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   972
     date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   973
     summary:     initial
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   974
  
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   975
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   976
  $ hg --config share.pool=sharebranch clone -b branch2 source1b share-1bbranch2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   977
  (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   978
  updating working directory
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   979
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   980
  searching for changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   981
  adding changesets
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   982
  adding manifests
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   983
  adding file changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   984
  added 1 changesets with 1 changes to 1 files (+1 heads)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   985
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   986
  $ hg -R share-1bbranch2 log -G
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   987
  o  changeset:   2:6bacf4683960
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   988
  |  branch:      branch2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   989
  |  tag:         tip
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   990
  |  parent:      0:b5f04eac9d8f
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   991
  |  user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   992
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   993
  |  summary:     branch2
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   994
  |
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   995
  | o  changeset:   1:5f92a6c1a1b1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   996
  |/   branch:      branch1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   997
  |    user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   998
  |    date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
   999
  |    summary:     branch1
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1000
  |
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1001
  @  changeset:   0:b5f04eac9d8f
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1002
     user:        test
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1003
     date:        Thu Jan 01 00:00:00 1970 +0000
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1004
     summary:     initial
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1005
  
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1006
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1007
-U is respected in share clone mode
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1008
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1009
  $ hg --config share.pool=share clone -U source1a share-1anowc
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1010
  (sharing from existing pooled repository b5f04eac9d8f7a6a9fcb070243cccea7dc5ea0c1)
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1011
  searching for changes
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1012
  no changes found
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1013
  adding remote bookmark bookA
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1014
0d37b9b21467 hg: support for auto sharing stores when cloning
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25295
diff changeset
  1015
  $ ls share-1anowc