comparison fetch_command.py @ 197:43d56e973c3c

Replace a few asserts with aborts.
author Dan Villiom Podlaski Christiansen <danchr@cs.au.dk>
date Thu, 12 Feb 2009 15:08:53 +0100
parents f48cd62a9de4
children df4611050286
comparison
equal deleted inserted replaced
196:77812f98e250 197:43d56e973c3c
61 open(hg_editor.svn_url_file, 'w').write(svn_url) 61 open(hg_editor.svn_url_file, 'w').write(svn_url)
62 open(hg_editor.last_revision_handled_file, 'w').write(str(0)) 62 open(hg_editor.last_revision_handled_file, 'w').write(str(0))
63 initializing_repo = True 63 initializing_repo = True
64 start = skipto_rev 64 start = skipto_rev
65 65
66 if initializing_repo and start > 0:
67 raise merc_util.Abort('Revision skipping at repository initialization '
68 'remains unimplemented.')
69
66 # start converting revisions 70 # start converting revisions
67 for r in svn.revisions(start=start): 71 for r in svn.revisions(start=start):
68 valid = False 72 valid = False
69 hg_editor.update_branch_tag_map_for_rev(r) 73 hg_editor.update_branch_tag_map_for_rev(r)
70 for p in r.paths: 74 for p in r.paths:
71 if hg_editor._is_path_valid(p): 75 if hg_editor._is_path_valid(p):
72 valid = True 76 valid = True
73 break 77 break
74 if initializing_repo and start > 0:
75 assert False, 'This feature not ready yet.'
76 if valid: 78 if valid:
77 # got a 502? Try more than once! 79 # got a 502? Try more than once!
78 tries = 0 80 tries = 0
79 converted = False 81 converted = False
80 while not converted and tries < 3: 82 while not converted and tries < 3: