tests/test-subrepo-svn.t
author Patrick Mezard <patrick@mezard.eu>
Sat, 12 May 2012 00:24:07 +0200
changeset 16657 b6081c2c4647
parent 16554 ae2664ee0223
child 16898 bb91c602d4ad
permissions -rw-r--r--
phases: introduce phasecache The original motivation was changectx.phase() had special logic to correctly lookup in repo._phaserev, including invalidating it when necessary. And at other places, repo._phaserev was accessed directly. This led to the discovery that phases state including _phaseroots, _phaserev and _dirtyphase was manipulated in localrepository.py, phases.py, repair.py, etc. phasecache helps encapsulating that. This patch replaces all phase state in localrepo with phasecache and adjust related code except for advance/retractboundary() in phases. These still access to phasecache internals directly. This will be addressed in a followup.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15346
53f37b24f26a tests: check for svn >= 1.3 and >= 1.5 in tests that require those versions
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15321
diff changeset
     1
  $ "$TESTDIR/hghave" svn15 || exit 80
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     2
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
     3
  $ fix_path()
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
     4
  > {
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
     5
  >     tr '\\' /
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
     6
  > }
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
     7
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
     8
SVN wants all paths to start with a slash. Unfortunately, Windows ones
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
     9
don't. Handle that.
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    10
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
    11
  $ escapedwd=`pwd | fix_path`
12404
f33a5d1c937e test-subrepo-svn: restore expr functionality for solaris
Mads Kiilerich <mads@kiilerich.com>
parents: 12377
diff changeset
    12
  $ expr "$escapedwd" : '\/' > /dev/null || escapedwd="/$escapedwd"
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    13
  $ escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"`
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    14
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    15
create subversion repo
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    16
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    17
  $ SVNREPO="file://$escapedwd/svn-repo"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    18
  $ WCROOT="`pwd`/svn-wc"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    19
  $ svnadmin create svn-repo
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    20
  $ svn co "$SVNREPO" svn-wc
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    21
  Checked out revision 0.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    22
  $ cd svn-wc
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    23
  $ mkdir src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    24
  $ echo alpha > src/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    25
  $ svn add src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    26
  A         src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    27
  A         src/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    28
  $ mkdir externals
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    29
  $ echo other > externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    30
  $ svn add externals
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    31
  A         externals
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    32
  A         externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    33
  $ svn ci -m 'Add alpha'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    34
  Adding         externals
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    35
  Adding         externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    36
  Adding         src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    37
  Adding         src/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    38
  Transmitting file data ..
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    39
  Committed revision 1.
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
    40
  $ svn up -q
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    41
  $ echo "externals -r1 $SVNREPO/externals" > extdef
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    42
  $ svn propset -F extdef svn:externals src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    43
  property 'svn:externals' set on 'src'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    44
  $ svn ci -m 'Setting externals'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    45
  Sending        src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    46
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    47
  Committed revision 2.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    48
  $ cd ..
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    49
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    50
create hg repo
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    51
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    52
  $ mkdir sub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    53
  $ cd sub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    54
  $ hg init t
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    55
  $ cd t
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    56
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    57
first revision, no sub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    58
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    59
  $ echo a > a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    60
  $ hg ci -Am0
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    61
  adding a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    62
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    63
add first svn sub with leading whitespaces
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    64
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
    65
  $ echo "s =        [svn]       $SVNREPO/src" >> .hgsub
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
    66
  $ echo "subdir/s = [svn]       $SVNREPO/src" >> .hgsub
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    67
  $ svn co --quiet "$SVNREPO"/src s
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
    68
  $ mkdir subdir
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
    69
  $ svn co --quiet "$SVNREPO"/src subdir/s
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    70
  $ hg add .hgsub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    71
  $ hg ci -m1
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    72
12798
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    73
make sure we avoid empty commits (issue2445)
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    74
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    75
  $ hg sum
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    76
  parent: 1:* tip (glob)
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    77
   1
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    78
  branch: default
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    79
  commit: (clean)
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    80
  update: (current)
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    81
  $ hg ci -moops
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    82
  nothing changed
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    83
  [1]
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    84
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    85
debugsub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    86
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
    87
  $ hg debugsub
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    88
  path s
