hg-reset.py: Use mangle_key() for load_cache() as hg-fast-export.py does

Signed-off-by: Rocco Rutte <pdmef@gmx.net>
This commit is contained in:
Rocco Rutte
2007-10-22 08:28:18 +00:00
parent ee510bb022
commit 82dccb0ea0

View File

@@ -69,6 +69,9 @@ def get_tags(ui,repo,marks_cache,max):
bad.sort()
return good,bad
def mangle_mark(mark):
return str(int(mark)-1)
if __name__=='__main__':
def bail(parser,opt):
sys.stderr.write('Error: No option %s given\n' % opt)
@@ -97,7 +100,7 @@ if __name__=='__main__':
if options.revision==None: bail(parser,'-R/--revision')
heads_cache=load_cache(options.headsfile)
marks_cache=load_cache(options.marksfile)
marks_cache=load_cache(options.marksfile,mangle_mark)
state_cache=load_cache(options.statusfile)
l=int(state_cache.get('tip',options.revision))