tests/test-subrepo.t
author Mads Kiilerich <mads@kiilerich.com>
Mon, 11 Jun 2012 01:38:32 +0200
changeset 16912 6ef3107c661e
parent 16540 4fe8eb4a6e2c
child 17255 3e856d8abe9c
permissions -rw-r--r--
tests: cleanup of tests that got lost in their own nested directories Some tests ended up in a directory several directories deeper than $TESTTMP, usually because some 'cd ..' had been forgotten between different test cases. Add 'cd ..' where they are missing so the tests get back where they started.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
     1
Let commit recurse into subrepos by default to match pre-2.0 behavior:
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
     2
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
     3
  $ echo "[ui]" >> $HGRCPATH
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
     4
  $ echo "commitsubrepos = Yes" >> $HGRCPATH
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
     5
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
     6
  $ hg init t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
     7
  $ cd t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
     8
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
     9
first revision, no sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    10
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    11
  $ echo a > a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    12
  $ hg ci -Am0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    13
  adding a
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    14
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    15
add first sub
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    16
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    17
  $ echo s = s > .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    18
  $ hg add .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    19
  $ hg init s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    20
  $ echo a > s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    21
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
    22
Issue2232: committing a subrepo without .hgsub
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    23
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    24
  $ hg ci -mbad s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    25
  abort: can't commit subrepos without .hgsub
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
    26
  [255]
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    27
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    28
  $ hg -R s ci -Ams0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    29
  adding a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    30
  $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    31
  parent: 0:f7b1eb17ad24 tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    32
   0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    33
  branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    34
  commit: 1 added, 1 subrepos
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    35
  update: (current)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    36
  $ hg ci -m1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    37
16454
92c7e917b647 tests: add test for fileset 'subrepo' keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16430
diff changeset
    38
Revert subrepo and test subrepo fileset keyword:
15265
460135339d74 revert: warn that subrepos cannot be reverted
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 15231
diff changeset
    39
460135339d74 revert: warn that subrepos cannot be reverted
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 15231
diff changeset
    40
  $ echo b > s/a
16454
92c7e917b647 tests: add test for fileset 'subrepo' keyword
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16430
diff changeset
    41
  $ hg revert "set:subrepo('glob:s*')"
16430
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
    42
  reverting subrepo s
16540
4fe8eb4a6e2c tests: add missing accept of native pathname separator
Mads Kiilerich <mads@kiilerich.com>
parents: 16454
diff changeset
    43
  reverting s/a (glob)
16430
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
    44
  $ rm s/a.orig
15265
460135339d74 revert: warn that subrepos cannot be reverted
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 15231
diff changeset
    45
16430
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
    46
Revert subrepo with no backup. The "reverting s/a" line is gone since
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
    47
we're really running 'hg update' in the subrepo:
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
    48
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
    49
  $ echo b > s/a
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
    50
  $ hg revert --no-backup s
6883c2363f44 revert: add support for reverting subrepos without --no-backup and/or --all
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 16429
diff changeset
    51
  reverting subrepo s
15265
460135339d74 revert: warn that subrepos cannot be reverted
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 15231
diff changeset
    52
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
    53
Issue2022: update -C
11485
b602a95c21ec subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232)
Matt Mackall <mpm@selenic.com>
parents: 11470
diff changeset
    54
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    55
  $ echo b > s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    56
  $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    57
  parent: 1:7cf8cfea66e4 tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    58
   1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    59
  branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    60
  commit: 1 subrepos
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    61
  update: (current)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    62
  $ hg co -C 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    63
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    64
  $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    65
  parent: 1:7cf8cfea66e4 tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    66
   1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    67
  branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    68
  commit: (clean)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    69
  update: (current)
11485
b602a95c21ec subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232)
Matt Mackall <mpm@selenic.com>
parents: 11470
diff changeset
    70
15231
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
    71
commands that require a clean repo should respect subrepos
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
    72
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
    73
  $ echo b >> s/a
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
    74
  $ hg backout tip
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
    75
  abort: uncommitted changes in subrepo s
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
    76
  [255]
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
    77
  $ hg revert -C -R s s/a
