Discussion:
[p4] shelved-files
amir
2011-04-14 19:15:01 UTC
Permalink
Posted on behalf of forum user 'amir'.

Hi All,

When file(s) are shelved on p4 server, where are they stored exactly? Does
anyone know? I've been looking at online docs but not been able to find
anything
I know depot files can be mapped to be kept in /RCS but I'm not sure where
shelved files are kept on the server. Are they on the location as the depot
files?
I think it would be important to know so we can create policies and best
practice regarding shelved files.

Thanks,
Amir



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
Michael Mirman
2011-04-14 20:06:01 UTC
Permalink
> Does anyone know?

Yes.
They are in the usual archive location - something like
Your-archive-path/some-directory/your-file,d/1.256381.gz

The number you see at the end is the change number.

I'm not sure how it helps you set the policies.

--
Michael Mirman
MathWorks, Inc.
508-647-7555


> -----Original Message-----
> From: perforce-user-***@perforce.com [mailto:perforce-user-
> ***@perforce.com] On Behalf Of amir
> Sent: Thursday, April 14, 2011 3:15 PM
> To: perforce-***@perforce.com
> Subject: [p4] shelved-files
>
>
> Posted on behalf of forum user 'amir'.
>
> Hi All,
>
> When file(s) are shelved on p4 server, where are they stored exactly?
> Does
> anyone know? I've been looking at online docs but not been able to find
> anything
> I know depot files can be mapped to be kept in /RCS but I'm not sure
> where
> shelved files are kept on the server. Are they on the location as the
> depot
> files?
> I think it would be important to know so we can create policies and
> best
> practice regarding shelved files.
>
> Thanks,
> Amir
>
>
>
> --
> Please click here to see the post in its original format:
> http://forums.perforce.com/index.php?/topic/868-shelved-files
> _______________________________________________
> perforce-user mailing list - perforce-***@perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
Mark Allender
2011-04-14 20:20:01 UTC
Permalink
Posted on behalf of forum user 'Mark Allender'.

Shevled files are stored in the repository in the same location where the
original file is stored. If you look in the ",d" directory there will
be a file with 1.<changelist>.gz where <changelist> is the
changelist # where the shelved file resides. Note that for text files that are
stored with deltas, the ",d" directory should only hold the shelved
versions of those files. For binary files (or other files whose revisions are
stored in full), the ",d" folder contains both the revisions of the
file that have been checked into the depot as well as shelved versions of the
files. Here is an example:


d:\projects\ctg\sandbox\mark.allender>p4 filelog
level_mesh_crunch_wd.exe
//ctg/sandbox/mark.allender/level_mesh_crunch_wd.exe
... #2 change 807494 edit on 2010/12/10 by ***@client-mark.allender
(binary+lx) 'testing '
... #1 change 807488 add on 2010/12/10 by ***@client-mark.allender
(binary+lx) 'testing '


d:\projects\ctg\sandbox\mark.allender>p4 describe -S -s
864411
Change 864411 by ***@client-mark.allender on 2011/04/14 15:15:05
*pending*

<saved by Perforce>

Shelved files ...

... //ctg/sandbox/mark.allender/level_mesh_crunch_wd.exe#2 edit


And in the repository:


***@volipf02:/perforce/netapp/depots/ctg/sandbox/mark.allender/level_mesh_crunch_wd.exe,d>
ls -l
total 4080
-rw-r--r-- 1 perforce p4admin 1389792 2011-01-29 01:48 1.807463.gz
-rw-r--r-- 1 perforce p4admin 1389792 2011-01-29 01:48 1.807491.gz
-rw-r--r-- 1 perforce p4admin 1389792 2011-04-14 15:15 1.864411.gz

HTH



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
TeresaK
2011-04-14 20:45:01 UTC
Permalink
Posted on behalf of forum user 'TeresaK'.

One note: if you choose to DELETE the shelved files, they're gone from the
archived depot files (as if you obliterated them).



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
amir
2011-04-14 21:00:01 UTC
Permalink
Posted on behalf of forum user 'amir'.

Thanks for the answer guys.

Knowing this information will help with setting up some policies regarding
shelving. Before each dev cycle, we plan for perforce disc space growth during
the cycle and grow the storage during the cycle. But if everyone on one of our
dev teams shelves huge number of large files (especially binary files) or entire
code lines, we will be in trouble.
That is why we are going to set policies around number, size and age of a
shelved files. Not sure where to start at detailed level but I think knowing
where the shelved rcs files are stored is starting place. I'm wondering if
anyone else has thought about this and what they came up with :)

