comparison cmdutil.py @ 241:4950b18cf949

Move fetch_command.fetch_revisions() to svncommands.pull().
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 08 Apr 2009 17:49:30 +0200
parents
children 06130689a2c8
comparison
equal deleted inserted replaced
240:1aa1d2d406d9 241:4950b18cf949
1
2 def replay_convert_rev(hg_editor, svn, r):
3 hg_editor.set_current_rev(r)
4 svn.get_replay(r.revnum, hg_editor)
5 i = 1
6 if hg_editor.missing_plaintexts:
7 hg_editor.ui.debug('Fetching %s files that could not use replay.\n' %
8 len(hg_editor.missing_plaintexts))
9 files_to_grab = set()
10 rootpath = svn.subdir and svn.subdir[1:] or ''
11 for p in hg_editor.missing_plaintexts:
12 hg_editor.ui.note('.')
13 hg_editor.ui.flush()
14 if p[-1] == '/':
15 dirpath = p[len(rootpath):]
16 files_to_grab.update([dirpath + f for f,k in
17 svn.list_files(dirpath, r.revnum)
18 if k == 'f'])
19 else:
20 files_to_grab.add(p[len(rootpath):])
21 hg_editor.ui.note('\nFetching files...\n')
22 for p in files_to_grab:
23 hg_editor.ui.note('.')
24 hg_editor.ui.flush()
25 if i % 50 == 0:
26 svn.init_ra_and_client()
27 i += 1
28 data, mode = svn.get_file(p, r.revnum)
29 hg_editor.set_file(p, data, 'x' in mode, 'l' in mode)
30 hg_editor.missing_plaintexts = set()
31 hg_editor.ui.note('\n')
32 hg_editor.commit_current_delta()