tests/test-subrepo-recursion.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 08 Jun 2021 02:06:45 +0200
changeset 47453 377d8fc20e34
parent 45921 95c4cca641f6
child 50722 7e5be4a7cda7
permissions -rw-r--r--
clone: reuse the stream clone logic for local clone Streaming clone and local (non `--pull`) clone do mostly the same thing, however they were using different logic to do so. This means the logic frequently went out of sync and that new case had to be dealt with twice. This is fragile and anoying. So we replace this with a re-use of the logic we use for streaming clone. I can see various test changes: - a more precise progress output, - armless fncache loading during clone, - fncache is no longer hardlinked (since we write it by hand). I am not reinstalling the `reposimplestore` specific output, as far as I understand this variant have been broken for years. Differential Revision: https://phab.mercurial-scm.org/D10855
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     1
Create test repository:
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     2
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
     3
  $ hg init repo
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
     4
  $ cd repo
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     5
  $ echo x1 > x.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     6
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     7
  $ hg init foo
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     8
  $ cd foo
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     9
  $ echo y1 > y.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    10
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    11
  $ hg init bar
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    12
  $ cd bar
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    13
  $ echo z1 > z.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    14
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    15
  $ cd ..
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    16
  $ echo 'bar = bar' > .hgsub
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    17
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    18
  $ cd ..
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    19
  $ echo 'foo = foo' > .hgsub
12270
166b9866580a add: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12175
diff changeset
    20
166b9866580a add: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12175
diff changeset
    21
Add files --- .hgsub files must go first to trigger subrepos:
166b9866580a add: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12175
diff changeset
    22
166b9866580a add: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12175
diff changeset
    23
  $ hg add -S .hgsub
166b9866580a add: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12175
diff changeset
    24
  $ hg add -S foo/.hgsub
166b9866580a add: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12175
diff changeset
    25
  $ hg add -S foo/bar
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
    26
  adding foo/bar/z.txt
12270
166b9866580a add: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12175
diff changeset
    27
  $ hg add -S
166b9866580a add: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12175
diff changeset
    28
  adding x.txt
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
    29
  adding foo/y.txt
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    30
12175
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    31
Test recursive status without committing anything:
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    32
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
    33
  $ hg status -S
12175
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    34
  A .hgsub
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    35
  A foo/.hgsub
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    36
  A foo/bar/z.txt
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    37
  A foo/y.txt
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    38
  A x.txt
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    39
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    40
Test recursive diff without committing anything:
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    41
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
    42
  $ hg diff --nodates -S foo
12175
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    43
  diff -r 000000000000 foo/.hgsub
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    44
  --- /dev/null
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    45
  +++ b/foo/.hgsub
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    46
  @@ -0,0 +1,1 @@
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    47
  +bar = bar
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    48
  diff -r 000000000000 foo/y.txt
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    49
  --- /dev/null
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    50
  +++ b/foo/y.txt
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    51
  @@ -0,0 +1,1 @@
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    52
  +y1
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    53
  diff -r 000000000000 foo/bar/z.txt
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    54
  --- /dev/null
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    55
  +++ b/foo/bar/z.txt
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    56
  @@ -0,0 +1,1 @@
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    57
  +z1
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    58
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    59
Commits:
c0a8f9dea0f6 subrepos: handle modified but uncommitted .hgsub
Martin Geisler <mg@lazybytes.net>
parents: 12167
diff changeset
    60
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
    61
  $ hg commit -m fails
33365
6d88468d435b subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com>
parents: 32005
diff changeset
    62
  abort: uncommitted changes in subrepository "foo"
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
    63
  (use --subrepos for recursive commit)
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
    64
  [255]
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
    65
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
    66
The --subrepos flag overwrite the config setting:
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
    67
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
    68
  $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    69
  committing subrepository foo
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
    70
  committing subrepository foo/bar
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    71
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    72
  $ cd foo
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    73
  $ echo y2 >> y.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    74
  $ hg commit -m 0-1-0
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    75
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    76
  $ cd bar
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    77
  $ echo z2 >> z.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    78
  $ hg commit -m 0-1-1
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    79
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    80
  $ cd ..
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    81
  $ hg commit -m 0-2-1
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    82
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    83
  $ cd ..
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    84
  $ hg commit -m 1-2-1
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    85
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    86
Change working directory:
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    87
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    88
  $ echo y3 >> foo/y.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    89
  $ echo z3 >> foo/bar/z.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
    90
  $ hg status -S
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    91
  M foo/bar/z.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    92
  M foo/y.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
    93
  $ hg diff --nodates -S
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
    94
  diff -r d254738c5f5e foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
    95
  --- a/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
    96
  +++ b/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
    97
  @@ -1,2 +1,3 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
    98
   y1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
    99
   y2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   100
  +y3
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   101
  diff -r 9647f22de499 foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   102
  --- a/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   103
  +++ b/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   104
  @@ -1,2 +1,3 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   105
   z1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   106
   z2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   107
  +z3
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   108
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   109
Status call crossing repository boundaries:
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   110
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   111
  $ hg status -S foo/bar/z.txt
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   112
  M foo/bar/z.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   113
  $ hg status -S -I 'foo/?.txt'
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   114
  M foo/y.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   115
  $ hg status -S -I '**/?.txt'
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   116
  M foo/bar/z.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   117
  M foo/y.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   118
  $ hg diff --nodates -S -I '**/?.txt'
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   119
  diff -r d254738c5f5e foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   120
  --- a/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   121
  +++ b/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   122
  @@ -1,2 +1,3 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   123
   y1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   124
   y2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   125
  +y3
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   126
  diff -r 9647f22de499 foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   127
  --- a/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   128
  +++ b/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   129
  @@ -1,2 +1,3 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   130
   z1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   131
   z2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   132
  +z3
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   133
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   134
Status from within a subdirectory:
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   135
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   136
  $ mkdir dir
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   137
  $ cd dir
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   138
  $ echo a1 > a.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   139
  $ hg status -S
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   140
  M foo/bar/z.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   141
  M foo/y.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   142
  ? dir/a.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   143
  $ hg diff --nodates -S
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   144
  diff -r d254738c5f5e foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   145
  --- a/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   146
  +++ b/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   147
  @@ -1,2 +1,3 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   148
   y1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   149
   y2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   150
  +y3
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   151
  diff -r 9647f22de499 foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   152
  --- a/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   153
  +++ b/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   154
  @@ -1,2 +1,3 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   155
   z1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   156
   z2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   157
  +z3
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   158
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   159
Status with relative path:
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   160
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   161
  $ hg status -S ..
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   162
  M ../foo/bar/z.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   163
  M ../foo/y.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   164
  ? a.txt
23958
df463ca0adef largefiles: revert to lfilesrepo.status() being an unfiltered method
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
   165
df463ca0adef largefiles: revert to lfilesrepo.status() being an unfiltered method
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
   166
XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as
df463ca0adef largefiles: revert to lfilesrepo.status() being an unfiltered method
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
   167
added instead of modified.
df463ca0adef largefiles: revert to lfilesrepo.status() being an unfiltered method
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
   168
  $ hg status -S .. --config extensions.largefiles=
df463ca0adef largefiles: revert to lfilesrepo.status() being an unfiltered method
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
   169
  M ../foo/bar/z.txt
df463ca0adef largefiles: revert to lfilesrepo.status() being an unfiltered method
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
   170
  M ../foo/y.txt
df463ca0adef largefiles: revert to lfilesrepo.status() being an unfiltered method
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
   171
  ? a.txt
df463ca0adef largefiles: revert to lfilesrepo.status() being an unfiltered method
Matt Harbison <matt_harbison@yahoo.com>
parents: 18109
diff changeset
   172
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   173
  $ hg diff --nodates -S ..
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   174
  diff -r d254738c5f5e foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   175
  --- a/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   176
  +++ b/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   177
  @@ -1,2 +1,3 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   178
   y1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   179
   y2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   180
  +y3
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   181
  diff -r 9647f22de499 foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   182
  --- a/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   183
  +++ b/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   184
  @@ -1,2 +1,3 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   185
   z1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   186
   z2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   187
  +z3
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   188
  $ cd ..
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   189
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   190
Cleanup and final commit:
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   191
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   192
  $ rm -r dir
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
   193
  $ hg commit --subrepos -m 2-3-2
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   194
  committing subrepository foo
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   195
  committing subrepository foo/bar
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   196
15910
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   197
Test explicit path commands within subrepos: add/forget
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   198
  $ echo z1 > foo/bar/z2.txt
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   199
  $ hg status -S
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   200
  ? foo/bar/z2.txt
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   201
  $ hg add foo/bar/z2.txt
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   202
  $ hg status -S
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   203
  A foo/bar/z2.txt
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   204
  $ hg forget foo/bar/z2.txt
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   205
  $ hg status -S
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   206
  ? foo/bar/z2.txt
16070
f11eee00c652 forget: show warning messages for forgetting in subrepo correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15912
diff changeset
   207
  $ hg forget foo/bar/z2.txt
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   208
  not removing foo/bar/z2.txt: file is already untracked
16070
f11eee00c652 forget: show warning messages for forgetting in subrepo correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15912
diff changeset
   209
  [1]
f11eee00c652 forget: show warning messages for forgetting in subrepo correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15912
diff changeset
   210
  $ hg status -S
f11eee00c652 forget: show warning messages for forgetting in subrepo correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15912
diff changeset
   211
  ? foo/bar/z2.txt
15910
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   212
  $ rm foo/bar/z2.txt
2b8d5c55ae67 tests: add subrepo recursion tests for add/forget with explicit paths
David M. Carr <david@carrclan.us>
parents: 15520
diff changeset
   213
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   214
Log with the relationships between repo and its subrepo:
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   215
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   216
  $ hg log --template '{rev}:{node|short} {desc}\n'
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   217
  2:1326fa26d0c0 2-3-2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   218
  1:4b3c9ff4f66b 1-2-1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   219
  0:23376cbba0d8 0-0-0
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   220
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   221
  $ hg -R foo log --template '{rev}:{node|short} {desc}\n'
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   222
  3:65903cebad86 2-3-2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   223
  2:d254738c5f5e 0-2-1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   224
  1:8629ce7dcc39 0-1-0
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   225
  0:af048e97ade2 0-0-0
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   226
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   227
  $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n'
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   228
  2:31ecbdafd357 2-3-2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   229
  1:9647f22de499 0-1-1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   230
  0:4904098473f9 0-0-0
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   231
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   232
Status between revisions:
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   233
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   234
  $ hg status -S
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   235
  $ hg status -S --rev 0:1
12166
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   236
  M .hgsubstate
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   237
  M foo/.hgsubstate
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   238
  M foo/bar/z.txt
441a74b8def1 status: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
   239
  M foo/y.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   240
  $ hg diff --nodates -S -I '**/?.txt' --rev 0:1
12167
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   241
  diff -r af048e97ade2 -r d254738c5f5e foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   242
  --- a/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   243
  +++ b/foo/y.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   244
  @@ -1,1 +1,2 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   245
   y1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   246
  +y2
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   247
  diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   248
  --- a/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   249
  +++ b/foo/bar/z.txt
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   250
  @@ -1,1 +1,2 @@
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   251
   z1
d2c5b0927c28 diff: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12166
diff changeset
   252
  +z2
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   253
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   254
#if serve
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   255
  $ cd ..
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   256
  $ hg serve -R repo --debug -S -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   257
  adding  = $TESTTMP/repo
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   258
  adding foo = $TESTTMP/repo/foo
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   259
  adding foo/bar = $TESTTMP/repo/foo/bar
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   260
  listening at http://*:$HGPORT/ (bound to *:$HGPORT) (glob) (?)
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   261
  adding  = $TESTTMP/repo (?)
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   262
  adding foo = $TESTTMP/repo/foo (?)
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   263
  adding foo/bar = $TESTTMP/repo/foo/bar (?)
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   264
  $ cat hg1.pid >> $DAEMON_PIDS
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   265
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   266
  $ hg clone http://localhost:$HGPORT clone  --config progress.disable=True
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   267
  requesting all changes
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   268
  adding changesets
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   269
  adding manifests
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   270
  adding file changes
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   271
  added 3 changesets with 5 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33365
diff changeset
   272
  new changesets 23376cbba0d8:1326fa26d0c0
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   273
  updating to branch default
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   274
  cloning subrepo foo from http://localhost:$HGPORT/foo
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   275
  requesting all changes
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   276
  adding changesets
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   277
  adding manifests
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   278
  adding file changes
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   279
  added 4 changesets with 7 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33365
diff changeset
   280
  new changesets af048e97ade2:65903cebad86
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   281
  cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   282
  requesting all changes
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   283
  adding changesets
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   284
  adding manifests
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   285
  adding file changes
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   286
  added 3 changesets with 3 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33365
diff changeset
   287
  new changesets 4904098473f9:31ecbdafd357
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   288
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   289
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   290
  $ cat clone/foo/bar/z.txt
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   291
  z1
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   292
  z2
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   293
  z3
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   294
35834
fb278041df06 subrepo: activate clone pooling to enable sharing with remote URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35833
diff changeset
   295
Clone pooling from a remote URL will share the top level repo and the subrepos,
fb278041df06 subrepo: activate clone pooling to enable sharing with remote URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35833
diff changeset
   296
even if they are referenced by remote URL.
35832
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   297
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   298
  $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   299
  >    clone http://localhost:$HGPORT shared
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   300
  (sharing from new pooled repository 23376cbba0d87c15906bb3652584927c140907bf)
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   301
  requesting all changes
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   302
  adding changesets
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   303
  adding manifests
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   304
  adding file changes
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   305
  added 3 changesets with 5 changes to 3 files
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   306
  new changesets 23376cbba0d8:1326fa26d0c0
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   307
  searching for changes
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   308
  no changes found
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   309
  updating working directory
35833
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   310
  cloning subrepo foo from http://localhost:$HGPORT/foo
35834
fb278041df06 subrepo: activate clone pooling to enable sharing with remote URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35833
diff changeset
   311
  (sharing from new pooled repository af048e97ade2e236f754f05d07013e586af0f8bf)
