0
votes

I'm using a single depot containing multiple projects stored in a directory-file structure. Each project can have multiple revisions, assigned outside of Perforce, e.g. A, B, C...

In Perforce (command line) I would like to assign these revision codes to corresponding perforce versions/changes, so that I can easily look up commits from each revision etc. Multiple commits (changelists) can be attributed to each revision code.

My first thought was to somehow tag the files/changelists/? using labels called "A", "B", "C", etc., but as a given label can only be assigned to one version of a given file this would mean only one commit (the latest?) would be tagged for each revision. Plus, I'm not sure this would work for multiple projects.

So, is there a relatively simple way to achieve this within perforce?

1
It would help to know what you want to be able to accomplish with this custom code -- e.g. (as the simplest example) would a flat text file listing all the file revisions suffice, and if not, what operations are you trying to support that you could not support with a flat file? - Samwise

1 Answers

0
votes

Perforce File Attributes may allow you to achieve what you want, as they can be propagated to future revisions and allow you to set per revision attributes.

More information about them can be found here:

http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_attribute.html

You can't parse a changelist number to this command, but a bit of scripting could get you the revision numbers for files in particular changelist, which you could then tag with a particular attribute.

Hope this helps, Jen.