Mercurial > hgsubversion
comparison tests/comprehensive/test_rebuildmeta.py @ 1159:d62c53c7a37d
tests: relax testing for tagmap existence
In an upcoming patch, we will turn meta.tags into a lazy property so we only
check the tags file when both exist.
| author | Sean Farley <sean.michael.farley@gmail.com> |
|---|---|
| date | Sat, 22 Feb 2014 18:23:52 -0600 |
| parents | 34173bbd3b8e |
| children | 11c8de73b48a |
comparison
equal
deleted
inserted
replaced
| 1158:770ac6de58c5 | 1159:d62c53c7a37d |
|---|---|
| 108 'no .hg/svn directory in the destination!') | 108 'no .hg/svn directory in the destination!') |
| 109 dest = hg.repository(u, os.path.dirname(dest.path)) | 109 dest = hg.repository(u, os.path.dirname(dest.path)) |
| 110 for tf in ('lastpulled', 'rev_map', 'uuid', 'tagmap', 'layout', 'subdir',): | 110 for tf in ('lastpulled', 'rev_map', 'uuid', 'tagmap', 'layout', 'subdir',): |
| 111 | 111 |
| 112 stf = os.path.join(src.path, 'svn', tf) | 112 stf = os.path.join(src.path, 'svn', tf) |
| 113 self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf) | 113 # the generation of tagmap is lazy so it doesn't strictly need to exist |
| 114 # if it's not being used | |
| 115 if not stf.endswith('tagmap'): | |
| 116 self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf) | |
| 114 dtf = os.path.join(dest.path, 'svn', tf) | 117 dtf = os.path.join(dest.path, 'svn', tf) |
| 115 self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf) | 118 old, new = None, None |
| 116 old, new = util.load(stf, resave=False), util.load(dtf, resave=False) | 119 if not dtf.endswith('tagmap'): |
| 120 self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf) | |
| 121 if os.path.isfile(stf) and os.path.isfile(dtf): | |
| 122 old, new = util.load(stf, resave=False), util.load(dtf, resave=False) | |
| 117 if tf == 'lastpulled' and (name, | 123 if tf == 'lastpulled' and (name, |
| 118 self.stupid, single) in expect_youngest_skew: | 124 self.stupid, single) in expect_youngest_skew: |
| 119 self.assertNotEqual(old, new, | 125 self.assertNotEqual(old, new, |
| 120 'rebuildmeta unexpected match on youngest rev!') | 126 'rebuildmeta unexpected match on youngest rev!') |
| 121 continue | 127 continue |