-Amir



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
Ivey, William
2011-04-14 21:11:54 UTC
Permalink
I would think all the information you need is available through
the command line. No need to look into the depot unless you
suspect the files aren't actually being removed (which would be
a bug).

You can find out which files were shelved, estimate their age
and remove the old ones from the command line with superuser
permissions.

-Wm

-----Original Message-----
From: perforce-user-***@perforce.com [mailto:perforce-user-***@perforce.com] On Behalf Of amir
Sent: Thursday, April 14, 2011 4:00 PM
To: perforce-***@perforce.com
Subject: Re: [p4] shelved-files


Posted on behalf of forum user 'amir'.

Thanks for the answer guys.

Knowing this information will help with setting up some policies regarding
shelving. Before each dev cycle, we plan for perforce disc space growth during
the cycle and grow the storage during the cycle. But if everyone on one of our
dev teams shelves huge number of large files (especially binary files) or entire
code lines, we will be in trouble.
That is why we are going to set policies around number, size and age of a
shelved files. Not sure where to start at detailed level but I think knowing
where the shelved rcs files are stored is starting place. I'm wondering if
anyone else has thought about this and what they came up with :)

-Amir



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
Matt Janulewicz
2011-04-14 21:16:34 UTC
Permalink
I've thought about this. We purchased servers with bigger disks. 10 seconds of effort to thwart perhaps hours and days of lost work, or people unable to properly work. Time is money, my friend. Spend wisely. :)

--
Matt Janulewicz
Lucasfilm Entertainment Company Ltd.


________________________________________
From: perforce-user-***@perforce.com [perforce-user-***@perforce.com] on behalf of amir [perforce-user-***@forums.perforce.com]
Sent: Thursday, April 14, 2011 2:00 PM
To: perforce-***@perforce.com
Subject: Re: [p4] shelved-files

Posted on behalf of forum user 'amir'.

Thanks for the answer guys.

Knowing this information will help with setting up some policies regarding
shelving. Before each dev cycle, we plan for perforce disc space growth during
the cycle and grow the storage during the cycle. But if everyone on one of our
dev teams shelves huge number of large files (especially binary files) or entire
code lines, we will be in trouble.
That is why we are going to set policies around number, size and age of a
shelved files. Not sure where to start at detailed level but I think knowing
where the shelved rcs files are stored is starting place. I'm wondering if
anyone else has thought about this and what they came up with :)

-Amir



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
amir
2011-05-06 21:15:01 UTC
Permalink
Posted on behalf of forum user 'amir'.

Michael Mirman: "We have such a script for old pending changes. Since
shelved changes are pending, they get included in the report
automatically."

Micheal,

I just wanted to let you know that although shelved files are part of pending
change lists, you can shelve files today into "old" pending
changelists from months ago. You may want to double check your scripts your
scripts since the date-time for the pending changelist represents when the
pending changelist was created and not when files were put on shelf. The only
way we can think of to get shelved-file creation date/time, is to look up file
signatures via system calls.

p4 changes -t -s shelved --> returns changelist# of all pending changelists
containing shelves
p4 describe -S -s changelist# --> returns changelist information and path to
shelved files.

