LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically retrieve revision # from Perforce?

I'm starting to use scc with Perforce, and I'm interested in programmatically determining the revision number in Perforce.  I found the property to retrieve LabVIEW's revision number (essentially how many times it has been saved), but I need to get Perforce's number.  Is there a way to do this?
0 Kudos
Message 1 of 6
(3,347 Views)
In LabVIEW 8.0, there are VIs located in the Programming>>Connectivity>>Source Control functions palette that you can use to get a file's source control properties. Typically, a dialog will come up that will display information about a file (which usually includes a version number).  If you have Perforce Command Line configured and enable supression of dialogs (by clicking the "Supress prompting dialog boxes" option via the Advanced button in Tools>>Source Control>>Configure Source Control), you will get information returned in the "status message" indicator of SCC File Properties.vi. In the returned message, you will get the field "haveRev" which specifies what version you currently have. You can write a VI that will parse the returned information to determine the revision number.
George M
National Instruments
Message 2 of 6
(3,342 Views)
Thank you, but unfortunately I am using labview 7.1.  Is there any similar vis in that version?  I can't seem to find them.
0 Kudos
Message 3 of 6
(3,331 Views)
You can take a look at the VIs under the <LabVIEW directory>\project \Source Code Control\_backend\P4\support directory. Keep in mind that the VIs that 7.1 use to interact with source control providers are not designed to be a public API. Modifying them will impact how the LabVIEW tools function.
George M
National Instruments
Message 4 of 6
(3,327 Views)
Thanks gmart.  I had some success using the P4 SCC File Hist GUI.vi
0 Kudos
Message 5 of 6
(3,311 Views)

hi,

 

i need to read the files from perforce depot, can you tell me which vis can able to use

Regards,
Balaji DP
0 Kudos
Message 6 of 6
(2,597 Views)