rebuildmeta: remove any existing tagmap file.

This commit is contained in:
Augie Fackler 2009-07-05 21:44:35 -05:00
parent 9ec1da5d2e
commit 65ebb3cfa8
2 changed files with 8 additions and 1 deletions

View File

@ -101,9 +101,13 @@ class TagMap(dict):
VERSION = 2
@classmethod
def filepath(cls, repo):
return os.path.join(repo.path, 'svn', 'tagmap')
def __init__(self, repo, endrev=None):
dict.__init__(self)
self.path = os.path.join(repo.path, 'svn', 'tagmap')
self.path = self.filepath(repo)
self.seen = 0
self.endrev=endrev
if os.path.isfile(self.path):

View File

@ -87,6 +87,9 @@ def rebuildmeta(ui, repo, hg_repo_path, args, **opts):
last_rev = -1
branchinfo = {}
noderevnums = {}
tagfile = os.path.join(svnmetadir, 'tagmap')
if os.path.exists(maps.TagMap.filepath(repo)):
os.unlink(maps.TagMap.filepath(repo))
tags = maps.TagMap(repo)
skipped = set()