tests/test-subrepo-svn.t
author Matt Mackall <mpm@selenic.com>
Thu, 16 Sep 2010 17:51:32 -0500
changeset 12316 4134686b83e1
parent 12209 affec9fb56ef
child 12365 22f3353bcc36
permissions -rw-r--r--
tests: add exit codes to unified tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
     1
  $ "$TESTDIR/hghave" svn || 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
  $ escapedwd=`pwd | fix_path`
10198
c2168d170f05 test-subrepo-svn: normalize OS specific path separator
Patrick Mezard <pmezard@gmail.com>
parents: 10196
diff changeset
     9
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    10
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
    11
don't. Handle that.
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    12
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    13
  $ expr "$escapedwd" : "\/" > /dev/null
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    14
  $ if [ $? -ne 0 ]; then
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    15
  >     escapedwd="/$escapedwd"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    16
  > fi
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    17
  $ 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
    18
  $ filterpath="s|$escapedwd|/root|"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    19
  $ filteroutofdate='s/ in transaction.*/ is out of date/;s/Out of date: /File /'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    20
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    21
create subversion repo
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    22
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    23
  $ SVNREPO="file://$escapedwd/svn-repo"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    24
  $ WCROOT="`pwd`/svn-wc"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    25
  $ svnadmin create svn-repo
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    26
  $ svn co "$SVNREPO" svn-wc
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    27
  Checked out revision 0.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    28
  $ cd svn-wc
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    29
  $ mkdir src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    30
  $ echo alpha > src/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    31
  $ svn add src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    32
  A         src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    33
  A         src/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    34
  $ mkdir externals
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    35
  $ echo other > externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    36
  $ svn add externals
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    37
  A         externals
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    38
  A         externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    39
  $ svn ci -m 'Add alpha'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    40
  Adding         externals
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    41
  Adding         externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    42
  Adding         src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    43
  Adding         src/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    44
  Transmitting file data ..
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    45
  Committed revision 1.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    46
  $ svn up
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    47
  At revision 1.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    48
  $ echo "externals -r1 $SVNREPO/externals" > extdef
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    49
  $ svn propset -F extdef svn:externals src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    50
  property 'svn:externals' set on 'src'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    51
  $ svn ci -m 'Setting externals'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    52
  Sending        src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    53
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    54
  Committed revision 2.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    55
  $ cd ..
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    56
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    57
create hg repo
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
  $ mkdir sub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    60
  $ cd sub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    61
  $ hg init t
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    62
  $ cd t
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    63
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    64
first revision, no sub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    65
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    66
  $ echo a > a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    67
  $ hg ci -Am0
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    68
  adding a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    69
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    70
add first svn sub with leading whitespaces
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    71
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    72
  $ echo "s = [svn]       $SVNREPO/src" >> .hgsub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    73
  $ svn co --quiet "$SVNREPO"/src s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    74
  $ hg add .hgsub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    75
  $ hg ci -m1
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    76
  committing subrepository s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    77
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    78
debugsub
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    79
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    80
  $ hg debugsub | sed "$filterpath"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    81
  path s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    82
   source   file:///root/svn-repo/src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    83
   revision 2
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    84
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    85
change file in svn and hg, commit
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    86
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    87
  $ echo a >> a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    88
  $ echo alpha >> s/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    89
  $ hg commit -m 'Message!' \
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    90
  >     | sed 's:Sending.*s/alpha:Sending        s/alpha:g'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    91
  committing subrepository s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    92
  Sending        s/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    93
  Transmitting file data .
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    94
  Committed revision 3.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    95
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    96
  Fetching external item into '.*/s/externals'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    97
  External at revision 1.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    98
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
    99
  At revision 3.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   100
  $ hg debugsub | sed "$filterpath"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   101
  path s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   102
   source   file:///root/svn-repo/src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   103
   revision 3
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   104
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   105
  $ echo a > s/a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   106
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   107
should be empty despite change to s/a
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   108
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   109
  $ hg st
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   110
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   111
add a commit from svn
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
   112
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   113
  $ cd "$WCROOT"/src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   114
  $ svn up
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   115
  U    alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   116
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   117
  Fetching external item into 'externals'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   118
  A    externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   119
  Updated external to revision 1.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   120
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   121
  Updated to revision 3.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   122
  $ echo xyz >> alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   123
  $ svn propset svn:mime-type 'text/xml' alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   124
  property 'svn:mime-type' set on 'alpha'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   125
  $ svn ci -m 'amend a from svn'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   126
  Sending        src/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   127
  Transmitting file data .
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   128
  Committed revision 4.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   129
  $ cd ../../sub/t
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
   130
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   131
this commit from hg will fail
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
   132
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   133
  $ echo zzz >> s/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   134
  $ hg ci -m 'amend alpha from hg' 2>&1 | sed "$filteroutofdate"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   135
  committing subrepository s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   136
  abort: svn: Commit failed (details follow):
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   137
  svn: File '/src/alpha' is out of date
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   138
  $ svn revert -q s/alpha
10273
e898bc7810ad subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents: 10267
diff changeset
   139
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   140
this commit fails because of meta changes
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   141
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   142
  $ svn propset svn:mime-type 'text/html' s/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   143
  property 'svn:mime-type' set on 's/alpha'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   144
  $ hg ci -m 'amend alpha from hg' 2>&1 | sed "$filteroutofdate"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   145
  committing subrepository s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   146
  abort: svn: Commit failed (details follow):
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   147
  svn: File '/src/alpha' is out of date
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   148
  $ svn revert -q s/alpha
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
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
   151
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   152
  $ echo zzz > s/externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   153
  $ hg ci -m 'amend externals from hg'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   154
  committing subrepository s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   155
  abort: cannot commit svn externals
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12209
diff changeset
   156
  [255]
12209
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   157
  $ 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
   158
  --- 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
   159
  +++ b/.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
   160
  @@ -1,1 +1,1 @@
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   161
  -2 s
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   162
  +3 s
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   163
  --- 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
   164
  +++ 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
   165
  @@ -1,1 +1,2 @@
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   166
   a
affec9fb56ef subrepos: handle diff nodeids in subrepos, not before
Patrick Mezard <pmezard@gmail.com>
parents: 11916
diff changeset
   167
  +a
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   168
  $ 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
   169
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   170
this commit fails because of externals meta changes
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   171
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   172
  $ 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
   173
  property 'svn:mime-type' set on 's/externals/other'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   174
  $ hg ci -m 'amend externals from hg'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   175
  committing subrepository s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   176
  abort: cannot commit svn externals
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12209
diff changeset
   177
  [255]
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   178
  $ 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
   179
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   180
clone
10178
cd477be6f2fc subrepo: Subversion support
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
   181
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   182
  $ cd ..
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   183
  $ hg clone t tc | fix_path
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   184
  updating to branch default
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   185
  A    tc/s/alpha
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   186
   U   tc/s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   187
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   188
  Fetching external item into 'tc/s/externals'
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   189
  A    tc/s/externals/other
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   190
  Checked out external at revision 1.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   191
  
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   192
  Checked out revision 3.
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   193
  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
   194
  $ cd tc
10954
33119d0252c1 subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents: 10791
diff changeset
   195
11916
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   196
debugsub in clone
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   197
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   198
  $ hg debugsub | sed "$filterpath"
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   199
  path s
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   200
   source   file:///root/svn-repo/src
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   201
   revision 3
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   202
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   203
verify subrepo is contained within the repo directory
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   204
d1ea16ca6520 tests: unify test-subrepo-svn
Martin Geisler <mg@lazybytes.net>
parents: 11142
diff changeset
   205
  $ 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
   206
  True