cd6f10dccf16 cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner <ede@alum.mit.edu>
parents: 14536
diff changeset
    78
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    79
add sub sub
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    80
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    81
  $ echo ss = ss > s/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    82
  $ hg init s/ss
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    83
  $ echo a > s/ss/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    84
  $ hg -R s add s/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    85
  $ hg -R s/ss add s/ss/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    86
  $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    87
  parent: 1:7cf8cfea66e4 tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    88
   1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    89
  branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    90
  commit: 1 subrepos
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    91
  update: (current)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    92
  $ hg ci -m2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    93
  committing subrepository s
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
    94
  committing subrepository s/ss (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    95
  $ hg sum
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    96
  parent: 2:df30734270ae tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    97
   2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    98
  branch: default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
    99
  commit: (clean)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   100
  update: (current)
11470
34e33d50c26b subrepo: correctly handle update -C with modified subrepos (issue2022)
Matt Mackall <mpm@selenic.com>
parents: 11088
diff changeset
   101
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   102
bump sub rev (and check it is ignored by ui.commitsubrepos)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   103
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   104
  $ echo b > s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   105
  $ hg -R s ci -ms1
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   106
  $ hg --config ui.commitsubrepos=no ci -m3
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   107
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   108
leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   109
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   110
  $ echo c > s/a
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   111
  $ hg --config ui.commitsubrepos=no ci -m4
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   112
  abort: uncommitted changes in subrepo s
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15265
diff changeset
   113
  (use --subrepos for recursive commit)
13411
d4de90a612f7 commit: abort if a subrepo is modified and ui.commitsubrepos=no
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   114
  [255]
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   115
  $ hg ci -m4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   116
  committing subrepository s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   117
  $ hg tip -R s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   118
  changeset:   3:1c833a7a9e3a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   119
  tag:         tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   120
  user:        test
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   121
  date:        Thu Jan 01 00:00:00 1970 +0000
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   122
  summary:     4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   123
  
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   124
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   125
check caching
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   126
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   127
  $ hg co 0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   128
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   129
  $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   130
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   131
restore
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   132
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   133
  $ hg co
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   134
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   135
  $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   136
  path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   137
   source   s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   138
   revision 1c833a7a9e3a4445c711aaf0f012379cd0d4034e
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   139
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   140
new branch for merge tests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   141
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   142
  $ hg co 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   143
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   144
  $ echo t = t >> .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   145
  $ hg init t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   146
  $ echo t > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   147
  $ hg -R t add t
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   148
  adding t/t (glob)
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   149
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   150
5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   151
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   152
  $ hg ci -m5 # add sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   153
  committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   154
  created new head
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   155
  $ echo t2 > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   156
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   157
6
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   158
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   159
  $ hg st -R s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   160
  $ hg ci -m6 # change sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   161
  committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   162
  $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   163
  path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   164
   source   s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   165
   revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   166
  path t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   167
   source   t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   168
   revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   169
  $ echo t3 > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   170
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   171
7
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   172
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   173
  $ hg ci -m7 # change sub again for conflict test
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   174
  committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   175
  $ hg rm .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   176
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   177
8
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   178
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   179
  $ hg ci -m8 # remove sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   180
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   181
merge tests
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   182
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   183
  $ hg co -C 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   184
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   185
  $ hg merge 5 # test adding
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   186
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   187
  (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   188
  $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   189
  path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   190
   source   s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   191
   revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   192
  path t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   193
   source   t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   194
   revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   195
  $ hg ci -m9
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   196
  created new head
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   197
  $ hg merge 6 --debug # test change
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   198
    searching for copies back to rev 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   199
  resolving manifests
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
   200
   overwrite: False, partial: False
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
   201
   ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   202
   .hgsubstate: versions differ -> m
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   203
  updating: .hgsubstate 1/1 files (100.00%)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   204
  subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   205
    subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   206
  getting subrepo t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   207
  resolving manifests
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
   208
   overwrite: True, partial: False
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
   209
   ancestor: 60ca1237c194+, local: 60ca1237c194+, remote: 6747d179aa9a
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   210
   t: remote is newer -> g
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   211
  updating: t 1/1 files (100.00%)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   212
  getting t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   213
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   214
  (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   215
  $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   216
  path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   217
   source   s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   218
   revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   219
  path t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   220
   source   t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   221
   revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   222
  $ echo conflict > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   223
  $ hg ci -m10
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   224
  committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   225
  $ HGMERGE=internal:merge hg merge --debug 7 # test conflict
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   226
    searching for copies back to rev 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   227
  resolving manifests
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
   228
   overwrite: False, partial: False
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
   229
   ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   230
   .hgsubstate: versions differ -> m
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   231
  updating: .hgsubstate 1/1 files (100.00%)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   232
  subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   233
    subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   234
  merging subrepo t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   235
    searching for copies back to rev 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   236
  resolving manifests
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
   237
   overwrite: False, partial: False
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15623
diff changeset
   238
   ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   239
   t: versions differ -> m
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   240
  preserving t for resolve of t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   241
  updating: t 1/1 files (100.00%)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   242
  picked tool 'internal:merge' for t (binary False symlink False)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   243
  merging t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   244
  my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   245
  warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 15474
diff changeset
   246
  merging t incomplete! (edit conflicts, then use 'hg resolve --mark')
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   247
  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
12314
f2daa6ab514a merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Brodie Rao <brodie@bitheap.org>
parents: 12127
diff changeset
   248
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   249
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   250
  (branch merge, don't forget to commit)
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   251
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   252
should conflict
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   253
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   254
  $ cat t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   255
  <<<<<<< local
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   256
  conflict
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   257
  =======
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   258
  t3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   259
  >>>>>>> other
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   260
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   261
clone
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   262
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   263
  $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   264
  $ hg clone t tc
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   265
  updating to branch default
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   266
  cloning subrepo s from $TESTTMP/t/s (glob)
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   267
  cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   268
  cloning subrepo t from $TESTTMP/t/t (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   269
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   270
  $ cd tc
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   271
  $ hg debugsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   272
  path s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   273
   source   s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   274
   revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   275
  path t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   276
   source   t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   277
   revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
8816
a7c4eb0cc0ed subrepo: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   278
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   279
push
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   280
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   281
  $ echo bah > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   282
  $ hg ci -m11
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   283
  committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   284
  $ hg push
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   285
  pushing to $TESTTMP/t (glob)
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   286
  pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   287
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   288
  no changes found
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   289
  pushing subrepo s to $TESTTMP/t/s (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   290
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   291
  no changes found
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   292
  pushing subrepo t to $TESTTMP/t/t (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   293
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   294
  adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   295
  adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   296
  adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   297
  added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   298
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   299
  adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   300
  adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   301
  adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   302
  added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   303
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   304
push -f
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
   305
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   306
  $ echo bah > s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   307
  $ hg ci -m12
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   308
  committing subrepository s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   309
  $ hg push
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   310
  pushing to $TESTTMP/t (glob)
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   311
  pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   312
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   313
  no changes found
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   314
  pushing subrepo s to $TESTTMP/t/s (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   315
  searching for changes
14525
826a13720fbc prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents: 14361
diff changeset
   316
  abort: push creates new remote head 12a213df6fa9!
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   317
  (did you forget to merge? use push -f to force)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
   318
  [255]
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   319
  $ hg push -f
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   320
  pushing to $TESTTMP/t (glob)
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   321
  pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   322
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   323
  no changes found
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   324
  pushing subrepo s to $TESTTMP/t/s (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   325
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   326
  adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   327
  adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   328
  adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   329
  added 1 changesets with 1 changes to 1 files (+1 heads)
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   330
  pushing subrepo t to $TESTTMP/t/t (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   331
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   332
  no changes found
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   333
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   334
  adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   335
  adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   336
  adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   337
  added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   338
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   339
update
10177
5ca0d220ae21 subrepo: add table-based dispatch for subrepo types
Augie Fackler <durin42@gmail.com>
parents: 8816
diff changeset
   340
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   341
  $ cd ../t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   342
  $ hg up -C # discard our earlier merge
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   343
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   344
  $ echo blah > t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   345
  $ hg ci -m13
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   346
  committing subrepository t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   347
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   348
pull
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   349
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   350
  $ cd ../tc
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   351
  $ hg pull
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   352
  pulling from $TESTTMP/t (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   353
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   354
  adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   355
  adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   356
  adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   357
  added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   358
  (run 'hg update' to get a working copy)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   359
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   360
should pull t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   361
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   362
  $ hg up
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   363
  pulling subrepo t from $TESTTMP/t/t (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   364
  searching for changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   365
  adding changesets
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   366
  adding manifests
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   367
  adding file changes
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   368
  added 1 changesets with 1 changes to 1 files
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   369
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   370
  $ cat t/t
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   371
  blah
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   372
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   373
bogus subrepo path aborts
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
   374
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   375
  $ echo 'bogus=[boguspath' >> .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   376
  $ hg ci -m 'bogus subrepo path'
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   377
  abort: missing ] in subrepo source
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
   378
  [255]
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   379
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
   380
Issue1986: merge aborts when trying to merge a subrepo that
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
   381
shouldn't need merging
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   382
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   383
# subrepo layout
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   384
#
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   385
#   o   5 br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   386
#  /|
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   387
# o |   4 default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   388
# | |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   389
# | o   3 br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   390
# |/|
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   391
# o |   2 default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   392
# | |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   393
# | o   1 br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   394
# |/
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   395
# o     0 default
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
   396
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   397
  $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   398
  $ rm -rf sub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   399
  $ hg init main
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   400
  $ cd main
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   401
  $ hg init s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   402
  $ cd s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   403
  $ echo a > a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   404
  $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   405
  adding a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   406
  $ hg branch br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   407
  marked working directory as branch br
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15321
diff changeset
   408
  (branches are permanent and global, did you want a bookmark?)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   409
  $ echo a >> a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   410
  $ hg ci -m1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   411
  $ hg up default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   412
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   413
  $ echo b > b
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   414
  $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   415
  adding b
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   416
  $ hg up br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   417
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   418
  $ hg merge tip
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   419
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   420
  (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   421
  $ hg ci -m1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   422
  $ hg up 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   423
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   424
  $ echo c > c
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   425
  $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   426
  adding c
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   427
  $ hg up 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   428
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   429
  $ hg merge 4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   430
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   431
  (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   432
  $ hg ci -m1
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
   433
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   434
# main repo layout:
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   435
#
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   436
#   * <-- try to merge default into br again
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   437
# .`|
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   438
# . o   5 br      --> substate = 5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   439
# . |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   440
# o |   4 default --> substate = 4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   441
# | |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   442
# | o   3 br      --> substate = 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   443
# |/|
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   444
# o |   2 default --> substate = 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   445
# | |
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   446
# | o   1 br      --> substate = 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   447
# |/
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   448
# o     0 default --> substate = 2
10378
e1401c74572f subrepo: change default path in hgrc of subrepo after cloning
Saint Germain <saintger@gmail.com>
parents: 10252
diff changeset
   449
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   450
  $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   451
  $ echo 's = s' > .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   452
  $ hg -R s up 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   453
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   454
  $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   455
  adding .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   456
  $ hg branch br
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   457
  marked working directory as branch br
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15321
diff changeset
   458
  (branches are permanent and global, did you want a bookmark?)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   459
  $ echo b > b
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   460
  $ hg -R s up 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   461
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   462
  $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   463
  adding b
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   464
  $ hg up default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   465
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   466
  $ echo c > c
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   467
  $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   468
  adding c
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   469
  $ hg up 1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   470
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   471
  $ hg merge 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   472
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   473
  (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   474
  $ hg ci -m1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   475
  $ hg up 2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   476
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   477
  $ hg -R s up 4
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   478
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   479
  $ echo d > d
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   480
  $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   481
  adding d
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   482
  $ hg up 3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   483
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   484
  $ hg -R s up 5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   485
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   486
  $ echo e > e
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   487
  $ hg ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   488
  adding e
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   489
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   490
  $ hg up 5
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   491
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   492
  $ hg merge 4    # try to merge default into br again
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   493
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   494
  (branch merge, don't forget to commit)
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   495
  $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   496
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   497
test subrepo delete from .hgsubstate
10522
b07d487009b2 subrepo: Update .hgsubstate in case of deleted subrepo
Saint Germain <saintger@gmail.com>
parents: 10468
diff changeset
   498
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   499
  $ hg init testdelete
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   500
  $ mkdir testdelete/nested testdelete/nested2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   501
  $ hg init testdelete/nested
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   502
  $ hg init testdelete/nested2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   503
  $ echo test > testdelete/nested/foo
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   504
  $ echo test > testdelete/nested2/foo
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   505
  $ hg -R testdelete/nested add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   506
  adding testdelete/nested/foo (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   507
  $ hg -R testdelete/nested2 add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   508
  adding testdelete/nested2/foo (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   509
  $ hg -R testdelete/nested ci -m test
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   510
  $ hg -R testdelete/nested2 ci -m test
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   511
  $ echo nested = nested > testdelete/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   512
  $ echo nested2 = nested2 >> testdelete/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   513
  $ hg -R testdelete add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   514
  adding testdelete/.hgsub (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   515
  $ hg -R testdelete ci -m "nested 1 & 2 added"
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   516
  $ echo nested = nested > testdelete/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   517
  $ hg -R testdelete ci -m "nested 2 deleted"
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   518
  $ cat testdelete/.hgsubstate
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   519
  bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   520
  $ hg -R testdelete remove testdelete/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   521
  $ hg -R testdelete ci -m ".hgsub deleted"
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   522
  $ cat testdelete/.hgsubstate
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   523
  bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   524
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   525
test repository cloning
10251
a19d2993385d subrepo: fix merging of already merged subrepos (issue1986)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8816
diff changeset
   526
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   527
  $ mkdir mercurial mercurial2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   528
  $ hg init nested_absolute
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   529
  $ echo test > nested_absolute/foo
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   530
  $ hg -R nested_absolute add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   531
  adding nested_absolute/foo (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   532
  $ hg -R nested_absolute ci -mtest
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   533
  $ cd mercurial
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   534
  $ hg init nested_relative
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   535
  $ echo test2 > nested_relative/foo2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   536
  $ hg -R nested_relative add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   537
  adding nested_relative/foo2 (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   538
  $ hg -R nested_relative ci -mtest2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   539
  $ hg init main
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   540
  $ echo "nested_relative = ../nested_relative" > main/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   541
  $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   542
  $ hg -R main add
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   543
  adding main/.hgsub (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   544
  $ hg -R main ci -m "add subrepos"
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   545
  $ cd ..
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   546
  $ hg clone mercurial/main mercurial2/main
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   547
  updating to branch default
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   548
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   549
  $ cat mercurial2/main/nested_absolute/.hg/hgrc \
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   550
  >     mercurial2/main/nested_relative/.hg/hgrc
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   551
  [paths]
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   552
  default = $TESTTMP/mercurial/nested_absolute
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   553
  [paths]
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   554
  default = $TESTTMP/mercurial/nested_relative
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   555
  $ rm -rf mercurial mercurial2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   556
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
   557
Issue1977: multirepo push should fail if subrepo push fails
11069
12f04d18143e subrepo: add test for issue1977
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 10775
diff changeset
   558
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   559
  $ hg init repo
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   560
  $ hg init repo/s
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   561
  $ echo a > repo/s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   562
  $ hg -R repo/s ci -Am0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   563
  adding a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   564
  $ echo s = s > repo/.hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   565
  $ hg -R repo ci -Am1
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   566
  adding .hgsub
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   567
  $ hg clone repo repo2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   568
  updating to branch default
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   569
  cloning subrepo s from $TESTTMP/repo/s (glob)
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   570
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   571
  $ hg -q -R repo2 pull -u
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   572
  $ echo 1 > repo2/s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   573
  $ hg -R repo2/s ci -m2
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   574
  $ hg -q -R repo2/s push
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   575
  $ hg -R repo2/s up -C 0
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   576
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   577
  $ echo 2 > repo2/s/a
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   578
  $ hg -R repo2/s ci -m3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   579
  created new head
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   580
  $ hg -R repo2 ci -m3
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   581
  $ hg -q -R repo2 push
14525
826a13720fbc prepush: print short hash of first new head in abort message
Adrian Buehlmann <adrian@cadifra.com>
parents: 14361
diff changeset
   582
  abort: push creates new remote head 9d66565e64e1!
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   583
  (did you forget to merge? use push -f to force)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12314
diff changeset
   584
  [255]
11912
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   585
  $ hg -R repo update
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   586
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
69678985bdba tests: unify test-subrepo
Martin Geisler <mg@lazybytes.net>
parents: 11485
diff changeset
   587
  $ rm -rf repo2 repo
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   588
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   589
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   590
Issue1852 subrepos with relative paths always push/pull relative to default
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   591
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   592
Prepare a repo with subrepo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   593
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   594
  $ hg init issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   595
  $ cd issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   596
  $ hg init sub/repo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   597
  $ echo test > sub/repo/foo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   598
  $ hg -R sub/repo add sub/repo/foo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   599
  $ echo sub/repo = sub/repo > .hgsub
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   600
  $ hg add .hgsub
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   601
  $ hg ci -mtest
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   602
  committing subrepository sub/repo (glob)
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   603
  $ echo test >> sub/repo/foo
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   604
  $ hg ci -mtest
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   605
  committing subrepository sub/repo (glob)
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   606
  $ cd ..
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   607
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   608
Create repo without default path, pull top repo, and see what happens on update
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   609
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   610
  $ hg init issue1852b
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   611
  $ hg -R issue1852b pull issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   612
  pulling from issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   613
  requesting all changes
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   614
  adding changesets
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   615
  adding manifests
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   616
  adding file changes
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   617
  added 2 changesets with 3 changes to 2 files
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   618
  (run 'hg update' to get a working copy)
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   619
  $ hg -R issue1852b update
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   620
  abort: default path for subrepository sub/repo not found (glob)
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   621
  [255]
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   622
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   623
Pull -u now doesn't help
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   624
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   625
  $ hg -R issue1852b pull -u issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   626
  pulling from issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   627
  searching for changes
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   628
  no changes found
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   629
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   630
Try the same, but with pull -u
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   631
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   632
  $ hg init issue1852c
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   633
  $ hg -R issue1852c pull -r0 -u issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   634
  pulling from issue1852a
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   635
  adding changesets
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   636
  adding manifests
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   637
  adding file changes
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   638
  added 1 changesets with 2 changes to 2 files
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15410
diff changeset
   639
  cloning subrepo sub/repo from issue1852a/sub/repo (glob)
12852
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   640
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
12753
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   641
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   642
Try to push from the other side
ef5eaf53f4f7 subrepo: abort instead of pushing/pulling to the repo itself
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   643
12852
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   644
  $ hg -R issue1852a push `pwd`/issue1852c
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   645
  pushing to $TESTTMP/issue1852c
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   646
  pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
12852
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   647
  searching for changes
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   648
  no changes found
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   649
  searching for changes
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   650
  adding changesets
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   651
  adding manifests
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   652
  adding file changes
5dbff89cf107 subrepo: propagate non-default pull/push path to relative subrepos (issue1852)
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
   653
  added 1 changesets with 1 changes to 1 files
13233
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   654
14360
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   655
Incoming and outgoing should not use the default path:
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   656
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   657
  $ hg clone -q issue1852a issue1852d
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   658
  $ hg -R issue1852d outgoing --subrepos issue1852c
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   659
  comparing with issue1852c
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   660
  searching for changes
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   661
  no changes found
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   662
  comparing with issue1852c/sub/repo
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   663
  searching for changes
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   664
  no changes found
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   665
  [1]
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   666
  $ hg -R issue1852d incoming --subrepos issue1852c
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   667
  comparing with issue1852c
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   668
  searching for changes
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   669
  no changes found
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   670
  comparing with issue1852c/sub/repo
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   671
  searching for changes
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   672
  no changes found
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   673
  [1]
ab687820c4cc subrepo: respect non-default path for incoming/outgoing
Martin Geisler <mg@aragost.com>
parents: 13417
diff changeset
   674
13233
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   675
Check status of files when none of them belong to the first
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   676
subrepository:
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   677
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   678
  $ hg init subrepo-status
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   679
  $ cd subrepo-status
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   680
  $ hg init subrepo-1
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   681
  $ hg init subrepo-2
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   682
  $ cd subrepo-2
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   683
  $ touch file
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   684
  $ hg add file
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   685
  $ cd ..
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   686
  $ echo subrepo-1 = subrepo-1 > .hgsub
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   687
  $ echo subrepo-2 = subrepo-2 >> .hgsub
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   688
  $ hg add .hgsub
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   689
  $ hg ci -m 'Added subrepos'
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   690
  committing subrepository subrepo-2
0b30e6148ec5 subrepo: do not report known files inside repositories as unknown
Oleg Stepanov <oleg.stepanov@jetbrains.com>
parents: 12852
diff changeset
   691
  $ hg st subrepo-2/file
13322
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   692
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   693
Check hg update --clean
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   694
  $ cd $TESTTMP/t
13322
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   695
  $ rm -r t/t.orig
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   696
  $ hg status -S --all
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   697
  C .hgsub
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   698
  C .hgsubstate
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   699
  C a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   700
  C s/.hgsub
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   701
  C s/.hgsubstate
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   702
  C s/a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   703
  C s/ss/a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   704
  C t/t
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   705
  $ echo c1 > s/a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   706
  $ cd s
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   707
  $ echo c1 > b
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   708
  $ echo c1 > c
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   709
  $ hg add b
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   710
  $ cd ..
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   711
  $ hg status -S
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   712
  M s/a
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   713
  A s/b
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   714
  ? s/c
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   715
  $ hg update -C
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   716
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   717
  $ hg status -S
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   718
  ? s/b
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13233
diff changeset
   719
  ? s/c
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   720
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   721
Sticky subrepositories, no changes
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
   722
  $ cd $TESTTMP/t
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   723
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   724
  925c17564ef8 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   725
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   726
  12a213df6fa9 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   727
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   728
  52c0adc0515a tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   729
  $ hg update 11
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   730
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   731
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   732
  365661e5936a
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   733
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   734
  fc627a69481f
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   735
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   736
  e95bcfa18a35
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   737
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   738
Sticky subrepositorys, file changes
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   739
  $ touch s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   740
  $ touch t/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   741
  $ hg add -S s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   742
  $ hg add -S t/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   743
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   744
  365661e5936a
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   745
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   746
  fc627a69481f+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   747
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   748
  e95bcfa18a35+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   749
  $ hg update tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   750
   subrepository sources for s differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   751
  use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   752
   l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   753
   subrepository sources for t differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   754
  use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   755
   l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   756
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   757
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   758
  925c17564ef8+ tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   759
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   760
  fc627a69481f+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   761
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   762
  e95bcfa18a35+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   763
  $ hg update --clean tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   764
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   765
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   766
Sticky subrepository, revision updates
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   767
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   768
  925c17564ef8 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   769
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   770
  12a213df6fa9 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   771
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   772
  52c0adc0515a tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   773
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   774
  $ hg update -r -2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   775
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   776
  $ cd ../t
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   777
  $ hg update -r 2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   778
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   779
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   780
  $ hg update 10
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   781
   subrepository sources for t differ (in checked out version)
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   782
  use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   783
   l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   784
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   785
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   786
  e45c8b14af55+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   787
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   788
  1c833a7a9e3a
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   789
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   790
  7af322bc1198
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   791
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   792
Sticky subrepository, file changes and revision updates
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   793
  $ touch s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   794
  $ touch t/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   795
  $ hg add -S s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   796
  $ hg add -S t/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   797
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   798
  e45c8b14af55+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   799
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   800
  1c833a7a9e3a+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   801
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   802
  7af322bc1198+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   803
  $ hg update tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   804
   subrepository sources for s differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   805
  use (l)ocal source (1c833a7a9e3a) or (r)emote source (12a213df6fa9)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   806
   l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   807
   subrepository sources for t differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   808
  use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   809
   l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   810
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   811
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   812
  925c17564ef8 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   813
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   814
  1c833a7a9e3a+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   815
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   816
  7af322bc1198+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   817
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   818
Sticky repository, update --clean
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   819
  $ hg update --clean tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   820
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   821
  $ hg id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   822
  925c17564ef8 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   823
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   824
  12a213df6fa9 tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   825
  $ hg -R t id  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   826
  52c0adc0515a tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   827
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   828
Test subrepo already at intended revision:
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   829
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   830
  $ hg update fc627a69481f
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   831
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   832
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   833
  $ hg update 11
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   834
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   835
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   836
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   837
  11+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   838
  $ hg -R s id
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   839
  fc627a69481f
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   840
  $ hg -R t id 
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13411
diff changeset
   841
  e95bcfa18a35
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   842
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   843
Test that removing .hgsubstate doesn't break anything:
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   844
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   845
  $ hg rm -f .hgsubstate
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   846
  $ hg ci -mrm
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   847
  nothing changed
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   848
  [1]
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   849
  $ hg log -vr tip
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   850
  changeset:   13:925c17564ef8
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   851
  tag:         tip
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   852
  user:        test
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   853
  date:        Thu Jan 01 00:00:00 1970 +0000
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   854
  files:       .hgsubstate
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   855
  description:
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   856
  13
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   857
  
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   858
  
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   859
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   860
Test that removing .hgsub removes .hgsubstate:
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   861
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   862
  $ hg rm .hgsub
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   863
  $ hg ci -mrm2
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   864
  created new head
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   865
  $ hg log -vr tip
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   866
  changeset:   14:2400bccd50af
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   867
  tag:         tip
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   868
  parent:      11:365661e5936a
14536
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   869
  user:        test
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   870
  date:        Thu Jan 01 00:00:00 1970 +0000
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   871
  files:       .hgsub .hgsubstate
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   872
  description:
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   873
  rm2
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   874
  
52cbeb5a651b subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
Matt Mackall <mpm@selenic.com>
parents: 14525
diff changeset
   875
  
15635
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   876
Test issue3153: diff -S with deleted subrepos
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   877
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   878
  $ hg diff --nodates -S -c .
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   879
  diff -r 365661e5936a -r 2400bccd50af .hgsub
15635
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   880
  --- a/.hgsub
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   881
  +++ /dev/null
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   882
  @@ -1,2 +0,0 @@
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   883
  -s = s
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   884
  -t = t
16073
b254f827b7a6 subrepo: rewrite handling of subrepo state at commit (issue2403)
Matt Mackall <mpm@selenic.com>
parents: 16039
diff changeset
   885
  diff -r 365661e5936a -r 2400bccd50af .hgsubstate
15635
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   886
  --- a/.hgsubstate
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   887
  +++ /dev/null
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   888
  @@ -1,2 +0,0 @@
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   889
  -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
82f5e471792d test-subrepo: test for Issue3153
Martin Geisler <mg@lazybytes.net>
parents: 15615
diff changeset
   890
  -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
15636
4841035f37b6 merge with stable
Martin Geisler <mg@lazybytes.net>
parents: 15625 15635
diff changeset
   891
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   892
Test behavior of add for explicit path in subrepo:
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   893
  $ cd ..
15473
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
   894
  $ hg init explicit
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
   895
  $ cd explicit
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   896
  $ echo s = s > .hgsub
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   897
  $ hg add .hgsub
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   898
  $ hg init s
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   899
  $ hg ci -m0
15410
9e99d2bbb1b1 add: support adding explicit files in subrepos
David M. Carr <david@carrclan.us>
parents: 15409
diff changeset
   900
Adding with an explicit path in a subrepo adds the file
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   901
  $ echo c1 > f1
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   902
  $ echo c2 > s/f2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   903
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   904
  ? f1
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   905
  ? s/f2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   906
  $ hg add s/f2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   907
  $ hg st -S
15410
9e99d2bbb1b1 add: support adding explicit files in subrepos
David M. Carr <david@carrclan.us>
parents: 15409
diff changeset
   908
  A s/f2
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   909
  ? f1
15410
9e99d2bbb1b1 add: support adding explicit files in subrepos
David M. Carr <david@carrclan.us>
parents: 15409
diff changeset
   910
  $ hg ci -R s -m0
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   911
  $ hg ci -Am1
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   912
  adding f1
15410
9e99d2bbb1b1 add: support adding explicit files in subrepos
David M. Carr <david@carrclan.us>
parents: 15409
diff changeset
   913
Adding with an explicit path in a subrepo with -S has the same behavior
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   914
  $ echo c3 > f3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   915
  $ echo c4 > s/f4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   916
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   917
  ? f3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   918
  ? s/f4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   919
  $ hg add -S s/f4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   920
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   921
  A s/f4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   922
  ? f3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   923
  $ hg ci -R s -m1
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   924
  $ hg ci -Ama2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   925
  adding f3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   926
Adding without a path or pattern silently ignores subrepos
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   927
  $ echo c5 > f5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   928
  $ echo c6 > s/f6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   929
  $ echo c7 > s/f7
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   930
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   931
  ? f5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   932
  ? s/f6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   933
  ? s/f7
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   934
  $ hg add
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   935
  adding f5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   936
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   937
  A f5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   938
  ? s/f6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   939
  ? s/f7
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   940
  $ hg ci -R s -Am2
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   941
  adding f6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   942
  adding f7
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   943
  $ hg ci -m3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   944
Adding without a path or pattern with -S also adds files in subrepos
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   945
  $ echo c8 > f8
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   946
  $ echo c9 > s/f9
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   947
  $ echo c10 > s/f10
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   948
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   949
  ? f8
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   950
  ? s/f10
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   951
  ? s/f9
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   952
  $ hg add -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   953
  adding f8
15520
d6d7b56ec346 tests: add missing '(glob)'s to match '\' in paths in test output on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 15474
diff changeset
   954
  adding s/f10 (glob)
d6d7b56ec346 tests: add missing '(glob)'s to match '\' in paths in test output on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 15474
diff changeset
   955
  adding s/f9 (glob)
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   956
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   957
  A f8
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   958
  A s/f10
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   959
  A s/f9
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   960
  $ hg ci -R s -m3
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   961
  $ hg ci -m4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   962
Adding with a pattern silently ignores subrepos
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   963
  $ echo c11 > fm11
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   964
  $ echo c12 > fn12
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   965
  $ echo c13 > s/fm13
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   966
  $ echo c14 > s/fn14
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   967
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   968
  ? fm11
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   969
  ? fn12
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   970
  ? s/fm13
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   971
  ? s/fn14
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   972
  $ hg add 'glob:**fm*'
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   973
  adding fm11
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   974
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   975
  A fm11
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   976
  ? fn12
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   977
  ? s/fm13
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   978
  ? s/fn14
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   979
  $ hg ci -R s -Am4
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   980
  adding fm13
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   981
  adding fn14
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   982
  $ hg ci -Am5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   983
  adding fn12
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   984
Adding with a pattern with -S also adds matches in subrepos
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   985
  $ echo c15 > fm15
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   986
  $ echo c16 > fn16
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   987
  $ echo c17 > s/fm17
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   988
  $ echo c18 > s/fn18
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   989
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   990
  ? fm15
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   991
  ? fn16
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   992
  ? s/fm17
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   993
  ? s/fn18
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   994
  $ hg add -S 'glob:**fm*'
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   995
  adding fm15
15520
d6d7b56ec346 tests: add missing '(glob)'s to match '\' in paths in test output on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 15474
diff changeset
   996
  adding s/fm17 (glob)
15409
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   997
  $ hg st -S
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   998
  A fm15
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
   999
  A s/fm17
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
  1000
  ? fn16
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
  1001
  ? s/fn18
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
  1002
  $ hg ci -R s -Am5
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
  1003
  adding fn18
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
  1004
  $ hg ci -Am6
83c2e6772408 tests: add test for add of explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15321
diff changeset
  1005
  adding fn16
15473
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
  1006
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
  1007
Test behavior of forget for explicit path in subrepo:
15474
95174c381525 forget: support forgetting explicit paths in subrepos
David M. Carr <david@carrclan.us>
parents: 15473
diff changeset
  1008
Forgetting an explicit path in a subrepo untracks the file
15473
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
  1009
  $ echo c19 > s/f19
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
  1010
  $ hg add s/f19
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
  1011
  $ hg st -S
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
  1012
  A s/f19
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
  1013
  $ hg forget s/f19
15474
95174c381525 forget: support forgetting explicit paths in subrepos
David M. Carr <david@carrclan.us>
parents: 15473
diff changeset
  1014
  $ hg st -S
95174c381525 forget: support forgetting explicit paths in subrepos
David M. Carr <david@carrclan.us>
parents: 15473
diff changeset
  1015
  ? s/f19
15473
d90b0b30464b tests: add test for behavior of forget for explicit path in subrepo
David M. Carr <david@carrclan.us>
parents: 15447
diff changeset
  1016
  $ rm s/f19
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16540
diff changeset
  1017
  $ cd ..