12668
89e35377dbe8 test-subrepo-svn.t: ignore that subversion %-encodes $TESTTMP
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
    89
   source   file://*/svn-repo/src (glob)
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    90
   revision 2
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
    91
  path subdir/s
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
    92
   source   file://*/svn-repo/src (glob)
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
    93
   revision 2
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    94
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    95
change file in svn and hg, commit
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    96
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    97
  $ echo a >> a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    98
  $ echo alpha >> s/alpha
12798
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
    99
  $ hg sum
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
   100
  parent: 1:* tip (glob)
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
   101
   1
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
   102
  branch: default
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
   103
  commit: 1 modified, 1 subrepos
3d6ba8c2b1b8 subrepo: fix status check on SVN subrepos (issue2445)
Matt Mackall <mpm@selenic.com>
parents: 12668
diff changeset
   104
  update: (current)
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   105
  $ hg commit --subrepos -m 'Message!' | grep -v Updating
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   106
  committing subrepository s
12377
a5b77eb0409b tests: various fixes for new unified test pattern format
Matt Mackall <mpm@selenic.com>
parents: 12376
diff changeset
   107
  Sending*s/alpha (glob)
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   108
  Transmitting file data .
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   109
  Committed revision 3.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   110
  
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   111
  Fetching external item into '*s/externals'* (glob)
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   112
  External at revision 1.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   113
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   114
  At revision 3.
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   115
  $ hg debugsub
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   116
  path s
12668
89e35377dbe8 test-subrepo-svn.t: ignore that subversion %-encodes $TESTTMP
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   117
   source   file://*/svn-repo/src (glob)
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   118
   revision 3
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   119
  path subdir/s
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   120
   source   file://*/svn-repo/src (glob)
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   121
   revision 2
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   122
16529
3d5d204a08c7 subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents: 16527
diff changeset
   123
missing svn file, commit should fail
3d5d204a08c7 subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents: 16527
diff changeset
   124
3d5d204a08c7 subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents: 16527
diff changeset
   125
  $ rm s/alpha
3d5d204a08c7 subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents: 16527
diff changeset
   126
  $ hg commit --subrepos -m 'abort on missing file'
3d5d204a08c7 subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents: 16527
diff changeset
   127
  committing subrepository s
16530
e37199a1f9d4 subrepo/svn: improve error message on missing files
Patrick Mezard <patrick@mezard.eu>
parents: 16529
diff changeset
   128
  abort: cannot commit missing svn entries
16529
3d5d204a08c7 subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents: 16527
diff changeset
   129
  [255]
3d5d204a08c7 subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents: 16527
diff changeset
   130
  $ svn revert s/alpha > /dev/null
3d5d204a08c7 subrepo/svn: abort on commit with missing file (issue3029)
Patrick Mezard <patrick@mezard.eu>
parents: 16527
diff changeset
   131
13287
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   132
add an unrelated revision in svn and update the subrepo to without
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   133
bringing any changes.
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   134
13410
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13332
diff changeset
   135
  $ svn mkdir "$SVNREPO/unrelated" -m 'create unrelated'
13287
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   136
  
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   137
  Committed revision 4.
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   138
  $ svn up -q s
13287
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   139
  $ hg sum
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   140
  parent: 2:* tip (glob)
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   141
   Message!
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   142
  branch: default
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   143
  commit: (clean)
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   144
  update: (current)
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   145
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   146
  $ echo a > s/a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   147
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   148
should be empty despite change to s/a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   149
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   150
  $ hg st
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   151
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   152
add a commit from svn
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
   153
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   154
  $ cd "$WCROOT"/src
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   155
  $ svn up -q
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   156
  $ echo xyz >> alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   157
  $ svn propset svn:mime-type 'text/xml' alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   158
  property 'svn:mime-type' set on 'alpha'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   159
  $ svn ci -m 'amend a from svn'
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   160
  Sending        *alpha (glob)
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   161
  Transmitting file data .
