[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svndumpfilter matches by node path string containment rather than by node path directory containment

From: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Fri, 20 Jun 2008 20:49:05 +0300 (Jerusalem Daylight Time)

Matthew Carter wrote on Fri, 20 Jun 2008 at 00:19 -0400:
> When I ask svndumpfilter to remove just the "Foo" node, both the "Foo" and the
> "FooBar.txt" nodes are removed.
>

That's bad.

> Do you agree that this is a problem? Shall I file an issue for this in the
> subversion issue tracker?
>

Does this (completely untested) patch fix the problem?

Index: subversion/svndumpfilter/main.c
===================================================================
--- subversion/svndumpfilter/main.c (revision 31823)
+++ subversion/svndumpfilter/main.c (working copy)
@@ -115,7 +115,8 @@ ary_prefix_match(apr_array_header_t *pfxlist, cons
       pfx_len = strlen(pfx);
       if (path_len < pfx_len)
         continue;
- if (strncmp(path, pfx, pfx_len) == 0)
+ if (strncmp(path, pfx, pfx_len) == 0
+ && (path[pfx_len] == '\0' || path[pfx_len] == '/'))
         return TRUE;
     }

> Thank you.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-20 19:49:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.