tests/test-convert-svn-source.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 06 Apr 2021 03:23:46 +0200
changeset 49206 b5858e02e3ba
parent 41496 e095a9688a31
child 50725 7e5be4a7cda7
permissions -rw-r--r--
manifest: improve error message in case for tree manifest In the case where tree manifest is not enabled but we still receive an sub directory information for the manifest. The error now inform which sub-directory was passed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 20420
diff changeset
     1
#require svn svn-bindings
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     2
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
     3
  $ filter_svn_output () {
28533
dfd5a6830ea7 tests: make tests for convert with svn portable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28469
diff changeset
     4
  >     egrep -v 'Committing|Updating|(^$)' | sed -e 's/done$//' || true
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
     5
  > }
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
     6
13519
43b3b761d9d1 tests: don't overwrite HGRCPATH
Martin Geisler <mg@aragost.com>
parents: 13494
diff changeset
     7
  $ cat >> $HGRCPATH <<EOF
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
     8
  > [extensions]
17347
2da47de36b6f check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents: 17044
diff changeset
     9
  > convert =
13494
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
    10
  > [convert]
3178aca36b0f convert.svn: branch name which equals trunk means `default' branch (issue2653)
Pavel Boldin <boldin.pavel@gmail.com>
parents: 12377
diff changeset
    11
  > svn.trunk = mytrunk
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    12
  > EOF
5255
37c610c41ed6 Test svn repository conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    13
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    14
  $ svnadmin create svn-repo
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
    15
  $ SVNREPOPATH=`pwd`/svn-repo
41496
e095a9688a31 tests: quote $PYTHON for py3 support on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41480
diff changeset
    16
  $ SVNREPOURL="`"$PYTHON" $TESTDIR/svnurlof.py \"$SVNREPOPATH\"`"
19122
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
    17
  $ INVALIDREVISIONID=svn:x2147622-4a9f-4db4-a8d3-13562ff547b2/proj%20B/mytrunk@1
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
    18
  $ VALIDREVISIONID=svn:a2147622-4a9f-4db4-a8d3-13562ff547b2/proj%20B/mytrunk/mytrunk@1
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
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    30
  $ svn import -m "init projB" projB "$SVNREPOURL/proj%20B" | filter_svn_output | sort
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 28533
diff changeset
    31
  Adding         projB/mytrunk
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 28533
diff changeset
    32
  Adding         projB/tags
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    33
  Committed revision 1.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    34
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    35
Update svn repository
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    36
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    37
  $ svn co "$SVNREPOURL/proj%20B/mytrunk" B | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    38
  Checked out revision 1.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    39
  $ cd B
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    40
  $ echo hello > 'letter .txt'
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    41
  $ svn add 'letter .txt' | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    42
  A         letter .txt
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    43
  $ svn ci -m hello | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    44
  Adding         letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    45
  Transmitting file data .
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    46
  Committed revision 2.
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    47
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 23583
diff changeset
    48
  $ svn-safe-append.py world 'letter .txt'
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    49
  $ svn ci -m world | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    50
  Sending        letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    51
  Transmitting file data .
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    52
  Committed revision 3.
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    53
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    54
  $ svn copy -m "tag v0.1" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.1" | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    55
  Committed revision 4.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    56
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 23583
diff changeset
    57
  $ svn-safe-append.py 'nice day today!' 'letter .txt'
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    58
  $ svn ci -m "nice day" | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    59
  Sending        letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    60
  Transmitting file data .
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    61
  Committed revision 5.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    62
  $ cd ..
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    63
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    64
Convert to hg once and also test localtimezone option
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    65
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    66
NOTE: This doesn't check all time zones -- it merely determines that
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    67
the configuration option is taking effect.
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    68
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    69
An arbitrary (U.S.) time zone is used here.  TZ=US/Hawaii is selected
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    70
since it does not use DST (unlike other U.S. time zones) and is always
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    71
a fixed difference from UTC.
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    72
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
    73
  $ TZ=US/Hawaii hg convert --config convert.localtimezone=True "$SVNREPOURL/proj%20B" B-hg
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    74
  initializing destination B-hg repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    75
  scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    76
  sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    77
  converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    78
  3 init projB
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    79
  2 hello
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    80
  1 world
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    81
  0 nice day
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    82
  updating tags
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    83
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    84
Update svn repository again
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    85
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    86
  $ cd B
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 23583
diff changeset
    87
  $ svn-safe-append.py "see second letter" 'letter .txt'
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    88
  $ echo "nice to meet you" > letter2.txt
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    89
  $ svn add letter2.txt | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    90
  A         letter2.txt
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    91
  $ svn ci -m "second letter" | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    92
  Sending        letter .txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    93
  Adding         letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    94
  Transmitting file data ..
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    95
  Committed revision 6.
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
    96
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
    97
  $ svn copy -m "tag v0.2" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.2" | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    98
  Committed revision 7.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
    99
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 23583
diff changeset
   100
  $ svn-safe-append.py "blah-blah-blah" letter2.txt
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
   101
  $ svn ci -m "work in progress" | filter_svn_output
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   102
  Sending        letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   103
  Transmitting file data .
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   104
  Committed revision 8.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   105
  $ cd ..
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
   106
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   107
  $ 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
   108
  initializing destination dest repository