13287
d0e0d3d43e14 subrepo: compare svn subrepo state to last committed revision
Patrick Mezard <pmezard@gmail.com>
parents: 13015
diff changeset
   162
  Committed revision 5.
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   163
  $ cd ../../sub/t
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
   164
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   165
this commit from hg will fail
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
   166
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   167
  $ echo zzz >> s/alpha
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   168
  $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date'
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   169
  committing subrepository s
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   170
  abort: svn:*Commit failed (details follow): (glob)
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   171
  [255]
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   172
  $ svn revert -q s/alpha
10273
e898bc7810ad subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents: 10267
diff changeset
   173
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   174
this commit fails because of meta changes
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   175
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   176
  $ svn propset svn:mime-type 'text/html' s/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   177
  property 'svn:mime-type' set on 's/alpha'
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   178
  $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date'
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   179
  committing subrepository s
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   180
  abort: svn:*Commit failed (details follow): (glob)
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   181
  [255]
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   182
  $ svn revert -q s/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   183
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   184
this commit fails because of externals changes
10273
e898bc7810ad subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents: 10267
diff changeset
   185
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   186
  $ echo zzz > s/externals/other
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15282
diff changeset
   187
  $ hg ci --subrepos -m 'amend externals from hg'
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   188
  committing subrepository s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   189
  abort: cannot commit svn externals
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12209
diff changeset
   190
  [255]
12209
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   191
  $ hg diff --subrepos -r 1:2 | grep -v diff
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   192
  --- a/.hgsubstate	Thu Jan 01 00:00:00 1970 +0000
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   193
  +++ b/.hgsubstate	Thu Jan 01 00:00:00 1970 +0000
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   194
  @@ -1,2 +1,2 @@
12209
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   195
  -2 s
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   196
  +3 s
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   197
   2 subdir/s
12209
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   198
  --- a/a	Thu Jan 01 00:00:00 1970 +0000
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   199
  +++ b/a	Thu Jan 01 00:00:00 1970 +0000
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   200
  @@ -1,1 +1,2 @@
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   201
   a
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   202
  +a
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   203
  $ svn revert -q s/externals/other
10273
e898bc7810ad subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents: 10267
diff changeset
   204
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   205
this commit fails because of externals meta changes
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   206
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   207
  $ svn propset svn:mime-type 'text/html' s/externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   208
  property 'svn:mime-type' set on 's/externals/other'
15321
e174353e8cda subrepos: abort commit by default if a subrepo is dirty (BC)
Martin Geisler <mg@lazybytes.net>
parents: 15282
diff changeset
   209
  $ hg ci --subrepos -m 'amend externals from hg'
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   210
  committing subrepository s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   211
  abort: cannot commit svn externals
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12209
diff changeset
   212
  [255]
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   213
  $ svn revert -q s/externals/other
10273
e898bc7810ad subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents: 10267
diff changeset
   214
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   215
clone
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
   216
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   217
  $ cd ..
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   218
  $ hg clone t tc | fix_path
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   219
  updating to branch default
13907
a0ed0d0dd713 subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents: 13559
diff changeset
   220
  A    tc/s/alpha
a0ed0d0dd713 subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents: 13559
diff changeset
   221
   U   tc/s
a0ed0d0dd713 subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents: 13559
diff changeset
   222
  
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   223
  Fetching external item into 'tc/s/externals'* (glob)
13907
a0ed0d0dd713 subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents: 13559
diff changeset
   224
  A    tc/s/externals/other
a0ed0d0dd713 subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents: 13559
diff changeset
   225
  Checked out external at revision 1.
a0ed0d0dd713 subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents: 13559
diff changeset
   226
  
a0ed0d0dd713 subrepo: fix up svn test output
Matt Mackall <mpm@selenic.com>
parents: 13559
diff changeset
   227
  Checked out revision 3.
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   228
  A    tc/subdir/s/alpha
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   229
   U   tc/subdir/s
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   230
  
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   231
  Fetching external item into 'tc/subdir/s/externals'* (glob)
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   232
  A    tc/subdir/s/externals/other
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   233
  Checked out external at revision 1.
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   234
  
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   235
  Checked out revision 2.
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   236
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   237
  $ cd tc
10954
33119d0252c1 subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents: 10791
diff changeset
   238
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   239
debugsub in clone
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   240
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   241
  $ hg debugsub
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   242
  path s
12668
89e35377dbe8 test-subrepo-svn.t: ignore that subversion %-encodes $TESTTMP
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
   243
   source   file://*/svn-repo/src (glob)
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   244
   revision 3
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   245
  path subdir/s
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   246
   source   file://*/svn-repo/src (glob)
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   247
   revision 2
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   248
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   249
verify subrepo is contained within the repo directory
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   250
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   251
  $ python -c "import os.path; print os.path.exists('s')"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   252
  True
12930
9bb180abc4d0 subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 12798
diff changeset
   253
9bb180abc4d0 subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 12798
diff changeset
   254
update to nullrev (must delete the subrepo)
9bb180abc4d0 subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 12798
diff changeset
   255
9bb180abc4d0 subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 12798
diff changeset
   256
  $ hg up null
9bb180abc4d0 subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 12798
diff changeset
   257
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
13015
82ca0c43bc44 subrepo: prune empty directories when removing svn subrepo
Patrick Mezard <pmezard@gmail.com>
parents: 12930
diff changeset
   258
  $ ls
13322
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   259
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   260
Check hg update --clean
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   261
  $ cd $TESTTMP/sub/t
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   262
  $ cd s
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   263
  $ echo c0 > alpha
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   264
  $ echo c1 > f1
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   265
  $ echo c1 > f2
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   266
  $ svn add f1 -q
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   267
  $ svn status | sort
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   268
  
13410
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13332
diff changeset
   269
  ? *    a (glob)
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13332
diff changeset
   270
  ? *    f2 (glob)
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   271
  A *    f1 (glob)
13410
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13332
diff changeset
   272
  M *    alpha (glob)
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   273
  Performing status on external item at 'externals'* (glob)
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   274
  X *    externals (glob)
13332
927e3940bfc3 subrepo: fix update -C with svn subrepos when cwd != repo.root
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   275
  $ cd ../..
927e3940bfc3 subrepo: fix update -C with svn subrepos when cwd != repo.root
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   276
  $ hg -R t update -C
13322
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   277
  
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   278
  Fetching external item into 't/s/externals'* (glob)
13322
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   279
  Checked out external at revision 1.
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   280
  
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   281
  Checked out revision 3.
c19b9282d3a7 subrepo: make update -C clean the working directory for svn subrepos
Erik Zielke <ez@aragost.com>
parents: 13287
diff changeset
   282
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13332
927e3940bfc3 subrepo: fix update -C with svn subrepos when cwd != repo.root
Patrick Mezard <pmezard@gmail.com>
parents: 13322
diff changeset
   283
  $ cd t/s
16526
f2cc0ffb09de test-subrepo-svn: fix non-determinism
Patrick Mezard <patrick@mezard.eu>
parents: 16451
diff changeset
   284
  $ svn status | sort
f2cc0ffb09de test-subrepo-svn: fix non-determinism
Patrick Mezard <patrick@mezard.eu>
parents: 16451
diff changeset
   285
  
13410
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13332
diff changeset
   286
  ? *    a (glob)
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13332
diff changeset
   287
  ? *    f1 (glob)
1f2b2c33d386 tests: fixes for svn 1.4.2
Matt Mackall <mpm@selenic.com>
parents: 13332
diff changeset
   288
  ? *    f2 (glob)
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   289
  Performing status on external item at 'externals'* (glob)
16526
f2cc0ffb09de test-subrepo-svn: fix non-determinism
Patrick Mezard <patrick@mezard.eu>
parents: 16451
diff changeset
   290
  X *    externals (glob)
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   291
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   292
Sticky subrepositories, no changes
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   293
  $ cd $TESTTMP/sub/t
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   294
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   295
  2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   296
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   297
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   298
  3
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   299
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   300
  $ hg update 1
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   301
  U    *s/alpha (glob)
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   302
  
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   303
  Fetching external item into '*s/externals'* (glob)
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   304
  Checked out external at revision 1.
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   305
  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   306
  Checked out revision 2.
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   307
  2 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: 13410
