[webkit-dev] svn-create-patch acting oddly lately

Peter Kasting pkasting at google.com
Mon Jul 20 14:40:56 PDT 2009


On Mon, Jul 20, 2009 at 2:24 PM, Darin Adler <darin at apple.com> wrote:

> The key here is that "/Users/darin" is a symbolic link to
> "/Volumes/Home/darin" — you can probably reproduce this by putting the
> checkout directory inside a symbolic link.
>

Doesn't help on my Windows box at least... all my checkouts are rooted at
symbolic links.

 In determineSvnRoot(), $last is ".." and then $svnRoot ends up as
> "/Users/darin/Safari/OpenSource/WebKit/..", which seems bad. Is rel2abs
> supposed to handle that?


Not sure.  JoePeck and I have talked some on IRC since this code was from
his patch.  He says he's encountered rel2abs() behaving differently on
different systems.  I know so little about Perl that I'm not sure what to do
with that info.

In chdirAndGetDifference(), before is
> "/Users/darin/Safari/OpenSource/WebKit" and after is
> "/Volumes/Home/darin/Safari/OpenSource".


That's definitely bad, and seems like the source of this issue.

It looks from here like the chdir call is causing curdir() to report the
non-symbolic-link form of things.  If that's true, it seems like this
workaround would work:

...
my ($newdir) = @_;
my $before = File::Spec->rel2abs( File::Spec->curdir() );
+ chdir $before;  # Try and force curdir() to report the directory without
symbolic links.
+ $before = File::Spec->rel2abs( File::Spec->curdir() );
chdir $newdir;
my $after = File::Spec->rel2abs( File::Spec->curdir() );
...

Could you try this and see if it works?

Also, any Perl hackers are welcome to chip in here on how the current code
should be improved.  I just looked up docs on the File::Spec module and saw
them mentioning something about realpath() that might be relevant here...

PK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090720/ce0b0e4f/attachment.html>


More information about the webkit-dev mailing list