Jump to content


P4EXP submit and label on folder

P4EXP P4V

  • Please log in to reply
3 replies to this topic

#1 TomMalfrere

TomMalfrere

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 14 February 2018 - 10:06 AM

Hi,

We would like to put our product documentation into perforce source control. But we don't burden the people editing the documentation with learning to work with P4V.

As a test we've installed P4EXP. This allows us to add the documentation files (Latex) to P4. We can even add a whole folder to P4 and checkout a folder.
What we mis, submitting a whole folder. When we have a folder with checked out and edited files, we would like to do a submit of the whole folder, just add a changelist description and submit it.

Simply put: right-click on folder => submit => type description => OK

We would like to have similar thing to add a label

A very basic version of P4V would also be an option.
All it needs to do is:
- checkout a folder
- submit folder => add new files (predefined set of extension) + submit changed files + delete removed files
- Label all files in a folder

We thought about writing a .bat file but then the documentation editors would have open dos-box first, type a command and even then all kinds of things could go wrong.

Tom

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1148 posts

Posted 16 February 2018 - 05:37 PM

Unfortunately neither P4EXP nor P4V are open source, but if you're on Windows you could look at P4Win -- I'm sure it'd be reasonably easy to just comment out the panes you don't want.  :D  https://swarm.worksh...software-p4win/

#3 p4rfong

p4rfong

    Advanced Member

  • Staff Moderators
  • 343 posts

Posted 17 February 2018 - 01:46 AM

Another less beautiful way would be to create a batch file that runs cmd.exe that can prompt for the information needed as seen in
https://stackoverflo...-in-another-com

For example:

1. Create a file opencmd.bat
cmd.exe /c C:\Users\perforce\mycmd.bat

2. Create a file C:\Users\perforce\mycmd.bat

@echo off
set /p id="Enter ID: "
cls
echo You typed in %id%
pause

3. Place opencmd.bat on the Desktop.

4. Note that clicking on this brings up a command prompt where a user sees:
C:\Users\rfong\Desktop>cmd /c C:\Users\perforce\mycmd.bat
Enter ID:

Instead of an ID, the user can type in a directory name, and commands can be run to change to the proper directory and open the files for edit.   A different command can label the files, and submit.  The scripts can be changed so the script accesses a network drive.  Hopefully this can make it easy for users to perform Perforce functions.

#4 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 224 posts
  • LocationSan Diego, CA

Posted 20 February 2018 - 08:25 PM

View PostSambwise, on 16 February 2018 - 05:37 PM, said:

Unfortunately neither P4EXP nor P4V are open source, but if you're on Windows you could look at P4Win -- I'm sure it'd be reasonably easy to just comment out the panes you don't want.  :D  https://swarm.worksh...software-p4win/

Yikes! Don't do that! If you're going to consider something that insa.... ah, drastic, you may as well dig up P4 Commons:

https://www.perforce...user/index.html

If the label part is standardized you might consider a trigger to slap a label on the directory being submitted.

If you could indulge me running well off course from the original question, I personally don't like labels for things that are thought of as permanent records of a set of files. Labels by nature are editable and changeable over time, so I prefer the branch+change nomenclature for referring to revisions of things that need to be referred back to for the rest of time. You have no way of knowing if a label that was made/applied 10 years ago is correct or consistent, but (except under extreme circumstances from an admin), branches+changes are pretty much permanent and immutable. If you've ever been audited for PCI or by the FDA, and the auditor is well-versed with source control, they'd never accept a label or tag as a valid reference to code. You may not be in that stringent of an environment, but I've been bit by labels that had been moved/reapplied years prior and don't match up to what the bug reports, etc. (should have) referred to at the time. So maybe I have an unreasonable bias against labels. :)
-Matt Janulewicz
Currently unemployed, looking for work in Boise, ID!





Also tagged with one or more of these keywords: P4EXP, P4V

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users