# HG changeset patch # User Augie Fackler # Date 1246848275 18000 # Node ID 9741029985789ed843cea315f2aac341f41bb00b # Parent 8ad6dfd51f72367fc51fbc2a5c28799fa46bea6a rebuildmeta: remove any existing tagmap file. diff --git a/hgsubversion/maps.py b/hgsubversion/maps.py --- a/hgsubversion/maps.py +++ b/hgsubversion/maps.py @@ -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): diff --git a/hgsubversion/svncommands.py b/hgsubversion/svncommands.py --- a/hgsubversion/svncommands.py +++ b/hgsubversion/svncommands.py @@ -87,6 +87,9 @@ def rebuildmeta(ui, repo, hg_repo_path, 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()