Email lists > P4Ruby > Re: [p4ruby] fix for symlink-in-PWD problem > Re: [p4ruby] fix for symlink-in-PWD problem

Re: [p4ruby] fix for symlink-in-PWD problem




This post if a part of  this thread

2008-03-11 18:51:30
Re: fix for symlink-in-PWD problem
On Tue, Mar 11, 2008 at 7:28 AM, Tony Smith <tonysmee.org> wrote:
>
>  On Monday 10 March 2008 18:11:06 bob p4 wrote:
>  > I claim the fix is compatible with the default
behavior; that is why I
>  > suggested it.  I may be wrong, but that remains
to be shown.  Can you
>  > give an example where this would break existing
code?
>
>  Anytime there's a symlink in the cwd and it's part of
the client root/view,
>  but the linked location isn't, existing code using
local syntax would break.

Your example is a good one.  It's obvious in hindsight
because it is
the converse of my case.  I was thinking that perforce
should be
smarter when PWD doesn't match the depot root --- why not
expand PWD
to see if it matches?  If it does, then it's safe to say
that is the
client root I intended.

In your case, the PWD does match the depot, but if you
expand it we
get something not in the client root.  I don't immediately
see the
possible benefit of this trickery, but I won't rule it out.

So I will revise my suggestion.  If and only if PWD is not
in the
client root, then perforce should try expanding PWD.  This
covers both
cases, I believe.

P4ruby is only mirroring perforce, so I can't exactly fault
p4ruby.  I
do believe perforce is bordering on incorrect behavior here,
so I
guess I'll take it up with them.  In the meantime I can
patch p4ruby
on my side to "fix" perforce.

Theoretically speaking, though, what are the possible
downsides of
p4ruby expanding PWD when it is not in the client root?  The
upside,
of course, is that it there is one less "wtf?"
situation for
programmers to encounter.

--Jeff
_______________________________________________
p4ruby mailing list
p4rubyperforce.com

http://maillist.perforce.com/mailman/listinfo/p4ruby

about | contact  Other archives ( Real Estate discussion Medical topics )