[p4] How to make a clientspec which syncs only to a given tag

Weintraub, David david.weintraub at bofasecurities.com
Tue Aug 22 06:02:52 PDT 2006


Not so fast!

There is a way (sort of) to make this happen: You can create a branch
with the spec you want to use, and set your client to sync to that
branch.

For example, you want to define a view like this:

    View: myview
    Description:
	    A view that is locked to label REV_1.0
    Root:  C:\p4clients\myview
    Views:
	    //depot/Foo/MAIN/... at REV_1.0  //myview/....

Instead, you do this:

    $ p4 integrate //depot/Foo/MAIN/... //depot/Foo/REV_1.0/...

Add this line to the protection table:

    read group all * //depot/Foo/REV_1.0/...

And set your Client to look like this:

    View: myview
    Description:
	    A view that is locked to label REV_1.0
    Root:  C:\p4clients\myview
    Views:
	    //depot/Foo/REV_1.0/...  //myview/....

Yes, it wasn't quite what you have in mind, but it is a viable solution
to the problem. Creating a branch via the "integrate" command doesn't
increase the size of the depot's file storage space (although it does
make the depot's database a bit bigger). Also remember that Subversion
doesn't make a distinction between branches and labels. In Subversion
making a branch looks like this:

    $ svn cp Foo/trunk Foo/branches/REV_1.0

And, making a label looks like this:

    $ svn cp Foo/trunk/ Foo/tags/REV_1.0

The sole difference (in case you missed it) is that Subversion branches
are on the "branches" directory while Subversion labels are on the
"tags" directory.

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of William Deegan
Sent: Monday, August 21, 2006 3:44 PM
To: Stephen Vance
Cc: perforce-user at perforce.com
Subject: Re: [p4] How to make a clientspec which syncs only to a given
tag

On 8/21/06, Stephen Vance <steve at vance.com> wrote:
>
>  Sorry, Bill. There is no way to make a client spec that will always 
> sync to the same revision specifications. That functionality is only 
> in the sync command. The client spec only specifies the mapping 
> relationship between the workspace and the repository, not the actual
revision selection.

O.k. so thats something which can be done with CVS and Clearcase, but
not with perforce.
Bummer.

-Bill


>  Steve
>
>
>  William Deegan wrote:
>  On 8/17/06, briancolfer at comcast.net <briancolfer at comcast.net> wrote:
>
>
>  I know what you mean default sync behavior would get a labeled 
> version. But this doesn't exclude the ability to still sync an
arbitrary version.
>
>  So p4 sync would always sync to label XYZ.
> But if I did a p4 sync @10000 it would sync to that changelist?
>
> -Bill
>
>
>
>  Sent via BlackBerry from Cingular Wireless
>
> -----Original Message-----
> From: "William Deegan" <bdbaddog at gmail.com>
> Date: Thu, 17 Aug 2006 19:05:20
> To:briancolfer at comcast.net, perforce-user at perforce.com
> Subject: Re: [p4] How to make a clientspec which syncs only to a given

> tag
>
>
>
>  So it would be a read only client?
>
>  Well the idea is the client would always have only files with that
label.
> I could move the label, and syncing would bring it up to date.
>
> In this case say for building Version 1.x of a tool.
>
> -Bill
>
>
>
>
>  -----Original Message-----
> From: "William Deegan" <bdbaddog at gmail.com>
> Date: Thu, 17 Aug 2006 13:29:39
> To:perforce-user at perforce.com
> Subject: [p4] How to make a clientspec which syncs only to a given tag
>
> Greetings,
>
> Is there a way to make a clientspec with a tag in it.
>
> //depot/blah/... at MY_LABEL //bill/blah/...
>
> So this client would stay synced to the label?
>
> Thanks,
> Bill
> _______________________________________________
> 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
>
>
>
>
_______________________________________________
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