35833
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   312
  requesting all changes
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   313
  adding changesets
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   314
  adding manifests
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   315
  adding file changes
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   316
  added 4 changesets with 7 changes to 3 files
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   317
  new changesets af048e97ade2:65903cebad86
35834
fb278041df06 subrepo: activate clone pooling to enable sharing with remote URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35833
diff changeset
   318
  searching for changes
fb278041df06 subrepo: activate clone pooling to enable sharing with remote URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35833
diff changeset
   319
  no changes found
35833
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   320
  cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar
35834
fb278041df06 subrepo: activate clone pooling to enable sharing with remote URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35833
diff changeset
   321
  (sharing from new pooled repository 4904098473f96c900fec436dad267edd4da59fad)
35833
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   322
  requesting all changes
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   323
  adding changesets
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   324
  adding manifests
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   325
  adding file changes
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   326
  added 3 changesets with 3 changes to 1 files
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   327
  new changesets 4904098473f9:31ecbdafd357
35834
fb278041df06 subrepo: activate clone pooling to enable sharing with remote URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35833
diff changeset
   328
  searching for changes
fb278041df06 subrepo: activate clone pooling to enable sharing with remote URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 35833
diff changeset
   329
  no changes found
35833
eed02e192770 subrepo: don't attempt to share remote sources (issue5793)
Matt Harbison <matt_harbison@yahoo.com>
parents: 35832
diff changeset
   330
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
35832
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   331
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   332
  $ cat access.log
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   333
  * "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   334
  * "GET /?cmd=batch HTTP/1.1" 200 - * (glob)
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   335
  * "GET /?cmd=getbundle HTTP/1.1" 200 - * (glob)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   336
  * "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob)
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   337
  * "GET /foo?cmd=batch HTTP/1.1" 200 - * (glob)
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   338
  * "GET /foo?cmd=getbundle HTTP/1.1" 200 - * (glob)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   339
  * "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob)
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   340
  * "GET /foo/bar?cmd=batch HTTP/1.1" 200 - * (glob)
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   341
  * "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - * (glob)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   342
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   343
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   344
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   345
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   346
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   347
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D1326fa26d0c00d2146c63b56bb6a45149d7325ac x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   348
  $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=1326fa26d0c00d2146c63b56bb6a45149d7325ac&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   349
  $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   350
  $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   351
  $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   352
  $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   353
  $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   354
  $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D65903cebad86f1a84bd4f1134f62fa7dcb7a1c98 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   355
  $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   356
  $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   357
  $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
   358
  $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   359
  $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   360
  $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   361
  $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D31ecbdafd357f54b281c9bd1d681bb90de219e22 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37424
diff changeset
   362
  $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=31ecbdafd357f54b281c9bd1d681bb90de219e22&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
32005
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   363
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   364
  $ killdaemons.py
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   365
  $ rm hg1.pid error.log access.log
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   366
  $ cd repo
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   367
#endif
2406dbba49bd serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com>
parents: 30844
diff changeset
   368
13144
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   369
Enable progress extension for archive tests:
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   370
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   371
  $ cp $HGRCPATH $HGRCPATH.no-progress
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   372
  $ cat >> $HGRCPATH <<EOF
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   373
  > [progress]
25499
0fa964d6fd48 progress: move all logic altering the ui object logic in mercurial.ui
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25496
diff changeset
   374
  > disable=False
13144
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   375
  > assume-tty = 1
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   376
  > delay = 0
24612
30fc7cf43063 test-subrepo-recursion: set progress.changedelay really high
Augie Fackler <augie@google.com>
parents: 24470
diff changeset
   377
  > # set changedelay really large so we don't see nested topics
30fc7cf43063 test-subrepo-recursion: set progress.changedelay really high
Augie Fackler <augie@google.com>
parents: 24470
diff changeset
   378
  > changedelay = 30000
13149
735dd8e8a208 progress using tests: disable time estimates to avoid flakiness
Augie Fackler <durin42@gmail.com>
parents: 13144
diff changeset
   379
  > format = topic bar number
13144
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   380
  > refresh = 0
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   381
  > width = 60
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   382
  > EOF
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   383
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   384
Test archiving to a directory tree (the doubled lines in the output
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   385
only show up in the test output, not in real usage):
12323
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   386
17743
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   387
  $ hg archive --subrepos ../archive
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   388
  \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   389
  archiving [                                           ] 0/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   390
  archiving [=============>                             ] 1/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   391
  archiving [===========================>               ] 2/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   392
  archiving [==========================================>] 3/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   393
                                                              \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   394
  \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   395
  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   396
  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   397
  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   398
  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   399
                                                              \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   400
  \r (no-eol) (esc)
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   401
  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   402
  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
17743
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   403
                                                              \r (no-eol) (esc)
