4 messages in com.perforce.perforce-userDonation: Perl script to find local f...| From | Sent On | Attachments |
|---|---|---|
| Greg...@relay.engr.SGI.COM | 18 Jun 1997 19:02 | .pl |
| Davi...@rivatech.com | 19 Jun 1997 06:45 | |
| Matt...@geoworks.com | 19 Jun 1997 15:55 | |
| Greg...@relay.engr.SGI.COM | 19 Jun 1997 16:06 |
| Subject: | Donation: Perl script to find local files.![]() |
|---|---|
| From: | Greg...@relay.engr.SGI.COM (Greg...@relay.engr.SGI.COM) |
| Date: | 06/18/1997 07:02:05 PM |
| List: | com.perforce.perforce-user |
| Attachments: |
In the interest of being a good Perforce citizen, I'd like to donate to the community my Perl script that finds local files that are local and not already open for "add" on the client.
It hasn't got any limitations, I don't think, other than the following:
- you need Perforce 97.2 or later (because of the "where" command). - you need Perl5 - you need a unix-like "find" command for it to work on the PC. (I use the Cygnus one: http://www.cygnus.com/misc/gnu-win32/) - if you have a funky client spec, it may act a little weird. (i.e. if you have a client spec that maps part of the depot onto a directory that is below a directory that is also mapped to someplace on the depot, it will probably do weird things (that might not even be legal from p4's standpoint, but I don't know)). - if you use ksh or bash, and you get to your client dir via a symbolic link, then specifying the directory may not work right (since perl knows only about the absolute path, and Perforce uses the PWD environment variable to figure out the working directory, so you probably set the symbolic path in your client spec -- whatever). If it doesn't work to specify a path, then cd there first and don't specify the path.
I don't want (and my manager doesn't want me) to be supporting this, so don't expect it, but you can do what you want with it, and if I find a henous error, I'll probably let you know...
Usage is as follows:
usage: p4unknown.pl [-h] [-q] [-v] [<dir>] -h print this message -q quiet mode -- no output, just return status (1 if it found files, 0 if not) -v verbose mode -- extra progress output <dir> this is the directory where p4unknown.pl starts looking for files. If this argument is not given then it starts in the current directory.
I've tested it on Windows/NT 4.0 and IRIX 6.3. If it works other places, you should be happy about it.
Enjoy!
-Greg.
P.S. If you folks at Perforce want to pick this up and maintain it, I'm not going to stop you... :-)
--- Greg Spencer, Software Engineer Cosmo Software, A Silicon Graphics Company mailto:gspencer at sgi.com http://reality.sgi.com/gspencer/





.pl