If you look at the schema for 2009.2 @
http://www.perforce.com/perforce/doc.092/schema/#db.revsh , I do see field
"modTime - Date when file was opened and added to the pending
changelist" in "db.workingx - Records for shelved open files".
I'm just not sure what command/command option provides the data collected in
this filed :(



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
Michael Mirman
2011-05-07 00:49:57 UTC
Permalink
> I just wanted to let you know that although shelved files are part of
> pending change lists, you can shelve files today into "old" pending
> changelists from months ago. You may want to double check your scripts
...

You are absolutely right.
Just today I was sitting with someone looking at what we can get from describe -S, and the time is really the time when the change was created (as far as I could see). I thought the time stamp would change when user reshelves it, but it doesn't.

> If you look at the schema for 2009.2 @
> http://www.perforce.com/perforce/doc.092/schema/#db.revsh , I do see field
> "modTime - Date when file was opened and added to the pending
> changelist" in "db.workingx - Records for shelved open files".
> I'm just not sure what command/command option provides the data collected
> in this field :(

You're right.
-ztag gives you a digest for each file, so if you have all digests you collected at some time in the past and then you get them again, you can detect that something has changed.
You still don't know how and when exactly it changed, but you know something has changed.

--
Michael Mirman
The MathWorks, Inc. Tel: (508) 647-7555
3 Apple Hill Drive, Natick, MA 01760-2098
Scivally
2011-06-07 13:35:01 UTC
Permalink
Posted on behalf of forum user 'Scivally'.

The ability to report the 'last update date' on each shelved file has
been submitted as an RFE during the 2011 Perforce User Conference



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
Michael Mirman
2011-06-07 14:12:51 UTC
Permalink
Is RFE "Request For Extension" or "Request For Evidence"?

We would be interested in having the "last update date" for each file.
I probably missed this discussion at the conference.

--
Michael Mirman
MathWorks, Inc.
508-647-7555


> -----Original Message-----
> From: perforce-user-***@perforce.com [mailto:perforce-user-
> ***@perforce.com] On Behalf Of Scivally
> Sent: Tuesday, June 07, 2011 9:35 AM
> To: perforce-***@perforce.com
> Subject: Re: [p4] shelved-files
>
>
> Posted on behalf of forum user 'Scivally'.
>
> The ability to report the 'last update date' on each shelved file has
> been submitted as an RFE during the 2011 Perforce User Conference
>
>
>
> --
> Please click here to see the post in its original format:
> http://forums.perforce.com/index.php?/topic/868-shelved-files
> _______________________________________________
> perforce-user mailing list - perforce-***@perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
Andrew reynolds
2011-06-07 15:25:01 UTC
Permalink
Posted on behalf of forum user 'Andrew reynolds'.

Request for Enhancement




[http://forums.perforce.com/index.php?app=forums&module=forums&section=findpost&pid=2724]
Mailman Sync, on 2011/06/07 14:15:01 UTC, said:
> Originally posted to the perforce-user mailing list by: Michael Mirman
>
>
> Is RFE "Request For Extension" or "Request For Evidence"?
>
> We would be interested in having the "last update date" for each file.
> I probably missed this discussion at the conference.
>
> --
> Michael Mirman
> MathWorks, Inc.
> 508-647-7555
>
>
>
>
> _______________________________________________
> perforce-user mailing list - perforce-***@perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
Michael Mirman
2011-06-07 15:51:00 UTC
Permalink
> Request for Enhancement

Ah! Makes sense. ;)

So, was this request accepted?

--
Michael Mirman
MathWorks, Inc.
508-647-7555


> We would be interested in having the "last update date" for each file.
> I probably missed this discussion at the conference.
Scivally
2011-06-07 17:45:01 UTC
Permalink
Posted on behalf of forum user 'Scivally'.

Yes. I have to follow up this week to get the actual RFE #...



[http://forums.perforce.com/index.php?app=forums&module=forums&section=findpost&pid=2728]
Mailman Sync, on 2011/06/07 15:45:02 UTC, said:
> Originally posted to the perforce-user mailing list by: Michael Mirman
>
>
> Ah! Makes sense. ;)
>
> So, was this request accepted?
>
> --
> Michael Mirman
> MathWorks, Inc.
> 508-647-7555
>



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/868-shelved-files
Michael Mirman
2011-04-14 21:18:54 UTC
Permalink
Very interesting point.
We have thought about the age, but not the rest.
For the age, we don't have to go after archive files. We can get it the date from "p4 changes".
I think it's a good idea to have an auditing script that checks for "old" shelved changes.
We have such a script for old pending changes. Since shelved changes are pending, they get included in the report automatically.
We haven't enforced any policy yet in this regard (except for empty pending changes, which do get removed after some time), but we may have to become stricter as more and more users move to Perforce.

--
Michael Mirman
MathWorks, Inc.
508-647-7555


> -----Original Message-----
> From: perforce-user-***@perforce.com [mailto:perforce-user-
> ***@perforce.com] On Behalf Of amir
> Sent: Thursday, April 14, 2011 5:00 PM
> To: perforce-***@perforce.com
> Subject: Re: [p4] shelved-files
>
>
> Posted on behalf of forum user 'amir'.
>
> Thanks for the answer guys.
>
> Knowing this information will help with setting up some policies
> regarding
> shelving. Before each dev cycle, we plan for perforce disc space growth
> during
> the cycle and grow the storage during the cycle. But if everyone on one
> of our
> dev teams shelves huge number of large files (especially binary files)
> or entire code lines, we will be in trouble.
> That is why we are going to set policies around number, size and age of
> a shelved files. Not sure where to start at detailed level but I think
> knowing
> where the shelved rcs files are stored is starting place. I'm wondering
> if anyone else has thought about this and what they came up with :)
>
> -Amir
>
>
>
> --
> Please click here to see the post in its original format:
> http://forums.perforce.com/index.php?/topic/868-shelved-files
> _______________________________________________
> perforce-user mailing list - perforce-***@perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
Loading...