00121103546a convert: handle invalid subversion source paths
Mads Kiilerich <mads@kiilerich.com>
parents: 13519
diff changeset
   109
  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
   110
  [255]
00121103546a convert: handle invalid subversion source paths
Mads Kiilerich <mads@kiilerich.com>
parents: 13519
diff changeset
   111
6401
635c57cf0de8 test-convert-svn-source: remove redundant tests
Patrick Mezard <pmezard@gmail.com>
parents: 5954
diff changeset
   112
########################################
635c57cf0de8 test-convert-svn-source: remove redundant tests
Patrick Mezard <pmezard@gmail.com>
parents: 5954
diff changeset
   113
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   114
Test incremental conversion
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   115
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   116
  $ TZ=US/Hawaii hg convert --config convert.localtimezone=True "$SVNREPOURL/proj%20B" B-hg
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   117
  scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   118
  sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   119
  converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   120
  1 second letter
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   121
  0 work in progress
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   122
  updating tags
5854
8b95f598097c convert: separate trunk detection from branch layout detection
Edouard Gomez <ed.gomez@free.fr>
parents: 5804
diff changeset
   123
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   124
  $ cd B-hg
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19122
diff changeset
   125
  $ hg log -G --template '{rev} {desc|firstline} date: {date|date} files: {files}\n'
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   126
  o  7 update tags date: * +0000 files: .hgtags (glob)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   127
  |
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   128
  o  6 work in progress date: * -1000 files: letter2.txt (glob)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   129
  |
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   130
  o  5 second letter date: * -1000 files: letter .txt letter2.txt (glob)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   131
  |
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   132
  o  4 update tags date: * +0000 files: .hgtags (glob)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   133
  |
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   134
  o  3 nice day date: * -1000 files: letter .txt (glob)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   135
  |
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   136
  o  2 world date: * -1000 files: letter .txt (glob)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   137
  |
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   138
  o  1 hello date: * -1000 files: letter .txt (glob)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   139
  |
17974
337d728e644f convert: add config option to use the local time zone
Julian Cowley <julian@lava.net>
parents: 17347
diff changeset
   140
  o  0 init projB date: * -1000 files: (glob)
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   141
  
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   142
  $ hg tags -q
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   143
  tip
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   144
  v0.2
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   145
  v0.1
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   146
  $ cd ..
6401
635c57cf0de8 test-convert-svn-source: remove redundant tests
Patrick Mezard <pmezard@gmail.com>
parents: 5954
diff changeset
   147
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   148
Test filemap
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   149
  $ echo 'include letter2.txt' > filemap
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   150
  $ 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
   151
  initializing destination fmap repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   152
  scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   153
  sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   154
  converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   155
  5 init projB
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   156
  4 hello
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   157
  3 world
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   158
  2 nice day
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   159
  1 second letter
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   160
  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
   161
  $ 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
   162
  default
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19122
diff changeset
   163
  $ hg log -G -R fmap --template '{rev} {desc|firstline} files: {files}\n'
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   164
  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
   165
  |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   166
  o  0 second letter files: letter2.txt
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   167
  
22300
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   168
Convert with --full adds and removes files that didn't change
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   169
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   170
  $ cd B
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   171
  $ echo >> "letter .txt"
28469
b65481675466 tests: stabilize svn output
timeless <timeless@mozdev.org>
parents: 25472
diff changeset
   172
  $ svn ci -m 'nothing' | filter_svn_output
22300
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   173
  Sending        letter .txt
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   174
  Transmitting file data .
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   175
  Committed revision 9.
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   176
  $ cd ..
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   177
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   178
  $ echo 'rename letter2.txt letter3.txt' > filemap
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   179
  $ hg convert --filemap filemap --full "$SVNREPOURL/proj%20B/mytrunk" fmap
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   180
  scanning source...
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   181
  sorting...
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   182
  converting...
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   183
  0 nothing
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   184
  $ hg -R fmap st --change tip
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   185
  A letter .txt
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   186
  A letter3.txt
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   187
  R letter2.txt
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 22046
diff changeset
   188
19122
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   189
test invalid splicemap1
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   190
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   191
  $ cat > splicemap <<EOF
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   192
  > $INVALIDREVISIONID $VALIDREVISIONID
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   193
  > EOF
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   194
  $ hg convert --splicemap splicemap "$SVNREPOURL/proj%20B/mytrunk" smap
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   195
  initializing destination smap repository
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   196
  abort: splicemap entry svn:x2147622-4a9f-4db4-a8d3-13562ff547b2/proj%20B/mytrunk@1 is not a valid revision identifier
83973dc1bfe9 splicemap: improve error handling when source is subversion (issue2084)
Ben Goswami <bengoswami@fb.com>
parents: 17974
diff changeset
   197
  [255]
6401
635c57cf0de8 test-convert-svn-source: remove redundant tests
Patrick Mezard <pmezard@gmail.com>
parents: 5954
diff changeset
   198
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   199
Test stop revision
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   200
  $ 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
   201
  initializing destination stoprev repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   202
  scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   203
  sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   204
  converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   205
  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
   206
  $ 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
   207
  default
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   208
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   209
Check convert_revision extra-records.
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   210
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
   211
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   212
  $ cd stoprev
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   213
  $ hg tip --debug | grep extra
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10775
diff changeset
   214
  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
   215
  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
   216
  $ cd ..
16466
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   217
20420
62153c5d1ce2 convert: secret config option for disabling debugsvnlog
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   218
Test converting empty heads (issue3347).
62153c5d1ce2 convert: secret config option for disabling debugsvnlog
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   219
Also tests getting logs directly without debugsvnlog.
16466
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   220
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   221
  $ svnadmin create svn-empty
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   222
  $ svnadmin load -q svn-empty < "$TESTDIR/svn/empty.svndump"
20420
62153c5d1ce2 convert: secret config option for disabling debugsvnlog
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   223
  $ hg --config convert.svn.trunk= --config convert.svn.debugsvnlog=0 convert svn-empty
16466
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   224
  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
   225
  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
   226
  scanning source...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   227
  sorting...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   228
  converting...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   229
  1 init projA
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   230
  0 adddir
17033
0413f68da85c tests: cleanup of svn url handling
Mads Kiilerich <mads@kiilerich.com>
parents: 16525
diff changeset
   231
  $ 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
   232
  assuming destination trunk-hg
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   233
  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
   234
  scanning source...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   235
  sorting...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   236
  converting...
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   237
  1 init projA
c53a49c345e1 convert/svn: do not try converting empty head revisions (issue3347)
Patrick Mezard <patrick@mezard.eu>
parents: 14152
diff changeset
   238
  0 adddir
