mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-08 22:40:23 +01:00
making ^/trunk default for svn-helper.php merge
r38045: handling special case of module "egroupware" in merge
This commit is contained in:
parent
f89024c594
commit
f2f92a5b5f
@ -18,7 +18,7 @@ Changes into the directory of each module and executes svn with the given argume
|
|||||||
\\$module get\'s replaced with the module name, for every svn command but "merge", where log is queryed to avoid running merge on all modules.
|
\\$module get\'s replaced with the module name, for every svn command but "merge", where log is queryed to avoid running merge on all modules.
|
||||||
Examples:
|
Examples:
|
||||||
- to merge all changes from trunk between revision 123 and 456 into all modules in the workingcopy:
|
- to merge all changes from trunk between revision 123 and 456 into all modules in the workingcopy:
|
||||||
./svn-helper.php merge -r 123:456 ^/trunk
|
./svn-helper.php merge (-c 123|-r 123:456)+ [^/trunk] # multiple -c or -r are allowed, ^/trunk is the default
|
||||||
- to switch a workingcopy to the 1.8 branch:
|
- to switch a workingcopy to the 1.8 branch:
|
||||||
./svn-helper.php switch ^/branches/1.8/\\$module
|
./svn-helper.php switch ^/branches/1.8/\\$module
|
||||||
- to switch an anonymous workingcopy to a developers one:
|
- to switch an anonymous workingcopy to a developers one:
|
||||||
@ -57,6 +57,10 @@ function do_merge(array $args)
|
|||||||
chdir(dirname(__FILE__)); // go to EGroupware root
|
chdir(dirname(__FILE__)); // go to EGroupware root
|
||||||
|
|
||||||
array_shift($args); // get ride of "merge" arg
|
array_shift($args); // get ride of "merge" arg
|
||||||
|
if (substr(end($args),0,2) !== '^/' && strpos(end($args),'://') === false)
|
||||||
|
{
|
||||||
|
array_push($args,'^/trunk');
|
||||||
|
}
|
||||||
// get xml log
|
// get xml log
|
||||||
$cmd = "svn log --verbose --xml ".implode(' ',$args);
|
$cmd = "svn log --verbose --xml ".implode(' ',$args);
|
||||||
//echo $cmd;
|
//echo $cmd;
|
||||||
@ -82,10 +86,11 @@ function do_merge(array $args)
|
|||||||
//print_r($modules);
|
//print_r($modules);
|
||||||
//print_r($messages);
|
//print_r($messages);
|
||||||
$cmds = array();
|
$cmds = array();
|
||||||
foreach($modules as $module)
|
foreach($modules as $n => $module)
|
||||||
{
|
{
|
||||||
system('svn -q update '.$module); // svn >= 1.7 brings an error otherwise
|
system('svn -q update '.$module); // svn >= 1.7 brings an error otherwise
|
||||||
$cmds[] = 'svn merge '.implode(' ',$args).'/'.$module.' '.$module;
|
$cmds[] = 'svn merge '.implode(' ',$args).'/'.$module.($module != 'egroupware'?' '.$module:'');
|
||||||
|
if ($module == 'egroupware') $modules[$n] = '.';
|
||||||
}
|
}
|
||||||
$cmds[] = 'svn diff '.implode(' ',$modules);
|
$cmds[] = 'svn diff '.implode(' ',$modules);
|
||||||
foreach($cmds as $n => $cmd)
|
foreach($cmds as $n => $cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user