diff tests/test_externals.py @ 315:963d27a0b1c2

svnexternals: do not use peg revisions as --rev replacements Peg revisions are now parsed separately. If a revision is supplied but not a peg revision, we used the former as peg revision, as subversion seems to do.
author Patrick Mezard <pmezard@gmail.com>
date Sun, 03 May 2009 21:42:44 -0500
parents ba8e91a7c077
children 46e69be8e2c8
line wrap: on
line diff
--- a/tests/test_externals.py
+++ b/tests/test_externals.py
@@ -33,19 +33,19 @@ class TestFetchExternals(test_util.TestB
         # Taken from svn book
         samples = [
             ('third-party/sounds             http://svn.example.com/repos/sounds',
-             ('third-party/sounds', None, 'http://svn.example.com/repos/sounds')),
+             ('third-party/sounds', None, 'http://svn.example.com/repos/sounds', None)),
             ('third-party/skins -r148        http://svn.example.com/skinproj',
-             ('third-party/skins', '148', 'http://svn.example.com/skinproj')),
+             ('third-party/skins', '148', 'http://svn.example.com/skinproj', None)),
             ('third-party/skins -r 148        http://svn.example.com/skinproj',
-             ('third-party/skins', '148', 'http://svn.example.com/skinproj')),
+             ('third-party/skins', '148', 'http://svn.example.com/skinproj', None)),
             ('http://svn.example.com/repos/sounds third-party/sounds',
-             ('third-party/sounds', None, 'http://svn.example.com/repos/sounds')),
+             ('third-party/sounds', None, 'http://svn.example.com/repos/sounds', None)),
             ('-r148 http://svn.example.com/skinproj third-party/skins',
-             ('third-party/skins', '148', 'http://svn.example.com/skinproj')),
+             ('third-party/skins', '148', 'http://svn.example.com/skinproj', None)),
             ('-r 148 http://svn.example.com/skinproj third-party/skins',
-             ('third-party/skins', '148', 'http://svn.example.com/skinproj')),
+             ('third-party/skins', '148', 'http://svn.example.com/skinproj', None)),
             ('http://svn.example.com/skin-maker@21 third-party/skins/toolkit',
-             ('third-party/skins/toolkit', '21', 'http://svn.example.com/skin-maker')),
+             ('third-party/skins/toolkit', None, 'http://svn.example.com/skin-maker', '21')),
             ]
         
         for line, expected in samples:
@@ -60,12 +60,12 @@ class TestFetchExternals(test_util.TestB
         self.assertEqual(ref0, repo[0]['.hgsvnexternals'].data())
         ref1 = """[.]
  ^/externals/project1 deps/project1
- ^/externals/project2 deps/project2
+ -r2 ^/externals/project2@2 deps/project2
 """
         self.assertEqual(ref1, repo[1]['.hgsvnexternals'].data())
 
         ref2 = """[.]
- ^/externals/project2 deps/project2
+ -r2 ^/externals/project2@2 deps/project2
 [subdir]
  ^/externals/project1 deps/project1
 [subdir2]
@@ -75,7 +75,7 @@ class TestFetchExternals(test_util.TestB
         self.assertEqual(ref2, actual)
 
         ref3 = """[.]
- ^/externals/project2 deps/project2
+ -r2 ^/externals/project2@2 deps/project2
 [subdir]
  ^/externals/project1 deps/project1
 """
@@ -87,14 +87,14 @@ class TestFetchExternals(test_util.TestB
         self.assertEqual(ref4, repo[4]['.hgsvnexternals'].data())
 
         ref5 = """[.]
- ^/externals/project2 deps/project2
+ -r2 ^/externals/project2@2 deps/project2
 [subdir2]
  ^/externals/project1 deps/project1
 """
         self.assertEqual(ref5, repo[5]['.hgsvnexternals'].data())
 
         ref6 = """[.]
- ^/externals/project2 deps/project2
+ -r2 ^/externals/project2@2 deps/project2
 """
         self.assertEqual(ref6, repo[6]['.hgsvnexternals'].data())