Mercurial > hgsubversion
comparison fetch_command.py @ 167:3cd6a7354207
fetch: Add support for an authormap which can rename authors, intended for
repository conversion.
| author | Graham Booker <gbooker@cod3r.com> |
|---|---|
| date | Tue, 30 Dec 2008 20:13:32 -0600 |
| parents | db88e528e8e6 |
| children | 4f26fa049452 |
comparison
equal
deleted
inserted
replaced
| 166:db88e528e8e6 | 167:3cd6a7354207 |
|---|---|
| 21 | 21 |
| 22 | 22 |
| 23 @util.register_subcommand('pull') | 23 @util.register_subcommand('pull') |
| 24 def fetch_revisions(ui, svn_url, hg_repo_path, skipto_rev=0, stupid=None, | 24 def fetch_revisions(ui, svn_url, hg_repo_path, skipto_rev=0, stupid=None, |
| 25 tag_locations='tags', | 25 tag_locations='tags', |
| 26 authors=None, | |
| 26 **opts): | 27 **opts): |
| 27 """Pull new revisions from Subversion. | 28 """Pull new revisions from Subversion. |
| 28 """ | 29 """ |
| 29 svn_url = util.normalize_url(svn_url) | 30 svn_url = util.normalize_url(svn_url) |
| 30 old_encoding = merc_util._encoding | 31 old_encoding = merc_util._encoding |
| 45 tag_locations = tag_locations.split(',') | 46 tag_locations = tag_locations.split(',') |
| 46 hg_editor = hg_delta_editor.HgChangeReceiver(hg_repo_path, | 47 hg_editor = hg_delta_editor.HgChangeReceiver(hg_repo_path, |
| 47 ui_=ui, | 48 ui_=ui, |
| 48 subdir=svn.subdir, | 49 subdir=svn.subdir, |
| 49 author_host=author_host, | 50 author_host=author_host, |
| 50 tag_locations=tag_locations) | 51 tag_locations=tag_locations, |
| 52 authors=authors) | |
| 51 if os.path.exists(hg_editor.uuid_file): | 53 if os.path.exists(hg_editor.uuid_file): |
| 52 uuid = open(hg_editor.uuid_file).read() | 54 uuid = open(hg_editor.uuid_file).read() |
| 53 assert uuid == svn.uuid | 55 assert uuid == svn.uuid |
| 54 start = int(open(hg_editor.last_revision_handled_file, 'r').read()) | 56 start = int(open(hg_editor.last_revision_handled_file, 'r').read()) |
| 55 else: | 57 else: |
