comparison rebuildmeta.py @ 181:e37f9d3fd5e7

remove decorators (compat with python2.3)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 13 Jan 2009 13:59:50 +0100
parents ba801f44d240
children 57355b0e7bd1
comparison
equal deleted inserted replaced
180:3f1e8a5ec9dd 181:e37f9d3fd5e7
4 from mercurial import node 4 from mercurial import node
5 5
6 import svnwrap 6 import svnwrap
7 import util 7 import util
8 8
9 @util.register_subcommand('rebuildmeta')
10 def rebuildmeta(ui, repo, hg_repo_path, args, **opts): 9 def rebuildmeta(ui, repo, hg_repo_path, args, **opts):
11 """Rebuild hgsubversion metadata using values stored in revisions. 10 """Rebuild hgsubversion metadata using values stored in revisions.
12 """ 11 """
13 assert len(args) == 1, 'You must pass the svn URI used to create this repo.' 12 assert len(args) == 1, 'You must pass the svn URI used to create this repo.'
14 uuid = None 13 uuid = None
106 if rev <= last_rev: 105 if rev <= last_rev:
107 tagsinfo[tag] = source, rev 106 tagsinfo[tag] = source, rev
108 tagsinfofile = open(os.path.join(svnmetadir, 'tag_info'), 'w') 107 tagsinfofile = open(os.path.join(svnmetadir, 'tag_info'), 'w')
109 pickle.dump(tagsinfo, tagsinfofile) 108 pickle.dump(tagsinfo, tagsinfofile)
110 tagsinfofile.close() 109 tagsinfofile.close()
110 rebuildmeta = util.register_subcommand('rebuildmeta')(rebuildmeta)
111 111
112 112
113 def determinebranch(branch): 113 def determinebranch(branch):
114 if branch.startswith('branches'): 114 if branch.startswith('branches'):
115 branch = branch[len('branches/'):] 115 branch = branch[len('branches/'):]