diff tests/test_fetch_renames.py @ 1255:139a44a63090 stable 1.7

Merge default into stable for a release.
author Augie Fackler <raf@durin42.com>
date Wed, 05 Nov 2014 12:48:59 -0500
parents 6b15eeb78c1a
children 4379baf58f9e
line wrap: on
line diff
--- a/tests/test_fetch_renames.py
+++ b/tests/test_fetch_renames.py
@@ -18,29 +18,56 @@ class TestFetchRenames(test_util.TestBas
     def test_rename(self):
         config = {
             'hgsubversion.filestoresize': '0',
+            # we set this because we expect all of the copies to be
+            # handled via replay, and we want to notice if that
+            # changes.
+            'hgsubversion.failonmissing': 'yes',
             }
         repo = self._load_fixture_and_fetch('renames.svndump', config=config)
+        self._run_assertions(repo)
 
+    def test_rename_with_prefix(self):
+        config = {
+            'hgsubversion.filestoresize': '0',
+            'hgsubversion.failonmissing': 'yes',
+            }
+        repo = self._load_fixture_and_fetch('renames_with_prefix.svndump',
+                                            subdir='prefix',
+                                            config=config)
+        self._run_assertions(repo)
+
+    def _run_assertions(self, repo):
         # Map revnum to mappings of dest name to (source name, dest content)
         copies = {
             4: {
                 'a1': ('a', 'a\n'),
+                'linka1': ('linka', 'a'),
                 'a2': ('a', 'a\n'),
+                'linka2': ('linka', 'a'),
                 'b1': ('b', 'b\nc\n'),
+                'linkb1': ('linkb', 'bc'),
                 'da1/daf': ('da/daf', 'c\n'),
+                'da1/dalink': ('da/dalink', 'daf'),
                 'da1/db/dbf': ('da/db/dbf', 'd\n'),
+                'da1/db/dblink': ('da/db/dblink', '../daf'),
                 'da2/daf': ('da/daf', 'c\n'),
+                'da2/dalink': ('da/dalink', 'daf'),
                 'da2/db/dbf': ('da/db/dbf', 'd\n'),
+                'da2/db/dblink': ('da/db/dblink', '../daf'),
                 },
             5: {
                 'c1': ('c', 'c\nc\n'),
+                'linkc1': ('linkc', 'cc'),
                 },
             9: {
                 'unchanged2': ('unchanged', 'unchanged\n'),
+                'unchangedlink2': ('unchangedlink', 'unchanged'),
                 'unchangeddir2/f': ('unchangeddir/f', 'unchanged2\n'),
+                'unchangeddir2/link': ('unchangeddir/link', 'f'),
                 },
             10: {
-                 'groupdir2/b': ('groupdir/b', 'b\n')
+                'groupdir2/b': ('groupdir/b', 'b\n'),
+                'groupdir2/linkb': ('groupdir/linkb', 'b'),
                  },
             }
         for rev in repo: