On Mon, Jul 20, 2009 at 2:24 PM, Darin Adler <da...@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
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev