SQL Source Control - 3.1

SQL Source Control

Working with config files - SQL Source Control

SQL Source Control provides preset XML config files that enable you to automate source control operations for source control systems with a command line interface.

Commands in the config files

The preset config files include the following commands:

Get Latest

Updates the local working folder with latest version in source control.

Commit

Commits all changes in the local working folder to source control.

Add

Adds new files to the local working copy. Changes can then be committed to source control using the Commit command.

Edit

Makes the local working copy of the file(s) available for editing. Changes can then be committed to source control using the Commit command.

Delete

Deletes the file(s) from the local working copy. Changes can then be committed to source control using the Commit command.

Revert

Undoes changes if an error occurs during a commit.

Creating a custom config file

To create a config file for your source control system:

  1. On the Link to Source Control dialog box, select More as your source control system.
  2. Click Manage Config Files.
  3. Open Template.xml in your XML editor, and specify commands and verification codes for the source control actions you want to automate. Help is provided inside Template.xml.

    Note: Make sure you specify the name you want to use for the config file in the <Name> tag. For example:

    <Name>Darcs</Name>

To include multiple operations in a single command, separate them with &&. For example:

accurev add -c -d ($Files) && accurev keep -m && accurev promote –k

  1. Save your changes as a new XML file in the default config files folder:

    %USERPROFILE%\AppData\Local\Red Gate\SQL Source Control 3\CommandLineHooks

    Your config file is now available to select in SQL Source Control.

See also

Linking a database to source control

Source controlling data

Was this article helpful?

Search support
Forums

SQL Source Control

all SQL products

all products