Brian
8bb78e7c02
Changed output a little bit. Also just realized it actually should be easy to parse `p4 fstat ...`, I just need to crab the clientFile output, and this script should be sped up substantially. I need to figure out the best way to break this down, don't want it to be called on a huge directory, but each subdirectory to split up the work. That said, that would miss the top level files. A good alternative to not waiting is to see if I can grab the process output while it's working, instead of waiting for it to be done. This would actually work perfectly; it's just tricky trying to figure out if I can break this up. This would also still delay the start of the script. Could do a mix of local and tree based fstat. Start with local and switch to the tree. |
||
---|---|---|
README.md | ||
p4RemoveUnversioned.py |
README.md
p4RemoveUnversioned
Removes unversioned files from perforce repository. Script is in beta, though it works. It will be undergoing changes to add thread support to see how much we can speed up searching; depends a lot on your storage device. I will then also try seeing if I can reduce the calls to fstat a bit, it will be a bit more complicated.
This script does parse .p4ignore ignore files, compiles the fields as regex, and scans every directory and file against the local and parent .p4ignore files. This is my first time doing something like this, and I just realized this isn't actually correct; I need to update how things are ignored to follow the spec, since it's not straight up regex.
Files are currently permanently deleted, so use this at your own risk.