[line 200]
Subversion Merge command manager class
Apply the differences between two sources to a working copy path.
From 'svn merge --help':
usage: 1. merge sourceURL1[@N] sourceURL2[@M] [WCPATH] 2. merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH] 3. merge -r N:M SOURCE [WCPATH]
- In the first form, the source URLs are specified at revisions
N and M. These are the two sources to be compared. The revisions
default to HEAD if omitted.
2. In the second form, the URLs corresponding to the source working copy paths define the sources to be compared. The revisions must be specified.
3. In the third form, SOURCE can be a URL, or working copy item in which case the corresponding URL is used. This URL, at revisions N and M, defines the two sources to be compared.
WCPATH is the working copy path that will receive the changes. If WCPATH is omitted, a default value of '.' is assumed, unless the sources have identical basenames that match a file within '.': in which case, the differences will be applied to that file.
Conversion of the above usage examples to VersionControl_SVN_Merge:
Example 1: <?php
require_once 'VersionControl/SVN.php';
// Set up runtime options. Will be passed to all
// subclasses.
$args = array(
'svn://svn.example.com/repos/TestProj/trunk/example.php@4', // sourceurl1
'svn://svn.example.com/repos/TestProj/branch/example.php@15', // sourceurl2
'/path/to/working/copy' // wcpath
);
try {
}
?>
Example 2: <?php
require_once 'VersionControl/SVN.php';
// Set up runtime options. Will be passed to all
// subclasses.
$args = array(
'/path/to/working/copy/trunk/example.php@4', // wcpath1
'/path/to/working/copy/branch/example.php@15' // wcpath2
);
try {
}
?>
Example 3: <?php
require_once 'VersionControl/SVN.php';
// Set up runtime options. Will be passed to all
// subclasses.
$switches = array('r' => '5:8');
$args = array('svn://svn.example.com/repos/TestProj/trunk/example.php');
try {
}
?>
$switches is an array containing one or more command line options defined by the following associative keys:
$switches = array(
'r [revision]' => 'ARG (some commands also take ARG1:ARG2 range)
A revision argument can be one of:
NUMBER revision number
"{" DATE "}" revision at start of the date
"HEAD" latest in repository
"BASE" base rev of item's working
copy
"COMMITTED" last commit at or before BASE
"PREV" revision just before COMMITTED',
// either 'r' or 'revision' may be used
'q [quiet]' => true|false,
// print as little as possible
// try operation but make no changes
'force' => true|false,
// force operation to run
'N' => true|false,
// operate on single directory only
'non-recursive' => true|false,
// operate on single directory only
'diff3-cmd' => 'ARG',
// use ARG as merge command
'ignore-ancestry' => true|false,
// ignore ancestry when calculating merges
'username' => 'Subversion repository login
',
'no-auth-cache' => true|false,
// Do not cache authentication tokens
'config-
dir' => 'Path to a Subversion configuration directory'
);
Note: Subversion does not offer an XML output option for this subcommand
The non-interactive option available on the command-line svn client may also be set (true|false), but it is set to true by default.