mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
Remove vestigial references to the tags_info file we no longer need.
This commit is contained in:
parent
19d2b38555
commit
e269de6bdc
@ -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)
|
||||
|
@ -145,42 +145,6 @@ def rebuildmeta(ui, repo, hg_repo_path, args, **opts):
|
||||
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
|
||||
|
@ -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):
|
||||
|
@ -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')))
|
||||
|
Loading…
Reference in New Issue
Block a user