tests/test-convert-svn-source.t
author Mads Kiilerich <mads@kiilerich.com>
Tue, 26 Jun 2012 03:35:22 +0200
changeset 17033 0413f68da85c
parent 16525 b12b65d2cbe4
child 17044 3dd6da761fff
permissions -rw-r--r--
tests: cleanup of svn url handling The subversion tests used different tricks to create properly encoded URLs, partly due to partial support for different ways of running the tests on windows. Now we only need/support one way of running the tests on windows. Windows URLs should look like 'file:///c:/foo%20bar' and on Unix platforms like 'file:///tmp/baz'. 'pwd' in the test framework will on Windows emit paths like 'c:/foo bar'. Explicit handling of backslashes in paths is thus no longer needed and is removed. Paths on windows do however need an extra '/' compared to other platforms. This change makes test-subrepo-svn.t pass on windows with msys. Other tests might need more work.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     1
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
     2
  $ "$TESTDIR/hghave" svn svn-bindings || exit 80
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     3
13519
43b3b761d9d1 tests: don't overwrite HGRCPATH
Martin Geisler <mg@aragost.com>
parents: 13494
diff changeset
     4
  $ cat >> $HGRCPATH <<EOF
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
     5
  > [extensions]
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
     6
  > convert = 
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
     7
  > graphlog =
13494
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
     8
  > [convert]
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
     9
  > svn.trunk = mytrunk
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    10
  > EOF
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    11
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    12
  $ svnadmin create svn-repo
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    13
  $ SVNREPOPATH=`pwd`/svn-repo
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    14
#if windows
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    15
  $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    16
#else
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    17
  $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    18
#endif
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    19
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    20
Now test that it works with trunk/tags layout, but no branches yet.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    21
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    22
Initial svn import
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    23
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    24
  $ mkdir projB
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    25
  $ cd projB
13494
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
    26
  $ mkdir mytrunk
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    27
  $ mkdir tags
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    28
  $ cd ..
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    29
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    30
  $ svn import -m "init projB" projB "$SVNREPOURL/proj%20B" | sort
16525
b12b65d2cbe4 test-convert-svn-source: fix non-determinism
Patrick Mezard <patrick@mezard.eu>
parents: 16466
diff changeset
    31
  
13494
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
    32
  Adding         projB/mytrunk
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    33
  Adding         projB/tags
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    34
  Committed revision 1.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    35
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    36
Update svn repository
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    37
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    38
  $ svn co "$SVNREPOURL/proj%20B/mytrunk" B
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    39
  Checked out revision 1.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    40
  $ cd B
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    41
  $ echo hello > 'letter .txt'
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    42
  $ svn add 'letter .txt'
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    43
  A         letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    44
  $ svn ci -m hello
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    45
  Adding         letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    46
  Transmitting file data .
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    47
  Committed revision 2.
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    48
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    49
  $ "$TESTDIR/svn-safe-append.py" world 'letter .txt'
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    50
  $ svn ci -m world
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    51
  Sending        letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    52
  Transmitting file data .
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    53
  Committed revision 3.
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    54
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    55
  $ svn copy -m "tag v0.1" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.1"
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    56
  
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    57
  Committed revision 4.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    58
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    59
  $ "$TESTDIR/svn-safe-append.py" 'nice day today!' 'letter .txt'
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    60
  $ svn ci -m "nice day"
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    61
  Sending        letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    62
  Transmitting file data .
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    63
  Committed revision 5.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    64
  $ cd ..
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    65
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    66
Convert to hg once
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    67
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    68
  $ hg convert "$SVNREPOURL/proj%20B" B-hg
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    69
  initializing destination B-hg repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    70
  scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    71
  sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    72
  converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    73
  3 init projB
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    74
  2 hello
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    75
  1 world
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    76
  0 nice day
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    77
  updating tags
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    78
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    79
Update svn repository again
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    80
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    81
  $ cd B
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    82
  $ "$TESTDIR/svn-safe-append.py" "see second letter" 'letter .txt'
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    83
  $ echo "nice to meet you" > letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    84
  $ svn add letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    85
  A         letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    86
  $ svn ci -m "second letter"
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    87
  Sending        letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    88
  Adding         letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    89
  Transmitting file data ..
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    90
  Committed revision 6.
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    91
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    92
  $ svn copy -m "tag v0.2" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.2"
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    93
  
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    94
  Committed revision 7.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    95
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    96
  $ "$TESTDIR/svn-safe-append.py" "blah-blah-blah" letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    97
  $ svn ci -m "work in progress"
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    98
  Sending        letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    99
  Transmitting file data .
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   100
  Committed revision 8.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   101
  $ cd ..
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
   102
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   103
  $ hg convert -s svn "$SVNREPOURL/proj%20B/non-existent-path" dest
14152
00121103546a convert: handle invalid subversion source paths
Mads Kiilerich <mads@kiilerich.com>
parents: 13519
diff changeset
   104
  initializing destination dest repository
00121103546a convert: handle invalid subversion source paths
Mads Kiilerich <mads@kiilerich.com>
parents: 13519
diff changeset
   105
  abort: no revision found in module /proj B/non-existent-path
00121103546a convert: handle invalid subversion source paths
Mads Kiilerich <mads@kiilerich.com>
parents: 13519
diff changeset
   106
  [255]
00121103546a convert: handle invalid subversion source paths
Mads Kiilerich <mads@kiilerich.com>
parents: 13519
diff changeset
   107
6401
635c57cf0de8 test-convert-svn-source: remove redundant tests
Patrick Mezard <pmezard@gmail.com>
parents: 5954
diff changeset
   108
########################################
635c57cf0de8 test-convert-svn-source: remove redundant tests
Patrick Mezard <pmezard@gmail.com>
parents: 5954
diff changeset
   109
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   110
Test incremental conversion
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   111
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   112
  $ hg convert "$SVNREPOURL/proj%20B" B-hg
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   113
  scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   114
  sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   115
  converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   116
  1 second letter
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   117
  0 work in progress
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   118
  updating tags
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
   119
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   120
  $ cd B-hg
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   121
  $ hg glog --template '{rev} {desc|firstline} files: {files}\n'
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   122
  o  7 update tags files: .hgtags
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   123
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   124
  o  6 work in progress files: letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   125
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   126
  o  5 second letter files: letter .txt letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   127
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   128
  o  4 update tags files: .hgtags
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   129
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   130
  o  3 nice day files: letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   131
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   132
  o  2 world files: letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   133
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   134
  o  1 hello files: letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   135
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   136
  o  0 init projB files:
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   137
  
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   138
  $ hg tags -q
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   139
  tip
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   140
  v0.2
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   141
  v0.1
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   142
  $ cd ..
6401
635c57cf0de8 test-convert-svn-source: remove redundant tests
Patrick Mezard <pmezard@gmail.com>
parents: 5954
diff changeset
   143
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   144
Test filemap
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   145
  $ echo 'include letter2.txt' > filemap
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   146
  $ hg convert --filemap filemap "$SVNREPOURL/proj%20B/mytrunk" fmap
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   147
  initializing destination fmap repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   148
  scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   149
  sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   150
  converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   151
  5 init projB
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   152
  4 hello
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   153
  3 world
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   154
  2 nice day
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   155
  1 second letter
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   156
  0 work in progress
13494
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
   157
  $ hg -R fmap branch -q
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
   158
  default
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   159
  $ hg glog -R fmap --template '{rev} {desc|firstline} files: {files}\n'
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   160
  o  1 work in progress files: letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   161
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   162
  o  0 second letter files: letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   163
  
6401
635c57cf0de8 test-convert-svn-source: remove redundant tests
Patrick Mezard <pmezard@gmail.com>
parents: 5954
diff changeset
   164
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   165
Test stop revision
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   166
  $ hg convert --rev 1 "$SVNREPOURL/proj%20B/mytrunk" stoprev
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   167
  initializing destination stoprev repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   168
  scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   169
  sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   170
  converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   171
  0 init projB
13494
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
   172
  $ hg -R stoprev branch -q
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
   173
  default
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   174
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   175
Check convert_revision extra-records.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   176
This is also the only place testing more than one extra field in a revision.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   177
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   178
  $ cd stoprev
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   179
  $ hg tip --debug | grep extra
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   180
  extra:       branch=default
13494
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
   181
  extra:       convert_revision=svn:........-....-....-....-............/proj B/mytrunk@1 (re)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   182
  $ cd ..
16466
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   183
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   184
Test converting empty heads (issue3347)
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   185
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   186
  $ svnadmin create svn-empty
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   187
  $ svnadmin load -q svn-empty < "$TESTDIR/svn/empty.svndump"
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   188
  $ hg --config convert.svn.trunk= convert svn-empty
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   189
  assuming destination svn-empty-hg
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   190
  initializing destination svn-empty-hg repository
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   191
  scanning source...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   192
  sorting...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   193
  converting...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   194
  1 init projA
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   195
  0 adddir
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   196
  $ hg --config convert.svn.trunk= convert "$SVNREPOURL/../svn-empty/trunk"
16466
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   197
  assuming destination trunk-hg
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   198
  initializing destination trunk-hg repository
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   199
  scanning source...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   200
  sorting...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   201
  converting...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   202
  1 init projA
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   203
  0 adddir