Mercurial > hgsubversion
comparison tests/comprehensive/test_rebuildmeta.py @ 1103:6e1dbf6cbc92
compathacks: new module to collect hacks to work around hg internals changing
This includes branchset(), which provides a portable way to get the
set of branches present in a repository.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 03 Feb 2014 01:55:56 -0500 |
parents | cd0d14e25757 |
children | ff4e102932ed |
comparison
equal
deleted
inserted
replaced
1102:7635d30effa7 | 1103:6e1dbf6cbc92 |
---|---|
14 from mercurial import context | 14 from mercurial import context |
15 from mercurial import extensions | 15 from mercurial import extensions |
16 from mercurial import hg | 16 from mercurial import hg |
17 from mercurial import ui | 17 from mercurial import ui |
18 | 18 |
19 from hgsubversion import compathacks | |
19 from hgsubversion import svncommands | 20 from hgsubversion import svncommands |
20 from hgsubversion import svnmeta | 21 from hgsubversion import svnmeta |
21 | 22 |
22 # These test repositories have harmless skew in rebuildmeta for the | 23 # These test repositories have harmless skew in rebuildmeta for the |
23 # last-pulled-rev because the last rev in svn causes absolutely no | 24 # last-pulled-rev because the last rev in svn causes absolutely no |
117 self.stupid, single) in expect_youngest_skew: | 118 self.stupid, single) in expect_youngest_skew: |
118 self.assertNotEqual(old, new, | 119 self.assertNotEqual(old, new, |
119 'rebuildmeta unexpected match on youngest rev!') | 120 'rebuildmeta unexpected match on youngest rev!') |
120 continue | 121 continue |
121 self.assertMultiLineEqual(old, new, tf + ' differs') | 122 self.assertMultiLineEqual(old, new, tf + ' differs') |
122 self.assertEqual(src.branchtags(), dest.branchtags()) | 123 try: |
124 self.assertEqual(src.branchmap(), dest.branchmap()) | |
125 except AttributeError: | |
126 # hg 2.8 and earlier | |
127 self.assertEqual(src.branchtags(), dest.branchtags()) | |
123 srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info'))) | 128 srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info'))) |
124 destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info'))) | 129 destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info'))) |
125 self.assertEqual(sorted(srcbi.keys()), sorted(destbi.keys())) | 130 self.assertEqual(sorted(srcbi.keys()), sorted(destbi.keys())) |
126 revkeys = svnmeta.SVNMeta(dest).revmap.keys() | 131 revkeys = svnmeta.SVNMeta(dest).revmap.keys() |
127 for branch in destbi: | 132 for branch in destbi: |