[p4] Using current directory as client root?

Dave Lewis dlewis78731 at gmail.com
Thu Jan 17 11:24:53 PST 2008


yes, template client specs were used extensively.  In fact, I
attribute our lack of case problems to the use of client templates.
Or at least that's my suspicion.

anyway, I believe if you create the root directory for the client, and
cd to it, when you create a client from the template, the root becomes
the current directory by default. So editing the client spec would not
be necessary at all.

But, I'd *never* argue against having simple client specs!

dave

On Jan 17, 2008 11:53 AM,  <todd.benham at kodak.com> wrote:
> We strive for simple -- usually one line in client specs but I can relate
> to complex ones.
>
> Even so, you can use existing client spec as templates (or just create
> templates as needed). Then create a "transient" client spec from the
> existing template and substitute a new root into the form. In Python, this
> is pretty easy especially with P4Python. In windows batch files, you will
> need some search and replace utility such as SED to edit existing form
> files. If you create it new each time, you can "echo" all the lines in a
> form to a file that can be use with "p4 client -i" and make the root part
> a variable. I am sure there are more ways.
>
> Todd
>
>
>
> -----Original Message-----
> From: Dave Lewis [mailto:dlewis78731 at gmail.com]
> Sent: Thursday, January 17, 2008 12:20 PM
> To: Todd D. Benham
> Cc: perforce-user at perforce.com
> Subject: Re: [p4] Using current directory as client root?
>
>
> Not all client specs are so simple.  I kind of think we went overboard,but
> ours typically have about 25 to 100 or more mappings.
>
> dave
>
>
> On Jan 17, 2008 8:42 AM,  <todd.benham at kodak.com> wrote:
> > Coming from a VSS world, I would think any decent SCM tool would be
> > able to have something like
> >
> >         p4 get //depot/... C:\directory
> >
> > but I suppose "all hell would break out" and nobody would use client
> > specs anymore.
> >
> > I have been "beaten down" to now believe it is pretty easy to write
> > the script to create a workspace on the fly (and then delete it if it
> > is not reusable).
> >
> > I have a workspace that is simply used to keep a "shadow" copy (a VSS
> > feature) of the tips for example. I create it and just leave it laying
> > around to be sync'd once a day.
> >
> > The thing that still gets me about the Perforce Way is that *everyone*
> > needs to invent the same scripts (more or less). Why not support some
> > basic scripts in the toolset?
> >
> >
> > Todd
> >
> >
> >
> > -----Original Message-----
> > From: perforce-user-bounces at perforce.com
> >
> > [mailto:perforce-user-bounces at perforce.com] On Behalf Of
> > smith_roy at emc.com
> > Sent: Wednesday, January 16, 2008 10:48 PM
> > To: Robert Cowham
> > Cc: 'Perforce User'
> > Subject: Re: [p4] Using current directory as client root?
> >
> >
> > Yeah, this sounds like mostly what I'm looking for.  It's still
> > annoying that you have to create a transient clientspec, though.
> >
> >
> > On Jan 16, 2008, at 7:06 PM, Robert Cowham wrote:
> >
> > > Sounds like that might be addressed by:
> > >
> > > http://www.perforce.com/perforce/doc.072/user/relnotes.txt
> > >
> > > Release 2007.2.
> > >
> > > Major new functionality in 2007.2
> > >
> > > New 'p4 sync' option bypasses db.have updates - #111247 **
> > >
> > >           'p4 sync' now sports a '-p' option.  This allows the user to
> > >           sync files without the server keeping track of it.  This
> > >           option is very useful when populating  build clients or when
> > >           publishing content when there is no requirement for saving
> > >           the client workspace state.
> > >           (Bug #22857).
> > >
> > > This would require the "create temporary client hack", but perhaps
> > > solve the problem??
> > >
> > > Robert
> > >
> > >> -----Original Message-----
> > >> From: perforce-user-bounces at perforce.com
> > >> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Roy Smith
> > >> Sent: 16 January 2008 19:58
> > >> To: Perforce User
> > >> Subject: [p4] Using current directory as client root?
> > >>
> > >> I have a requirement (as part of our build system) to be able to
> > >> get a set of files from the repository and have them written to any
> > >> arbitrary directory.  Because the root path is embedded in the
> > >> client spec, there doesn't seem to be any way to do this.
> > >>
> > >> We've played with all sorts of hacks.  We can create a symlink from
> > >> the root path embedded in the client to where we really want the
> > >> files.  We can create and destroy temporary client specs on the
> > >> fly. But all these seem like hacks.  Surely there must be some
> > >> simple way to say, "just put the files HERE".
> > >>
> > >> We don't need the workspace to be managed by perforce.  We'll never
> > >> want to edit the files there, or submit any changes from there.  We
> > >> just want a read-only copy of the source tree so we can build it.
> > >
> > >
> >
> > -------------------
> > Roy Smith <smith_roy at emc.com>
> > Software Guy, EMC Common Management Group
> > 44 South Broadway, 7th floor
> > White Plains, NY 10601
> > (914) 580-3427
> > AIM: roysmith649 _______________________________________________
> > perforce-user mailing list  -  perforce-user at perforce.com
> > http://maillist.perforce.com/mailman/listinfo/perforce-user
> >
> > _______________________________________________
> > perforce-user mailing list  -  perforce-user at perforce.com
> > http://maillist.perforce.com/mailman/listinfo/perforce-user
> >
>



More information about the perforce-user mailing list