diff tests/test_externals.py @ 215:b5ef9a404f5d

Stopped idiotic filtering of revisions that did not edit something branches/tags/trunk. Fixed a bunch of tests as a result. This likely will make new conversions of some repos have new revisions in them.
author Augie Fackler <durin42@gmail.com>
date Fri, 27 Mar 2009 16:56:07 -0500
parents 906d3f302b45
children a360ddc97719
line wrap: on
line diff
--- a/tests/test_externals.py
+++ b/tests/test_externals.py
@@ -10,9 +10,8 @@ class TestFetchExternals(test_util.TestB
         f['t1'] = 'dir1 -r10 svn://foobar'
         f['t 2'] = 'dir2 -r10 svn://foobar'
         f['t3'] = ['dir31 -r10 svn://foobar', 'dir32 -r10 svn://foobar']
-        
-        refext = """\
-[t 2]
+
+        refext = """[t 2]
  dir2 -r10 svn://foobar
 [t1]
  dir1 -r10 svn://foobar
@@ -32,55 +31,49 @@ class TestFetchExternals(test_util.TestB
     def test_externals(self, stupid=False):
         repo = self._load_fixture_and_fetch('externals.svndump', stupid=stupid)
 
-        ref0 = """\
-[.]
+        ref0 = """[.]
  ^/externals/project1 deps/project1
 """
-        self.assertEqual(ref0, repo[0]['.hgsvnexternals'].data())
-        ref1 = """\
-[.]
+        self.assertEqual(ref0, repo[0+2]['.hgsvnexternals'].data())
+        ref1 = """[.]
  ^/externals/project1 deps/project1
  ^/externals/project2 deps/project2
 """
-        self.assertEqual(ref1, repo[1]['.hgsvnexternals'].data())
+        self.assertEqual(ref1, repo[1+2]['.hgsvnexternals'].data())
 
-        ref2 = """\
-[.]
+        ref2 = """[.]
  ^/externals/project2 deps/project2
 [subdir]
  ^/externals/project1 deps/project1
 [subdir2]
  ^/externals/project1 deps/project1
 """
-        self.assertEqual(ref2, repo[2]['.hgsvnexternals'].data())
+        actual = repo[2+2]['.hgsvnexternals'].data()
+        self.assertEqual(ref2, actual)
 
-        ref3 = """\
-[.]
+        ref3 = """[.]
  ^/externals/project2 deps/project2
 [subdir]
  ^/externals/project1 deps/project1
 """
-        self.assertEqual(ref3, repo[3]['.hgsvnexternals'].data())
+        self.assertEqual(ref3, repo[3+2]['.hgsvnexternals'].data())
 
-        ref4 = """\
-[subdir]
+        ref4 = """[subdir]
  ^/externals/project1 deps/project1
 """
-        self.assertEqual(ref4, repo[4]['.hgsvnexternals'].data())
+        self.assertEqual(ref4, repo[4+2]['.hgsvnexternals'].data())
 
-        ref5 = """\
-[.]
+        ref5 = """[.]
  ^/externals/project2 deps/project2
 [subdir2]
  ^/externals/project1 deps/project1
 """
-        self.assertEqual(ref5, repo[5]['.hgsvnexternals'].data())
+        self.assertEqual(ref5, repo[5+2]['.hgsvnexternals'].data())
 
-        ref6 = """\
-[.]
+        ref6 = """[.]
  ^/externals/project2 deps/project2
 """
-        self.assertEqual(ref6, repo[6]['.hgsvnexternals'].data())
+        self.assertEqual(ref6, repo[6+2]['.hgsvnexternals'].data())
 
     def test_externals_stupid(self):
         self.test_externals(True)
@@ -96,9 +89,8 @@ class TestPushExternals(test_util.TestBa
     def test_push_externals(self, stupid=False):
         # Add a new reference on an existing and non-existing directory
         changes = [
-            ('.hgsvnexternals', '.hgsvnexternals', 
-             """\
-[dir]
+            ('.hgsvnexternals', '.hgsvnexternals',
+             """[dir]
  ../externals/project2 deps/project2
 [subdir1]
  ../externals/project1 deps/project1
@@ -115,9 +107,8 @@ class TestPushExternals(test_util.TestBa
         # Remove all references from one directory, add a new one
         # to the other (test multiline entries)
         changes = [
-            ('.hgsvnexternals', '.hgsvnexternals', 
-             """\
-[subdir1]
+            ('.hgsvnexternals', '.hgsvnexternals',
+             """[subdir1]
  ../externals/project1 deps/project1
  ../externals/project2 deps/project2
 """),