12363
8a5b6383ba02 test-subrepo-recursion: sort archive output for portability
Patrick Mezard <pmezard@gmail.com>
parents: 12339
diff changeset
   404
  $ find ../archive | sort
12323
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   405
  ../archive
12363
8a5b6383ba02 test-subrepo-recursion: sort archive output for portability
Patrick Mezard <pmezard@gmail.com>
parents: 12339
diff changeset
   406
  ../archive/.hg_archival.txt
8a5b6383ba02 test-subrepo-recursion: sort archive output for portability
Patrick Mezard <pmezard@gmail.com>
parents: 12339
diff changeset
   407
  ../archive/.hgsub
8a5b6383ba02 test-subrepo-recursion: sort archive output for portability
Patrick Mezard <pmezard@gmail.com>
parents: 12339
diff changeset
   408
  ../archive/.hgsubstate
12323
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   409
  ../archive/foo
12363
8a5b6383ba02 test-subrepo-recursion: sort archive output for portability
Patrick Mezard <pmezard@gmail.com>
parents: 12339
diff changeset
   410
  ../archive/foo/.hgsub
8a5b6383ba02 test-subrepo-recursion: sort archive output for portability
Patrick Mezard <pmezard@gmail.com>
parents: 12339
diff changeset
   411
  ../archive/foo/.hgsubstate
12323
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   412
  ../archive/foo/bar
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   413
  ../archive/foo/bar/z.txt
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   414
  ../archive/foo/y.txt
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   415
  ../archive/x.txt
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   416
12339
f85338f509e4 tests: fixup tests using unzip -l
Matt Mackall <mpm@selenic.com>
parents: 12323
diff changeset
   417
Test archiving to zip file (unzip output is unstable):
12323
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   418
24953
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   419
  $ hg archive --subrepos --prefix '.' ../archive.zip
17743
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   420
  \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   421
  archiving [                                           ] 0/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   422
  archiving [=============>                             ] 1/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   423
  archiving [===========================>               ] 2/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   424
  archiving [==========================================>] 3/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   425
                                                              \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   426
  \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   427
  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   428
  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   429
  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   430
  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   431
                                                              \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   432
  \r (no-eol) (esc)
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   433
  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   434
  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
17743
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   435
                                                              \r (no-eol) (esc)
24963
d78dea2248b1 test-subrepo-recursion: glob out all the date listed by unzip -l
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24953
diff changeset
   436
d78dea2248b1 test-subrepo-recursion: glob out all the date listed by unzip -l
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24953
diff changeset
   437
(unzip date formating is unstable, we do not care about it and glob it out)
d78dea2248b1 test-subrepo-recursion: glob out all the date listed by unzip -l
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24953
diff changeset
   438
30844
b3d2e8cce78c tests: work around FreeBSD's unzip having slightly different output
Augie Fackler <augie@google.com>
parents: 28597
diff changeset
   439
  $ unzip -l ../archive.zip | grep -v -- ----- | egrep -v files$
24953
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   440
  Archive:  ../archive.zip
25610
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   441
    Length [ ]* Date [ ]* Time [ ]* Name (re)
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   442
        172  [0-9:\- ]*  .hg_archival.txt (re)
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   443
         10  [0-9:\- ]*  .hgsub (re)
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   444
         45  [0-9:\- ]*  .hgsubstate (re)
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   445
          3  [0-9:\- ]*  x.txt (re)
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   446
         10  [0-9:\- ]*  foo/.hgsub (re)
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   447
         45  [0-9:\- ]*  foo/.hgsubstate (re)
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   448
          9  [0-9:\- ]*  foo/y.txt (re)
37876ca00c0a test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com>
parents: 25499
diff changeset
   449
          9  [0-9:\- ]*  foo/bar/z.txt (re)
13144
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   450
15286
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   451
Test archiving a revision that references a subrepo that is not yet
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   452
cloned:
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   453
24613
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   454
#if hardlink
15286
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   455
  $ hg clone -U . ../empty
24440
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23958
diff changeset
   456
  \r (no-eol) (esc)
47453
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   457
  linking [====>                                        ] 1/9\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   458
  linking [=========>                                   ] 2/9\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   459
  linking [==============>                              ] 3/9\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   460
  linking [===================>                         ] 4/9\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   461
  linking [========================>                    ] 5/9\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   462
  linking [=============================>               ] 6/9\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   463
  linking [==================================>          ] 7/9\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   464
  linking [=======================================>     ] 8/9\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   465
  linking [============================================>] 9/9\r (no-eol) (esc)
24440
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23958
diff changeset
   466
                                                              \r (no-eol) (esc)
24613
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   467
#else
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   468
  $ hg clone -U . ../empty
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   469
  \r (no-eol) (esc)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   470
  linking [ <=>                                           ] 1 (no-eol)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   471
#endif
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   472
15286
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   473
  $ cd ../empty
24613
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   474
#if hardlink
24953
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   475
  $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
17743
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   476
  \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   477
  archiving [                                           ] 0/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   478
  archiving [=============>                             ] 1/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   479
  archiving [===========================>               ] 2/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   480
  archiving [==========================================>] 3/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   481
                                                              \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   482
  \r (no-eol) (esc)
47453
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   483
  linking [====>                                        ] 1/8\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   484
  linking [==========>                                  ] 2/8\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   485
  linking [===============>                             ] 3/8\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   486
  linking [=====================>                       ] 4/8\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   487
  linking [===========================>                 ] 5/8\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   488
  linking [================================>            ] 6/8\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   489
  linking [======================================>      ] 7/8\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   490
  linking [============================================>] 8/8\r (no-eol) (esc)
24440
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23958
diff changeset
   491
                                                              \r (no-eol) (esc)
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23958
diff changeset
   492
  \r (no-eol) (esc)
17743
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   493
  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   494
  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   495
  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   496
  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   497
                                                              \r (no-eol) (esc)
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   498
  \r (no-eol) (esc)
47453
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   499
  linking [======>                                      ] 1/6\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   500
  linking [==============>                              ] 2/6\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   501
  linking [=====================>                       ] 3/6\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   502
  linking [=============================>               ] 4/6\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   503
  linking [====================================>        ] 5/6\r (no-eol) (esc)
377d8fc20e34 clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45921
diff changeset
   504
  linking [============================================>] 6/6\r (no-eol) (esc)
24440
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23958
diff changeset
   505
                                                              \r (no-eol) (esc)
27ad6b91f5c2 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com>
parents: 23958
diff changeset
   506
  \r (no-eol) (esc)
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   507
  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   508
  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
17743
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   509
                                                              \r (no-eol) (esc)
15286
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   510
  cloning subrepo foo from $TESTTMP/repo/foo
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   511
  cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
24613
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   512
#else
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   513
Note there's a slight output glitch on non-hardlink systems: the last
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   514
"linking" progress topic never gets closed, leading to slight output corruption on that platform.
24953
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   515
  $ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
24613
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   516
  \r (no-eol) (esc)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   517
  archiving [                                           ] 0/3\r (no-eol) (esc)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   518
  archiving [=============>                             ] 1/3\r (no-eol) (esc)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   519
  archiving [===========================>               ] 2/3\r (no-eol) (esc)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   520
  archiving [==========================================>] 3/3\r (no-eol) (esc)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   521
                                                              \r (no-eol) (esc)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   522
  \r (no-eol) (esc)
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   523
  linking [ <=>                                           ] 1\r (no-eol) (esc)
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   524
  cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
24613
f8bc3de9b343 test-subrepo-recursion: fix output on non-hardlink systems
Augie Fackler <augie@google.com>
parents: 24612
diff changeset
   525
#endif
17743
6047947afb6b tests: drop filtercr.py and use the very explicit '\r (no-eol) (esc)' markup
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
   526
24924
41cd8171e58f archive: always use portable path component separators with subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents: 24613
diff changeset
   527
Archive + subrepos uses '/' for all component separators
41cd8171e58f archive: always use portable path component separators with subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents: 24613
diff changeset
   528
41cd8171e58f archive: always use portable path component separators with subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents: 24613
diff changeset
   529
  $ tar -tzf ../archive.tar.gz | sort
24953
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   530
  .hg_archival.txt
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   531
  .hgsub
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   532
  .hgsubstate
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   533
  foo/.hgsub
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   534
  foo/.hgsubstate
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   535
  foo/bar/z.txt
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   536
  foo/y.txt
5115d03440f4 archive: drop the leading '.' path component from the prefix (issue4634)
Matt Harbison <matt_harbison@yahoo.com>
parents: 24924
diff changeset
   537
  x.txt
24924
41cd8171e58f archive: always use portable path component separators with subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents: 24613
diff changeset
   538
15286
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   539
The newly cloned subrepos contain no working copy:
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   540
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   541
  $ hg -R foo summary
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   542
  parent: -1:000000000000  (no revision checked out)
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   543
  branch: default
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   544
  commit: (clean)
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   545
  update: 4 new changesets (update)
4be845e3932c subrepo: pull revisions on demand when archiving hg subrepos
Martin Geisler <mg@aragost.com>
parents: 14281
diff changeset
   546
40633
3b0f07cc9626 test-subrepo: document why share magically works even if subrepos are missing
Yuya Nishihara <yuya@tcha.org>
parents: 40622
diff changeset
   547
