Mercurial > hgsubversion
comparison fetch_command.py @ 105:607d72c12dee
fetch_command: move diff file deletion code back with everything else
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 25 Nov 2008 09:18:27 -0600 |
parents | f046564b2916 |
children | 122b6037e5f9 |
comparison
equal
deleted
inserted
replaced
104:f046564b2916 | 105:607d72c12dee |
---|---|
453 link_path = open(path).read() | 453 link_path = open(path).read() |
454 link_path = link_path[len('link '):] | 454 link_path = link_path[len('link '):] |
455 os.remove(path) | 455 os.remove(path) |
456 link_files[m] = link_path | 456 link_files[m] = link_path |
457 files_touched.add(m) | 457 files_touched.add(m) |
458 except (core.SubversionException, | 458 |
459 BadPatchApply, | |
460 svnwrap.SubversionRepoCanNotDiff), e: | |
461 if (hasattr(e, 'apr_err') and e.apr_err != 160013): | |
462 raise | |
463 # Either this revision or the previous one does not exist. | |
464 ui.status("fetching entire rev previous rev does not exist.\n") | |
465 files_touched, filectxfn = stupid_fetch_branchrev( | |
466 svn, hg_editor, b, branches[b], r, parent_ha) | |
467 else: | |
468 for p in r.paths: | 459 for p in r.paths: |
469 if p.startswith(diff_path) and r.paths[p].action == 'D': | 460 if p.startswith(diff_path) and r.paths[p].action == 'D': |
470 p2 = p[len(diff_path)+1:] | 461 p2 = p[len(diff_path)+1:] |
471 files_touched.add(p2) | 462 files_touched.add(p2) |
472 p3 = os.path.join(our_tempdir, p2) | 463 p3 = os.path.join(our_tempdir, p2) |
495 if exe is None and path in hg_editor.repo[parent_ha]: | 486 if exe is None and path in hg_editor.repo[parent_ha]: |
496 exe = 'x' in hg_editor.repo[parent_ha].filectx(path).flags() | 487 exe = 'x' in hg_editor.repo[parent_ha].filectx(path).flags() |
497 copied = copies.get(path) | 488 copied = copies.get(path) |
498 return context.memfilectx(path=path, data=fp.read(), islink=False, | 489 return context.memfilectx(path=path, data=fp.read(), islink=False, |
499 isexec=exe, copied=copied) | 490 isexec=exe, copied=copied) |
491 except (core.SubversionException, | |
492 BadPatchApply, | |
493 svnwrap.SubversionRepoCanNotDiff), e: | |
494 if (hasattr(e, 'apr_err') and e.apr_err != 160013): | |
495 raise | |
496 # Either this revision or the previous one does not exist. | |
497 ui.status("fetching entire rev previous rev does not exist.\n") | |
498 files_touched, filectxfn = stupid_fetch_branchrev( | |
499 svn, hg_editor, b, branches[b], r, parent_ha) | |
500 | 500 |
501 date = r.date.replace('T', ' ').replace('Z', '').split('.')[0] | 501 date = r.date.replace('T', ' ').replace('Z', '').split('.')[0] |
502 date += ' -0000' | 502 date += ' -0000' |
503 extra = {} | 503 extra = {} |
504 if b: | 504 if b: |