Access to files for uncommitted changes
joejf
Posts: 13 Bronze 2
Is there any way to get access to the new or updated file for uncommitted changes?
In our company we peer review SQL code before submitting to version control (Perforce). Does anyone know of a way get access to the files before SQL Source commits them?
In our company we peer review SQL code before submitting to version control (Perforce). Does anyone know of a way get access to the files before SQL Source commits them?
Comments
C:\Documents and Settings\<loginName>\Local Settings\Application Data\Red Gate\SQL Source Control 3\WorkingBases
The WC folder names bear no relation to the project names but you can map them from here:
C:\Documents and Settings\<loginName>\Local Settings\Application Data\Red Gate\SQL Source Control 3\LinkedDatabases.xml
There may be a better approach than this.
I have considered re-pointing the paths in LinkedDatabases.xml to a regular working copy and although that does work, I do not know what the impact would be if changes were made in that WC as well as the dev database itself.
"Be wary of strong drink. It can make you shoot at tax collectors…and miss" Robert Heinlein
blog: http://datacentricity.net
twitter: @datacentricity
Something else I toyed with today is modifying CommandLineHooks.xml to convert the default changelist to a pending changelist for the commit command (instead of actually committing). I tried this with powershell for a quick test. This works but for some reason the powershell.exe process is not ending and I have to cancel the commit. But, before cancelling I can see in my Perforce client that the new changelist has been created with the correct files.
I think this approach could work.
<CommandLine>powershell -Command "p4 change -o | ForEach-Object { $_ -replace \"^<enter description here^>\", \"($Message)\" } | p4 change -i; exit"</CommandLine>
Product Manager
Redgate Software
You can modify the CommandLineHooks.xml to do nothing in the commit. This will just save the files to your working folder. You'll need to add them to the changelist and commit using your own tool.
You can also use the new link to "Working Folder" option. This option just scripts out the files and saves them to this folder from the commit tab. In SQL Source Control, the button on the commit tab is actually changed to say "Save." You would then use your own version control system's tool to add the files to the pending changelist and commit them.
Strange that the powershell is not exiting.
Cheers!
Stephanie Herr
SQL Source Control Product Manager
Stephanie M. Herr :-)
Product Manager Database DevOps