comparison rebuildmeta.py @ 225:2117cb0118fe

Get rid of .hg/svn/last_rev: We now calculate the last known revision by iterating over all known revisions and finding the highest number. Theoretically, we might be able to simply read the latest entry, but in practice, that's a bug waiting to happen. For instance, we might want to achieve compatibility with '.hg/shamap' as generated by the ConvertExtension, and it not only cannot offer a guarantee of linearity, but it also allows more than one conversion to source exists. I'd say we have other problems to care about until this turns up as a hotspot in profiling. Such as why we leak circa 100MB of memory per 1000 revisions converted ;)
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 27 Mar 2009 01:09:36 +0100
parents 30df375590d1
children f71af18c4379
comparison
equal deleted inserted replaced
224:2165461d2dd8 225:2117cb0118fe
77 revision) 77 revision)
78 for c in ctx.children(): 78 for c in ctx.children():
79 if c.branch() == 'closed-branches': 79 if c.branch() == 'closed-branches':
80 if branch in branchinfo: 80 if branch in branchinfo:
81 del branchinfo[branch] 81 del branchinfo[branch]
82 lastrevfile = open(os.path.join(svnmetadir, 'last_rev'), 'w')
83 lastrevfile.write(str(last_rev))
84 lastrevfile.close()
85 branchinfofile = open(os.path.join(svnmetadir, 'branch_info'), 'w') 82 branchinfofile = open(os.path.join(svnmetadir, 'branch_info'), 'w')
86 pickle.dump(branchinfo, branchinfofile) 83 pickle.dump(branchinfo, branchinfofile)
87 branchinfofile.close() 84 branchinfofile.close()
88 tagsinfo = {} 85 tagsinfo = {}
89 realtags = svn.tags 86 realtags = svn.tags