Sharing a local repo with missing local subrepos (i.e. it was never updated
3b0f07cc9626 test-subrepo: document why share magically works even if subrepos are missing
Yuya Nishihara <yuya@tcha.org>
parents: 40622
diff changeset
   548
from null) works because the default path is copied from the source repo,
3b0f07cc9626 test-subrepo: document why share magically works even if subrepos are missing
Yuya Nishihara <yuya@tcha.org>
parents: 40622
diff changeset
   549
whereas clone should fail.
35832
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   550
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   551
  $ hg --config progress.disable=True clone -U ../empty ../empty2
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   552
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   553
  $ hg --config extensions.share= --config progress.disable=True \
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   554
  >    share ../empty2 ../empty_share
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   555
  updating working directory
40622
fb490d798be0 share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents: 37556
diff changeset
   556
  sharing subrepo foo from $TESTTMP/empty/foo
fb490d798be0 share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents: 37556
diff changeset
   557
  sharing subrepo foo/bar from $TESTTMP/empty/foo/bar
fb490d798be0 share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com>
parents: 37556
diff changeset
   558
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
35832
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   559
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   560
  $ hg --config progress.disable=True clone ../empty2 ../empty_clone
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   561
  updating to branch default
40440
69d4c8c5c25e subrepo: print the status line before creating the peer for better diagnostics
Matt Harbison <matt_harbison@yahoo.com>
parents: 37556
diff changeset
   562
  cloning subrepo foo from $TESTTMP/empty2/foo
45921
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45846
diff changeset
   563
  abort: repository $TESTTMP/empty2/foo not found
35832
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   564
  [255]
0c14b3f23294 test-subrepo: demonstrate problems with subrepo sharing and absolute paths
Matt Harbison <matt_harbison@yahoo.com>
parents: 35400
diff changeset
   565
13144
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   566
Disable progress extension and cleanup:
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   567
aae2d5cbde64 subrepo: add progress bar support to archive
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
   568
  $ mv $HGRCPATH.no-progress $HGRCPATH
12323
f00953d9533c subrepo: add support for 'hg archive'
Martin Geisler <mg@aragost.com>
parents: 12316
diff changeset
   569
15287
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   570
Test archiving when there is a directory in the way for a subrepo
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   571
created by archive:
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   572
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   573
  $ hg clone -U . ../almost-empty
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   574
  $ cd ../almost-empty
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   575
  $ mkdir foo
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   576
  $ echo f > foo/f
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   577
  $ hg archive --subrepos -r tip archive
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   578
  cloning subrepo foo from $TESTTMP/empty/foo
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   579
  abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepository "foo")
15287
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   580
  [255]
b3e19c355ca7 subrepo: abort in hgsubrepo._get if the destination is obstructed
Martin Geisler <mg@aragost.com>
parents: 15286
diff changeset
   581
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   582
Clone and test outgoing:
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   583
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   584
  $ cd ..
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   585
  $ hg clone repo repo2
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   586
  updating to branch default
14281
ccb7240acf32 subrepo: create subrepos using clone instead of pull
Martin Geisler <mg@aragost.com>
parents: 13343
diff changeset
   587
  cloning subrepo foo from $TESTTMP/repo/foo
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   588
  cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   589
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   590
  $ cd repo2
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   591
  $ hg outgoing -S
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   592
  comparing with $TESTTMP/repo
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   593
  searching for changes
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   594
  no changes found
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12591
diff changeset
   595
  comparing with $TESTTMP/repo/foo
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   596
  searching for changes
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   597
  no changes found
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12591
diff changeset
   598
  comparing with $TESTTMP/repo/foo/bar
12400
40852b4b910c incoming/outgoing: Fix recursion on sub repositories
Erik Zielke <ez@aragost.com>
parents: 12376
diff changeset
   599
  searching for changes
40852b4b910c incoming/outgoing: Fix recursion on sub repositories
Erik Zielke <ez@aragost.com>
parents: 12376
diff changeset
   600
  no changes found
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12275
diff changeset
   601
  [1]
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   602
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   603
Make nested change:
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   604
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   605
  $ echo y4 >> foo/y.txt
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   606
  $ hg diff --nodates -S
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   607
  diff -r 65903cebad86 foo/y.txt
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   608
  --- a/foo/y.txt
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   609
  +++ b/foo/y.txt
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   610
  @@ -1,3 +1,4 @@
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   611
   y1
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   612
   y2
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   613
   y3
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   614
  +y4
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15287
diff changeset
   615
  $ hg commit --subrepos -m 3-4-2
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   616
  committing subrepository foo
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   617
  $ hg outgoing -S
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   618
  comparing with $TESTTMP/repo
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   619
  searching for changes
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   620
  changeset:   3:2655b8ecc4ee
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   621
  tag:         tip
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   622
  user:        test
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   623
  date:        Thu Jan 01 00:00:00 1970 +0000
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   624
  summary:     3-4-2
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   625
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12591
diff changeset
   626
  comparing with $TESTTMP/repo/foo
