On Sat, 2003-01-11 at 22:25, kfogel@tigris.org wrote:
> + if (path1[0] == '\0')
> + path1 = apr_psprintf (subpool, "%s", path);
> + else if (path1[0] == '/')
> + path1 = apr_psprintf (subpool, "(...%s) %s", path1, path);
> + else
> + path1 = apr_psprintf (subpool, "(.../%s) %s", path1, path);
> +
> + if (path2[0] == '\0')
> + path2 = apr_psprintf (subpool, "%s", path);
> + else if (path2[0] == '/')
> + path2 = apr_psprintf (subpool, "(...%s) %s", path2, path);
> + else
> + path2 = apr_psprintf (subpool, "(.../%s) %s", path2, path);
The above change results in an incorrect diff header:
Index: dir/testfile
===================================================================
--- (.../tags/templatework.branchpoint) dir/testfile (revision 29)
+++ (.../branches/templatework) dir/testfile (revision 29)
By putting the repository path information first, the above is broken
with GNU patch:
$ patch -p0 < difftest1
patching file '(.../branches/templatework)'
Hunk #1 FAILED at 946.
1 out of 1 hunk FAILED -- saving rejects to file
'(.../branches/templatework).rej'
The following patch swaps the repository path information and the
filename, which allows GNU patch to work.
Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 4377)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -235,16 +235,16 @@
if (path1[0] == '\0')
path1 = apr_psprintf (subpool, "%s", path);
else if (path1[0] == '/')
- path1 = apr_psprintf (subpool, "(...%s) %s", path1, path);
+ path1 = apr_psprintf (subpool, "%s (...%s)", path, path1);
else
- path1 = apr_psprintf (subpool, "(.../%s) %s", path1, path);
+ path1 = apr_psprintf (subpool, "%s (.../%s)", path, path1);
if (path2[0] == '\0')
path2 = apr_psprintf (subpool, "%s", path);
else if (path2[0] == '/')
- path2 = apr_psprintf (subpool, "(...%s) %s", path2, path);
+ path2 = apr_psprintf (subpool, "%s (...%s)", path, path2);
else
- path2 = apr_psprintf (subpool, "(.../%s) %s", path2, path);
+ path2 = apr_psprintf (subpool, "%s (.../%s)", path, path2);
label1 = diff_label (path1, rev1, subpool);
label2 = diff_label (path2, rev2, subpool);
Let me know if there are problems with the inline patch, I haven't sent
a patch with evolution for a while.
--
Todd Mokros <niltsiar@neo.rr.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 14 08:18:34 2003