KibbeZero | 1 Jul 18:05 2011

Re: [p4] Update depot directory without individual file history


Posted on behalf of forum user 'KibbeZero'.

[http://forums.perforce.com/index.php?app=forums&module=forums&section=findpost&pid=2896]
JoeDG, on 2011/06/29 17:07:25 UTC, said:
>    We have a tool that automatically generates a large hierarchy of files. We need to store and version this
folder in Perforce, but don't want to have to worry about the file history/versioning of the individual
files. The generated files will change (Some will disappear, change names, change folders, etc) and
these details are not important to keep in the file history, but we do need to be able to revert to a
previously submitted version of this folder.
>   
>   Is this possible?
>   
>   I can think of two possible options, neither of which are clean or elegant:
>   
>   1) Perform p4 delete on all the files in the top-level folder, and then p4 add the entire folder again. I'm
not sure how well this would work (if at all), and it would be cumbersome (although it may be able to be scripted).
>   
>   2) Put the entire folder in a zip file, and store the zip in Perforce. We don't like this option for the
obvious overhead and trouble of zipping and unzipping whenever changes are made.
>   
>   Any other ideas?
>   

Instead of submitting the actual folder hierarchy, could you just generate a
file that represents the folder hierarchy (XML is great for this) that you
automated process can write to and generate from?

--
Please click here to see the post in its original format:
(Continue reading)

Patrick M Slattery | 1 Jul 18:40 2011

Re: [p4] Update depot directory without individual file history


Posted on behalf of forum user 'Patrick M Slattery'.

I'd certainly recommend submitting the process/script to recreate the folder
hierarchy rather than the folders themselves.
I like to think of it like a SQL database, would you prefer to have the master
SQL database itself or the SQL script that will generate that database?

--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/995-update-depot-directory-without-individual-file-history
_______________________________________________
perforce-user mailing list  -  perforce-user <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user

JoeDG | 1 Jul 19:35 2011

Re: [p4] Update depot directory without individual file history


Posted on behalf of forum user 'JoeDG'.

Thanks for all the replies.

First off: We do need the files, it's not just the folder structure
we're interested in... But we need to treat the folder (and files) as one
discrete unit.

I would imagine this is similar to how someone might handle versioning of
compiled code ready for distribution? How might you handle versioning the file
structure that would go on a CD before it is assembled into an iso image?

Here are some more details:

The folder in question consists of multiple files with many linkages between
files. (It's a LabVIEW deployment image, if you're familiar with
LabVIEW) When we build a new deployment image, the deployment application sets
the internal links between files, and writes the file hierarchy to a deployment
target folder. This folder is what we want to version. We aren't interested
in the file history of any of the individual files, because their
inter-dependency means that if one of them change, they all essentially change. 

The reason we want to version this deployment image (as opposed to just the
source code, which will be in Perforce as well) is that we need a record of the
deployed images. We need to be able to retrieve the image from a certain
revision if there are issues we need to investigate. The build process is tricky
enough that we don't want to rely on rebuilding the source to get exactly
the same deployed image. 

(Continue reading)

Stephen Vance | 1 Jul 20:10 2011

Re: [p4] Update depot directory without individual file history


Posted on behalf of forum user 'Stephen Vance'.

Joe, it sounds like you might want to do a normal import process on this, but
restrict the protections on that area so that only authorized users who are
expected to adhere to the right import process are allowed to write to the
directory tree. You could also put a trigger in place that disallowed submission
to the tree if there were other opened files under the tree in the workspace
that was submitting, pushing the process to keep all changes in the same
changelist, although that my not be precisely what you want.

Steve

--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/995-update-depot-directory-without-individual-file-history
_______________________________________________
perforce-user mailing list  -  perforce-user <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user

Matt Janulewicz | 1 Jul 20:32 2011

Re: [p4] Update depot directory without individual file history

"The build process is tricky enough that we don't want to rely on rebuilding the source to get exactly the
same deployed image."

Actually, this is exactly what you want to do. How do you expect to track and properly fix bugs if your
released build is not reproducible? That's a different thread, though.

Even if you don't submit releases in the same changelist you can apply a label. Steve's idea is better,
though. In some cases, like if you want to associate a release with specific code, your only choice might be
to use a label.

--
Matt Janulewicz
Lucasfilm Entertainment Company Ltd.

________________________________________
From: perforce-user-bounces <at> perforce.com [perforce-user-bounces <at> perforce.com] on behalf of
Stephen Vance [perforce-user-forum <at> forums.perforce.com]
Sent: Friday, July 01, 2011 11:10 AM
To: perforce-user <at> perforce.com
Subject: Re: [p4] Update depot directory without individual file history

Posted on behalf of forum user 'Stephen Vance'.

Joe, it sounds like you might want to do a normal import process on this, but
restrict the protections on that area so that only authorized users who are
expected to adhere to the right import process are allowed to write to the
directory tree. You could also put a trigger in place that disallowed submission
to the tree if there were other opened files under the tree in the workspace
that was submitting, pushing the process to keep all changes in the same
changelist, although that my not be precisely what you want.
(Continue reading)

Bobby Hartsfield | 1 Jul 21:39 2011

[p4] P4 "automatic" labeling

Hi All,

Typically, when I label using the p4 command, it goes something like this...

Step 1: get the most recent chagelist number with `p4 changes -m1
\\depot\...`

Let's say that returned changelist number 12345

Step 2: create the label with `p4 label [LabelName]`

That opens a .tmp text file with the label specs and I manually add a new
line to it with the changelist number from step 1:

Revision:	 <at> 12345

Then I save it and the label is done.

(this is all at the windows command line by the way).

I've been trying to think of a way to have that Revision line automatically
added to the label. I can easily generate the line I want with the following
command:

for /F "tokens=2 delims= " %c in ('P4 changes -m1 //depot/...') do (echo
Revision:  <at> %c)

And I can send the p4 label command to the screen  with -o instead of it
opening in a new notepad window but Im not sure where to go form there.

(Continue reading)

KibbeZero | 1 Jul 21:35 2011

Re: [p4] The road to JSAPI: From start to finish


Posted on behalf of forum user 'KibbeZero'.

I finally got my books and learned a lot about Javascript that was not
immediately obvious from the other documentation I was reading online (=== vs
==, how scope  actually  works, etc). I also found a site in two books called   
http://jslint.com.  Anyone use it? I ran my script as it is now and fixed a lot
of syntax no-nos (like not using ++). I know some of the things it catches help
prevent security holes, but does anyone think that a jslint-strict file be worth
the time in the end? I'd like to know some thoughts from others on this.

--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/957-the-road-to-jsapi-from-start-to-finish
_______________________________________________
perforce-user mailing list  -  perforce-user <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user

Ivey, William | 1 Jul 22:05 2011
Picon

Re: [p4] Update depot directory without individual file history

First question: Are there empty directories? Those can't be added to
Perforce so you'd need some mechanism to recreate them.

If there aren't any empty directories, here's the quick and dirty
method I've used. (You can refine this using p4 diff, but the
scripting is a little trickier.)

1. Sync the local directory from Perforce if it exists

2. Make all files in the local directory writable (or remove it)

3. Run the tool

4. Use find or something similar to get a list of all files now in the
    local directory.

5. Open all those files for editing, ignore errors about any not being
    in Perforce

6. Open all those files for add, ignore errors about already open for
    edit

7. Open all the files *from Perforce* for delete, ignore errors about
    being open for edit (this time you don't use the list from step 1,
    you are deleting files that aren't in that list)

8. Revert unchanged files (optional)

9. Submit the results

(Continue reading)

imsg | 2 Jul 03:09 2011
Picon

Re: [p4] (no subject)

Searching for useful information all day long is in the past! Everything you need is here!.. http://staracc.free.fr/sites.friend.php?reaolid=17em6
 		 	   		  
_______________________________________________
perforce-user mailing list  -  perforce-user <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user

JoeDG | 2 Jul 15:05 2011

Re: [p4] Update depot directory without individual file history


Posted on behalf of forum user 'JoeDG'.

Thanks everyone for the ideas. It looks like I'm thinking about this
incorrectly. I'll have to try out some of these ideas. Wm, thanks for taking
the time to post your process. This will help a lot.

Thanks again,
Joe

[http://forums.perforce.com/index.php?app=forums&module=forums&section=findpost&pid=2920]
Mailman Sync, on 2011/07/01 20:00:02 UTC, said:
>     Originally posted to the perforce-user mailing list by: Ivey, William
>   
>   
>   First question: Are there empty directories? Those can't be added to
>   Perforce so you'd need some mechanism to recreate them.
>   
>   If there aren't any empty directories, here's the quick and dirty
>   method I've used. (You can refine this using p4 diff, but the
>   scripting is a little trickier.)
>   
>   1. Sync the local directory from Perforce if it exists
>   
>   2. Make all files in the local directory writable (or remove it)
>   
>   3. Run the tool
>   
>   4. Use find or something similar to get a list of all files now in the
>   local directory.
(Continue reading)


Gmane