23583
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   239
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   240
Test that a too-new repository format is properly rejected:
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   241
  $ mv svn-empty/format format
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   242
  $ echo 999 > svn-empty/format
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   243
It's important that this command explicitly specify svn, otherwise it
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   244
can have surprising side effects (like falling back to a perforce
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   245
depot that can be seen from the test environment and slurping from that.)
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   246
  $ hg convert --source-type svn svn-empty this-will-fail
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   247
  initializing destination this-will-fail repository
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   248
  file:/*/$TESTTMP/svn-empty does not look like a Subversion repository to libsvn version 1.*.* (glob)
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   249
  abort: svn-empty: missing or unsupported repository
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   250
  [255]
a8edcb9c1199 convert: on svn failure, note libsvn version (issue4043)
Augie Fackler <raf@durin42.com>
parents: 22947
diff changeset
   251
  $ mv format svn-empty/format
35676
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   252
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   253
enable svn subrepos
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   254
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   255
  $ cat >> $HGRCPATH <<EOF
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   256
  > [subrepos]
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   257
  > svn:allowed = true
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   258
  > EOF
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   259
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   260
try converting when we have an svn subrepo and a merge in hg superrepo (issue5657)
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   261
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   262
  $ cd "$TESTTMP"
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   263
  $ hg init withmerge
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   264
  $ cd withmerge
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   265
  $ echo "subrepo = [svn]$SVNREPOURL" >.hgsub
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   266
  $ hg add .hgsub
35693
1880a0bdfc5e test-convert-svn-move: sort svn checkout output
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35676
diff changeset
   267
  $ svn checkout "$SVNREPOURL" subrepo | sort
35676
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   268
  A    subrepo/proj B
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   269
  A    subrepo/proj B/mytrunk
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   270
  A    subrepo/proj B/mytrunk/letter .txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   271
  A    subrepo/proj B/mytrunk/letter2.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   272
  A    subrepo/proj B/tags
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   273
  A    subrepo/proj B/tags/v0.1
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   274
  A    subrepo/proj B/tags/v0.1/letter .txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   275
  A    subrepo/proj B/tags/v0.2
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   276
  A    subrepo/proj B/tags/v0.2/letter .txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   277
  A    subrepo/proj B/tags/v0.2/letter2.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   278
  Checked out revision 9.
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   279
  $ hg ci -m "Adding svn subrepo"
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   280
  $ touch file1.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   281
  $ hg add file1.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   282
  $ hg ci -m "Adding file1"
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   283
  $ hg up 0
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   284
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   285
  $ touch file2.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   286
  $ hg add file2.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   287
  $ hg ci -m "Adding file2"
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   288
  created new head
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   289
  $ hg merge 1
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   290
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   291
  (branch merge, don't forget to commit)
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   292
  $ hg ci -m "merged"
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   293
  $ cd ..
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   294
  $ hg --config extensions.convert= convert withmerge withmerge-converted
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   295
  initializing destination withmerge-converted repository
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   296
  scanning source...
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   297
  sorting...
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   298
  converting...
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   299
  3 Adding svn subrepo
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   300
  2 Adding file1
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   301
  1 Adding file2
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   302
  0 merged
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   303
  $ cd withmerge-converted
35693
1880a0bdfc5e test-convert-svn-move: sort svn checkout output
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35676
diff changeset
   304
  $ hg up | sort
1880a0bdfc5e test-convert-svn-move: sort svn checkout output
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35676
diff changeset
   305
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
35676
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   306
  A    subrepo/proj B
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   307
  A    subrepo/proj B/mytrunk
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   308
  A    subrepo/proj B/mytrunk/letter .txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   309
  A    subrepo/proj B/mytrunk/letter2.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   310
  A    subrepo/proj B/tags
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   311
  A    subrepo/proj B/tags/v0.1
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   312
  A    subrepo/proj B/tags/v0.1/letter .txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   313
  A    subrepo/proj B/tags/v0.2
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   314
  A    subrepo/proj B/tags/v0.2/letter .txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   315
  A    subrepo/proj B/tags/v0.2/letter2.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   316
  Checked out revision 9.
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   317
  $ ls
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   318
  file1.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   319
  file2.txt
9c575c22dcf4 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 35393
diff changeset
   320
  subrepo