[p4ruby] fix for symlink-in-PWD problem

bob p4 jeffperforce at gmail.com
Mon Mar 10 08:59:32 PDT 2008

On Mon, Mar 10, 2008 at 10:31 AM, Tony Smith <tony at smee.org> wrote:
> Let's try that again, a wrong keypress sent the last response too soon.
>  On Friday 07 March 2008 19:36:49 bob p4 wrote:
> > On Fri, Mar 7, 2008 at 8:46 AM, Tony Smith <tony at smee.org> wrote:
> > >  Most of the time that's what's wanted. When it isn't, deleting PWD from
>  > > the environment usually solves the problem.
>  <snip>
>  > Do we have a philosophical disagreement?  I want to fix this problem
>  > for Joe Programmer once and for all.  Would you rather have Joe
>  > Programmer to run into the problem, become annoyed and spend time
>  > googling, after which he may POSSIBLY find the magic solution of
>  > ENV.delete("PWD")?  Joe Programmer includes me.  I want to help my
>  > future self.  Do you?
> I don't think this is a problem that can be solved once, for everyone; if it
>  was, I'd have done so long ago.

Why do you think that?  We clearly agree that deleting PWD works.
What is the problem?  If you were omniscient then you would have done
so long ago, but of course none of us are.

> > The above fix also has the advantage of not polluting ENV with a
>  > deleted PWD, which may be used by some other component.
>  I'm not a fan of the fix as it's been coded, but I'll take another look at the
>  problem and see if any better solutions come to light.

The "fix," "as it's been coded," is obviously a workaround for an end
user that wants the correct behavior immediately, without recompiling
P4.so.  The actual fix would be to p4.cpp.  However the workaround
shows exactly what to do: delete PWD from the environment, call into
perforce, then restore PWD if it previously existed.  If there is
something wrong with this plan then please tell us.


More information about the p4ruby mailing list