[webkit-reviews] review granted: [Bug 26999] bugzilla-tool/svn-apply can't handle patches made from a non-root directory : [Attachment 32743] svn-create-patch provides full paths Subversion Repository's Root Directory

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 14 18:30:06 PDT 2009


David Kilzer (ddkilzer) <ddkilzer at webkit.org> has granted Joseph Pecoraro
<joepeck02 at gmail.com>'s request for review:
Bug 26999: bugzilla-tool/svn-apply can't handle patches made from a non-root
directory
https://bugs.webkit.org/show_bug.cgi?id=26999

Attachment 32743: svn-create-patch provides full paths Subversion Repository's
Root Directory
https://bugs.webkit.org/attachment.cgi?id=32743&action=review

------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at webkit.org>
(In reply to comment #11)
> (In reply to comment #5)
> > IMO, it would be great to have a replacement subroutine for chdirwebkit()
that
> > got the svn URL from the "svn info" command in the current directory, then
did
> > a "chdir .." until the current svn URL no longer matched the previous svn
URL
> > (minus one directory), then you could chdir back into the last directory. 
This
> > would then put you at the root of the svn working directory regardless of
> > whether you're working on WebKit or not.
> 
> The way I went about it was using "svn info [PATH]".	And building up that
path
> as a trail of "../".	I also use system() to check the error code of svn
info. 
> Let me know if there is a problem with this approach (cross platform?) or if
> you think of a better way and I'll see what I can do.

I thought of doing that after my last comment as well!	The only situation
where this won't work is if a user has a "mixed" svn working directory where
they have one svn working directory at "dir" and a second svn working directory
(from a different repository) under "dir", and the user ran svn-create-patch in
the second working directory.  I don't know how prevalent this use case is, and
I doubt it's common with WebKit, so let's not worry about that for now.

>+sub chdirAndGetDifference($);

Nit: Instead of "GetDifference", I think something like "ReturnRelativePath"
might be more descriptive.  I can change this when I land the patch.

r=me!


More information about the webkit-reviews mailing list