12272
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   627
  searching for changes
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   628
  changeset:   4:e96193d6cb36
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   629
  tag:         tip
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   630
  user:        test
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   631
  date:        Thu Jan 01 00:00:00 1970 +0000
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   632
  summary:     3-4-2
42ecd56399d7 outgoing: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12270
diff changeset
   633
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12591
diff changeset
   634
  comparing with $TESTTMP/repo/foo/bar
12400
40852b4b910c incoming/outgoing: Fix recursion on sub repositories
Erik Zielke <ez@aragost.com>
parents: 12376
diff changeset
   635
  searching for changes
40852b4b910c incoming/outgoing: Fix recursion on sub repositories
Erik Zielke <ez@aragost.com>
parents: 12376
diff changeset
   636
  no changes found
12274
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   637
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   638
12274
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   639
Switch to original repo and setup default path:
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   640
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   641
  $ cd ../repo
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   642
  $ echo '[paths]' >> .hg/hgrc
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   643
  $ echo 'default = ../repo2' >> .hg/hgrc
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   644
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   645
Test incoming:
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   646
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   647
  $ hg incoming -S
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   648
  comparing with $TESTTMP/repo2
12274
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   649
  searching for changes
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   650
  changeset:   3:2655b8ecc4ee
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   651
  tag:         tip
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   652
  user:        test
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   653
  date:        Thu Jan 01 00:00:00 1970 +0000
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   654
  summary:     3-4-2
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   655
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12591
diff changeset
   656
  comparing with $TESTTMP/repo2/foo
12274
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   657
  searching for changes
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   658
  changeset:   4:e96193d6cb36
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   659
  tag:         tip
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   660
  user:        test
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   661
  date:        Thu Jan 01 00:00:00 1970 +0000
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   662
  summary:     3-4-2
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   663
  
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12591
diff changeset
   664
  comparing with $TESTTMP/repo2/foo/bar
12400
40852b4b910c incoming/outgoing: Fix recursion on sub repositories
Erik Zielke <ez@aragost.com>
parents: 12376
diff changeset
   665
  searching for changes
40852b4b910c incoming/outgoing: Fix recursion on sub repositories
Erik Zielke <ez@aragost.com>
parents: 12376
diff changeset
   666
  no changes found
40852b4b910c incoming/outgoing: Fix recursion on sub repositories
Erik Zielke <ez@aragost.com>
parents: 12376
diff changeset
   667
12274
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   668
  $ hg incoming -S --bundle incoming.hg
45742
b5e0746e272b incoming: leverage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com>
parents: 40715
diff changeset
   669
  abort: cannot specify both --subrepos and --bundle
45846
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45742
diff changeset
   670
  [10]
12274
c02e1ed3d407 incoming: recurse into subrepositories with --subrepos/-S flag
Martin Geisler <mg@lazybytes.net>
parents: 12272
diff changeset
   671
12275
88a42bf5fa46 test-subrepo-recursion: test missing subrepo
Martin Geisler <mg@lazybytes.net>
parents: 12274
diff changeset
   672
Test missing subrepo:
88a42bf5fa46 test-subrepo-recursion: test missing subrepo
Martin Geisler <mg@lazybytes.net>
parents: 12274
diff changeset
   673
88a42bf5fa46 test-subrepo-recursion: test missing subrepo
Martin Geisler <mg@lazybytes.net>
parents: 12274
diff changeset
   674
  $ rm -r foo
12588
41fa32a6b6f8 test-subrepo-recursion: deleted default arguments
Erik Zielke <ez@aragost.com>
parents: 12587
diff changeset
   675
  $ hg status -S
12503
b4711585a455 subrepo: improve lookup error messages
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12400
diff changeset
   676
  warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"
13339
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   677
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   678
Issue2619: IndexError: list index out of range on hg add with subrepos
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   679
The subrepo must sorts after the explicit filename.
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   680
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   681
  $ cd ..
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   682
  $ hg init test
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   683
  $ cd test
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   684
  $ hg init x
24464
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   685
  $ echo abc > abc.txt
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   686
  $ hg ci -Am "abc"
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   687
  adding abc.txt
13339
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   688
  $ echo "x = x" >> .hgsub
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   689
  $ hg add .hgsub
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   690
  $ touch a x/a
22167be007ed subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs <trbs@trbs.net>
parents: 12640
diff changeset
   691
  $ hg add a x/a
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   692
24464
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   693
  $ hg ci -Sm "added x"
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   694
  committing subrepository x
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   695
  $ echo abc > x/a
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   696
  $ hg revert --rev '.^' "set:subrepo('glob:x*')"
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   697
  abort: subrepository 'x' does not exist in 25ac2c9b3180!
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   698
  [255]
30ddc3cf76df revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com>
parents: 24440
diff changeset
   699
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   700
  $ cd ..