Usage of ignore files
Posted 15 July 2013 - 03:08 PM
Also, we want to be able to ignore files by directory, meaning we can have it behave as if a directory did not exist in the solution folder, or to filter out certain files within that directory.
ProjectName/bin (ignore entire directory and don't add to the repo)
/*Resharper.*/ (for directories with a matching name, ignore entire directory and don't add to repo)
/_UpgradeReport_Files/*.* (add directory to repo and ignore all files within it)
/Backup/*.htm* (ignore all matching files within this directory only)
We're also not clear on how much wildcard support to expect. This is how most SCM's I've used behave. Having to blacklist all files by extension, then whitelist all the exceptions seems very primitive and awkward.
Sorry, we did google extensively but didn't come up with these answers; we don't care to spend all morning creating, managing, testing, and deleting fake solutions just to find out how things work.
Posted 15 July 2013 - 07:06 PM
We originally used the Git syntax so that people could user their ignore files for both systems. The Git syntax has changed a bit since then though. It also looks like some of our behavior is less than desirable; we don't handle wildcards in directories as well as I would hope. With your cases above, we can't handle the 2nd one; wildcards apparently won't match a directory alone. I was able to successfully ignore your other examples though. We also don't use the leading '/'. I can post a sample ignore file if that would help.
Posted 15 July 2013 - 07:20 PM
Posted 15 July 2013 - 09:25 PM
mac-matt:ignoreTest matt $ p4 set P4CLIENT=matt-mac-matt (config) P4CONFIG=p4.config (config '/Users/matt/clients/test/play1999/p4.config') P4IGNORE=p4.ignore P4PORT=qaplay:1999 (config) P4USER=matt (config) mac-matt:ignoreTest matt $ cat p4.ignore ProjectName/bin _UpgradeReport_Files/*.* Backup/*.htm* Backup/*someString mac-matt:ignoreTest matt $ ls -R Backup ProjectName _UpgradeReport_Files p4.ignore ./Backup: asdf.htmlol qwerty.html trololololololsomeString ./ProjectName: bin src ./ProjectName/bin: ./ProjectName/src: foo.js ./_UpgradeReport_Files: bar.jpg foo.txt mac-matt:ignoreTest matt $ p4 status ProjectName/src/foo.js - reconcile to add //depot/matt/ignoreTest/ProjectName/src/foo.js#1
The 'p4 status' at the ends show that only the one .js file which is not configured to be ignored is added, so all appears to be well. One thing to note is the file can have any extension you want. I use 'p4.ignore' across all my various platforms.
Posted 16 July 2013 - 11:27 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users