Mercurial > hgsubversion
changeset 383:987bd7444f60
Remove vestigial references to the tags_info file we no longer need.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sat, 30 May 2009 20:28:07 -0500 |
parents | b6047c200708 |
children | 26337d097e18 |
files | hgsubversion/hg_delta_editor.py hgsubversion/svncommands.py tests/comprehensive/test_stupid_pull.py tests/test_rebuildmeta.py |
diffstat | 4 files changed, 0 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/hg_delta_editor.py +++ b/hgsubversion/hg_delta_editor.py @@ -122,10 +122,6 @@ class HgChangeReceiver(delta.Editor): self.branches = pickle.load(f) f.close() self.tags = {} - if os.path.exists(self.tag_info_file): - f = open(self.tag_info_file) - self.tags = pickle.load(f) - f.close() if os.path.exists(self.tag_locations_file): f = open(self.tag_locations_file) self.tag_locations = pickle.load(f) @@ -213,7 +209,6 @@ class HgChangeReceiver(delta.Editor): every revision is created. ''' pickle_atomic(self.branches, self.branch_info_file, self.meta_data_dir) - pickle_atomic(self.tags, self.tag_info_file, self.meta_data_dir) def _path_and_branch_for_path(self, path, existing=True): return self._split_branch_path(path, existing=existing)[:2] @@ -835,10 +830,6 @@ class HgChangeReceiver(delta.Editor): return self.meta_file_named('branch_info') branch_info_file = property(branch_info_file) - def tag_info_file(self): - return self.meta_file_named('tag_info') - tag_info_file = property(tag_info_file) - def tag_locations_file(self): return self.meta_file_named('tag_locations') tag_locations_file = property(tag_locations_file)
--- a/hgsubversion/svncommands.py +++ b/hgsubversion/svncommands.py @@ -145,42 +145,6 @@ def rebuildmeta(ui, repo, hg_repo_path, pickle.dump(branchinfo, branchinfofile) branchinfofile.close() - # now handle tags - tagsinfo = {} - realtags = svn.tags - tagsleft = realtags.items() - while tagsleft: - tag, tagparent = tagsleft.pop(0) - source, rev = tagparent - if source.startswith('tags/'): - src = source[len('tags/'):] - if src in tagsinfo: - tagsinfo[tag] = tagsinfo[src] - elif src in realtags: - if (realtags[src][1] <= last_rev - or realtags[src][0].startswith('tags/')): - tagsleft.append(src) - else: - older_tags = svn.tags_at_rev(rev) - newsrc, newrev = older_tags[src] - tagsleft.append((tag, (newsrc, newrev))) - continue - else: - # determine the branch - assert not source.startswith('tags/'), "Tags can't be tags of other tags." - if source.startswith('branches/'): - source = source[len('branches/'):] - elif source == 'trunk': - source = None - else: - source = '../' + source - if rev <= last_rev and (source or 'default') in repo.branchtags(): - tagsinfo[tag] = source, rev - - tagsinfofile = open(os.path.join(svnmetadir, 'tag_info'), 'w') - pickle.dump(tagsinfo, tagsinfofile) - tagsinfofile.close() - def help(ui, args=None, **opts): """show help for a given subcommands or a help overview
--- a/tests/comprehensive/test_stupid_pull.py +++ b/tests/comprehensive/test_stupid_pull.py @@ -22,8 +22,6 @@ def _do_case(self, name): hg.clone(u, test_util.fileurl(checkout_path), wc2_path, update=False) self.repo2 = hg.repository(ui.ui(), wc2_path) self.assertEqual(self.repo.branchtags(), self.repo2.branchtags()) - self.assertEqual(pickle.load(open(os.path.join(self.wc_path, '.hg', 'svn', 'tag_info'))), - pickle.load(open(os.path.join(wc2_path, '.hg', 'svn', 'tag_info')))) def buildmethod(case, name):
--- a/tests/test_rebuildmeta.py +++ b/tests/test_rebuildmeta.py @@ -34,10 +34,6 @@ def _do_case(self, name, stupid): self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf) self.assertEqual(open(stf).read(), open(dtf).read()) - self.assertEqual(pickle.load(open(os.path.join(src.path, 'svn', - 'tag_info'))), - pickle.load(open(os.path.join(dest.path, 'svn', - 'tag_info')))) self.assertEqual(src.branchtags(), dest.branchtags()) srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info'))) destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info')))