# HG changeset patch # User Patrick Mezard # Date 1227626307 21600 # Node ID 607d72c12dee0ecff0fbb0854e399cef11a6734f # Parent f046564b2916bd30d431065e2dbe720ce3aeae19 fetch_command: move diff file deletion code back with everything else diff --git a/fetch_command.py b/fetch_command.py --- a/fetch_command.py +++ b/fetch_command.py @@ -455,16 +455,7 @@ def stupid_svn_server_pull_rev(ui, svn, os.remove(path) link_files[m] = link_path files_touched.add(m) - except (core.SubversionException, - BadPatchApply, - svnwrap.SubversionRepoCanNotDiff), e: - if (hasattr(e, 'apr_err') and e.apr_err != 160013): - raise - # Either this revision or the previous one does not exist. - ui.status("fetching entire rev previous rev does not exist.\n") - files_touched, filectxfn = stupid_fetch_branchrev( - svn, hg_editor, b, branches[b], r, parent_ha) - else: + for p in r.paths: if p.startswith(diff_path) and r.paths[p].action == 'D': p2 = p[len(diff_path)+1:] @@ -497,6 +488,15 @@ def stupid_svn_server_pull_rev(ui, svn, copied = copies.get(path) return context.memfilectx(path=path, data=fp.read(), islink=False, isexec=exe, copied=copied) + except (core.SubversionException, + BadPatchApply, + svnwrap.SubversionRepoCanNotDiff), e: + if (hasattr(e, 'apr_err') and e.apr_err != 160013): + raise + # Either this revision or the previous one does not exist. + ui.status("fetching entire rev previous rev does not exist.\n") + files_touched, filectxfn = stupid_fetch_branchrev( + svn, hg_editor, b, branches[b], r, parent_ha) date = r.date.replace('T', ' ').replace('Z', '').split('.')[0] date += ' -0000'