diff changeset
   308
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   309
  1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   310
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   311
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   312
  2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   313
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   314
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   315
Sticky subrepositorys, file changes
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   316
  $ touch s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   317
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   318
  $ svn add f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   319
  A         f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   320
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   321
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   322
  1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   323
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   324
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   325
  2M
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   326
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   327
  $ hg update tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   328
   subrepository sources for s differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   329
  use (l)ocal source (2) or (r)emote source (3)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   330
   l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   331
  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: 13410
diff changeset
   332
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   333
  2+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   334
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   335
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   336
  2M
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   337
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   338
  $ hg update --clean tip
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   339
  U    *s/alpha (glob)
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   340
  
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   341
  Fetching external item into '*s/externals'* (glob)
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   342
  Checked out external at revision 1.
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   343
  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   344
  Checked out revision 3.
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   345
  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: 13410
diff changeset
   346
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   347
Sticky subrepository, revision updates
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   348
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   349
  2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   350
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   351
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   352
  3
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   353
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   354
  $ cd s
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   355
  $ svn update -qr 1
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   356
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   357
  $ hg update 1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   358
   subrepository sources for s differ (in checked out version)
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   359
  use (l)ocal source (1) or (r)emote source (2)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   360
   l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   361
  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: 13410
diff changeset
   362
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   363
  1+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   364
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   365
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   366
  1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   367
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   368
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   369
Sticky subrepository, file changes and revision updates
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   370
  $ touch s/f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   371
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   372
  $ svn add f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   373
  A         f1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   374
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   375
  1M
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   376
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   377
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   378
  1+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   379
  $ hg update tip
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   380
   subrepository sources for s differ
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   381
  use (l)ocal source (1) or (r)emote source (3)?
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   382
   l
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   383
  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: 13410
diff changeset
   384
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   385
  2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   386
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   387
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   388
  1M
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   389
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   390
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   391
Sticky repository, update --clean
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   392
  $ hg update --clean tip | grep -v s/externals/other
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   393
  U    *s/alpha (glob)
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   394
   U   *s (glob)
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   395
  
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   396
  Fetching external item into '*s/externals'* (glob)
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   397
  Checked out external at revision 1.
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   398
  
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   399
  Checked out revision 3.
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   400
  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: 13410
diff changeset
   401
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   402
  2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   403
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   404
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   405
  3
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   406
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   407
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   408
Test subrepo already at intended revision:
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   409
  $ cd s
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   410
  $ svn update -qr 2
13417
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   411
  $ cd ..
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   412
  $ hg update 1
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   413
  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: 13410
diff changeset
   414
  $ hg id -n
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   415
  1+
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   416
  $ cd s
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   417
  $ svnversion
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   418
  2
0748e18be470 subrepos: prompt on conflicts on update with dirty subrepos
Erik Zielke <ez@aragost.com>
parents: 13410
diff changeset
   419
  $ cd ..
14050
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   420
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   421
Test case where subversion would fail to update the subrepo because there
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   422
are unknown directories being replaced by tracked ones (happens with rebase).
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   423
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   424
  $ cd $WCROOT/src
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   425
  $ mkdir dir
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   426
  $ echo epsilon.py > dir/epsilon.py
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   427
  $ svn add dir
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   428
  A         dir
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   429
  A         dir/epsilon.py
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   430
  $ svn ci -m 'Add dir/epsilon.py'
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   431
  Adding         *dir (glob)
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   432
  Adding         *dir/epsilon.py (glob)
14050
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   433
  Transmitting file data .
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   434
  Committed revision 6.
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   435
  $ cd ../..
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   436
  $ hg init rebaserepo
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   437
  $ cd rebaserepo
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   438
  $ svn co -r5 --quiet "$SVNREPO"/src s
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   439
  $ echo "s =        [svn]       $SVNREPO/src" >> .hgsub
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   440
  $ hg add .hgsub
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   441
  $ hg ci -m addsub
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   442
  $ echo a > a
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   443
  $ hg ci -Am adda
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   444
  adding a
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   445
  $ hg up 0
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   446
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   447
  $ svn up -qr6 s
14050
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   448
  $ hg ci -m updatesub
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   449
  created new head
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   450
  $ echo pyc > s/dir/epsilon.pyc
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   451
  $ hg up 1
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   452
  D    *s/dir (glob)
14050
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   453
  
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   454
  Fetching external item into '*s/externals'* (glob)
14050
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   455
  Checked out external at revision 1.
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   456
  
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   457
  Checked out revision 5.
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   458
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   459
  $ if "$TESTDIR/hghave" -q svn15; then
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   460
  > hg up 2 >/dev/null 2>&1 || echo update failed
9e8a9d45945c subrepo: handle svn tracked/unknown directory collisions
Patrick Mezard <pmezard@gmail.com>
parents: 13559
diff changeset
   461
  > fi
14664
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   462
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   463
Modify one of the externals to point to a different path so we can
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   464
test having obstructions when switching branches on checkout:
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   465
  $ hg checkout tip
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   466
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   467
  $ echo "obstruct =        [svn]       $SVNREPO/externals" >> .hgsub
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   468
  $ svn co -r5 --quiet "$SVNREPO"/externals obstruct
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 15346
diff changeset
   469
  $ hg commit -m 'Start making obstructed working copy'
14664
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   470
  $ hg book other
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   471
  $ hg co -r 'p1(tip)'
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   472
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   473
  $ echo "obstruct =        [svn]       $SVNREPO/src" >> .hgsub
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   474
  $ svn co -r5 --quiet "$SVNREPO"/src obstruct
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   475
  $ hg commit -m 'Other branch which will be obstructed'
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   476
  created new head
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   477
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   478
Switching back to the head where we have another path mapped to the
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   479
same subrepo should work if the subrepo is clean.
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   480
  $ hg co other
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   481
  A    *obstruct/other (glob)
14664
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   482
  Checked out revision 1.
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   483
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   484
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   485
This is surprising, but is also correct based on the current code:
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   486
  $ echo "updating should (maybe) fail" > obstruct/other
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   487
  $ hg co tip
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   488
  abort: crosses branches (merge branches or use --clean to discard changes)
0ae98cd2a83f svn subrepos: work around checkout obstructions (issue2752)
Augie Fackler <durin42@gmail.com>
parents: 14052
diff changeset
   489
  [255]
14820
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   490
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   491
Point to a Subversion branch which has since been deleted and recreated
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   492
First, create that condition in the repository.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   493
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   494
  $ hg ci --subrepos -m cleanup | grep -v Updating
14820
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   495
  committing subrepository obstruct
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   496
  Sending        obstruct/other
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   497
  Transmitting file data .
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   498
  Committed revision 7.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   499
  At revision 7.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   500
  $ svn mkdir -m "baseline" $SVNREPO/trunk
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   501
  
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   502
  Committed revision 8.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   503
  $ svn copy -m "initial branch" $SVNREPO/trunk $SVNREPO/branch
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   504
  
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   505
  Committed revision 9.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   506
  $ svn co --quiet "$SVNREPO"/branch tempwc
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   507
  $ cd tempwc
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   508
  $ echo "something old" > somethingold
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   509
  $ svn add somethingold
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   510
  A         somethingold
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   511
  $ svn ci -m 'Something old'
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   512
  Adding         somethingold
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   513
  Transmitting file data .
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   514
  Committed revision 10.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   515
  $ svn rm -m "remove branch" $SVNREPO/branch
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   516
  
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   517
  Committed revision 11.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   518
  $ svn copy -m "recreate branch" $SVNREPO/trunk $SVNREPO/branch
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   519
  
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   520
  Committed revision 12.
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   521
  $ svn up -q
14820
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   522
  $ echo "something new" > somethingnew
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   523
  $ svn add somethingnew
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   524
  A         somethingnew
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   525
  $ svn ci -m 'Something new'
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   526
  Adding         somethingnew
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   527
  Transmitting file data .
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   528
  Committed revision 13.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   529
  $ cd ..
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   530
  $ rm -rf tempwc
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   531
  $ svn co "$SVNREPO/branch"@10 recreated
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   532
  A    recreated/somethingold
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   533
  Checked out revision 10.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   534
  $ echo "recreated =        [svn]       $SVNREPO/branch" >> .hgsub
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   535
  $ hg ci -m addsub
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   536
  $ cd recreated
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   537
  $ svn up -q
14820
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   538
  $ cd ..
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   539
  $ hg ci -m updatesub
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   540
  $ hg up -r-2
15607
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   541
  D    *recreated/somethingnew (glob)
fab28a577a38 test-svn-subrepo: fix reference output for svn 1.7
Patrick Mezard <pmezard@gmail.com>
parents: 15372
diff changeset
   542
  A    *recreated/somethingold (glob)
14820
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   543
  Checked out revision 10.
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   544
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
15282
d4addef0ec74 tests: don't use 'test -e'
Mads Kiilerich <mads@kiilerich.com>
parents: 14820
diff changeset
   545
  $ test -f recreated/somethingold
14820
7ef125fa9b35 subrepo: correct revision in svn checkout
Eli Carter <eli.carter@tektronix.com>
parents: 14664
diff changeset
   546
16450
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   547
Test archive
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   548
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   549
  $ hg archive -S ../archive-all --debug
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   550
  archiving: 0/2 files (0.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   551
  archiving: .hgsub 1/2 files (50.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   552
  archiving: .hgsubstate 2/2 files (100.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   553
  archiving (obstruct): 0/1 files (0.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   554
  archiving (obstruct): 1/1 files (100.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   555
  archiving (s): 0/2 files (0.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   556
  archiving (s): 1/2 files (50.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   557
  archiving (s): 2/2 files (100.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   558
  archiving (recreated): 0/1 files (0.00%)
c9c8c9053119 archive: make it work with svn subrepos (issue3308)
Patrick Mezard <patrick@mezard.eu>
parents: 15607
diff changeset
   559
  archiving (recreated): 1/1 files (100.00%)
16527
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16526
diff changeset
   560
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16526
diff changeset
   561
Test forgetting files, not implemented in svn subrepo, used to
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16526
diff changeset
   562
traceback
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16526
diff changeset
   563
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16526
diff changeset
   564
  $ hg forget 'notafile*'
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16526
diff changeset
   565
  notafile*: No such file or directory
17a1f7690b49 subrepo: fix default implementation of forget() (issue3404)
Patrick Mezard <patrick@mezard.eu>
parents: 16526
diff changeset
   566
  [1]
16554
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   567
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   568
Test a subrepo referencing a just moved svn path. Last commit rev will
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   569
be different from the revision, and the path will be different as
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   570
well.
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   571
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   572
  $ cd $WCROOT
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   573
  $ svn up > /dev/null
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   574
  $ mkdir trunk/subdir branches
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   575
  $ echo a > trunk/subdir/a
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   576
  $ svn add trunk/subdir branches
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   577
  A         trunk/subdir
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   578
  A         trunk/subdir/a
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   579
  A         branches
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   580
  $ svn ci -m addsubdir
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   581
  Adding         branches
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   582
  Adding         trunk/subdir
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   583
  Adding         trunk/subdir/a
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   584
  Transmitting file data .
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   585
  Committed revision 14.
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   586
  $ svn cp -m branchtrunk $SVNREPO/trunk $SVNREPO/branches/somebranch
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   587
  
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   588
  Committed revision 15.
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   589
  $ cd ..
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   590
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   591
  $ hg init repo2
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   592
  $ cd repo2
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   593
  $ svn co $SVNREPO/branches/somebranch/subdir
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   594
  A    subdir/a
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   595
  Checked out revision 15.
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   596
  $ echo "subdir = [svn] $SVNREPO/branches/somebranch/subdir" > .hgsub
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   597
  $ hg add .hgsub
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   598
  $ hg ci -m addsub
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   599
  $ hg up null
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   600
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   601
  $ hg up
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   602
  A    *subdir/a (glob)
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   603
  Checked out revision 15.
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   604
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
ae2664ee0223 subrepo/svn: fix checked out rev number retrieval (issue2968)
Patrick Mezard <patrick@mezard.eu>
parents: 16530
diff changeset
   605
  $ cd ..