I have bumped into an extreme edge case. I need to have an Ableton project in our perforce, and Ableton does not have any kind of source control integration. For the project to function correctly, we need to have all of the raw samples in the perforce as well. These raw samples will not change, they will only ever be added or deleted.
Having to check out everything by hand to make sure it works properly will be a major problem since the amount of files will quickly grow. Because of this we would like to just check out the entire project and then submit the entire project (yes, besides reconcile offline work this is the best way we could think of). The problem is that this creates new revisions for the raw samples when there are no changes made to them.
Is it possible to set up the p4ignore file in such a way that it lets people add and delete these raw samples, but not change them.
As a bonus, but I highly doubt this is possible, is there a way to kind of reconcile offline work in real-time? I know that using reconcile offline work will minimize the amount of needless revisions, but it could cause some problems in terms of people forgetting to communicate and accidentally overwriting etc... so is there a way to kind of run the reconcile offline work command at regular intervals so that files get checked out as they are changed?
I have already asked our teachers and they told us to use Reconcile offline work, and to communicate with the team who needs the files that day. This is by far the best solution. This does leave room for error in a way that I think I should be able to circumvent with some clever programming / setup.
That's awesome you're using Ableton with Perforce. I've been interested in applications within music production, which usually doesn't have any version control.
Here are a few things to look at: Instead of trying to use an ignore file for your changes, I would recommend looking at the advanced tab of your workspace settings. There is a setting called On submit, which you can change from the default of "submit all selected files" to "Revert Unchanged Files." With that checked, it will compare all the submitted files and only create new revisions for ones that have actually changed. The only downside is that it can be a bit slow if you have a lot of files checked out because it is calculating md5 hashes for all the files to compare to what is on the server.
I agree with your teacher that using reconcile is probably a better workflow than checking out everything and then submitting it. Mostly because that means the server will more accurately know what files you are working on (and it will be faster, especially if you have the "Modtime" setting checked on your workspace). To run it regularly, there are a couple options to consider. One option is to work how you are currently and just write a super short script that runs the reconcile command. On Windows this could be a Powershell script or on Mac it would be a Bash script that just has a single line that says:
p4 -c <workspace_name> reconcile -ad <path/to/workspace/root>/...Where you replace <workspace_name> with your workspace and the <path...> with the location of your workspace. The
-adflag tells reconcile to only look for Add and Delete operations. You can also remove that part if you want it to check for edits as well. (Docs on p4 reconcile: https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_reconcile.html )Then in Windows Task Scheduler, you can set it up to run that script at a regular interval (however often you want). On Mac you would schedule it with the Automator app, which comes with MacOS.
But a potentially better option to look at is Helix Sync: https://www.perforce.com/products/helix-core-apps/helix-sync
In your case, basically, you could create a workspace like normal but set the workspace to "AllWrite" so the files aren't set to read-only. Then you run Helix Sync, login to your server, and the workspace should be selectable as long as it is AllWrite. Then Helix Sync will automatically monitor that folder and allows you to submit directly from there.
Hope that helps!