SVK
view release on metacpan or search on metacpan
t/07smerge.t view on Meta::CPAN
is_output ($svk, 'smerge', ['-C', '//l', '//m/'],
['Auto-merging (0, 5) /l to /m (base /m:3).',
"Checking locally against mirror source $uri/A.",
'U Q/qu',
"New merge ticket: $uuid:/l:5"], 'check merge up');
$svk->merge ('-a', '-m', 'simple smerge from source', '//m', '//l');
$srev = $srepos->fs->youngest_rev;
$svk->update ($copath);
is_deeply (($xd->create_path_object
( copath_anchor => $corpath,
xd => $xd,
repos => $repos,
path => '/l',
revision => $repos->fs->youngest_rev,
)->root->node_proplist('/l')),
{'svk:merge' => "$suuid:/A:$srev",
'svm:source' => uri($srepos->path).'!/A',
'svm:uuid' => $suuid }, 'simple smerge from source');
$rev = $repos->fs->youngest_rev;
is_output ($svk, 'smerge', ['-m', 'simple smerge from local', '//l', '//m'],
['Auto-merging (0, 7) /l to /m (base /m:6).',
"Merging back to mirror source $uri/A.",
'U Q/qu',
"New merge ticket: $uuid:/l:7",
'Merge back committed as revision 4.',
"Syncing $uri/A",
'Retrieving log information from 4 to 4',
'Committed revision 8 from revision 4.'], 'merge up');
$svk->sync ('//m');
is_deeply ((SVK::Path->real_new
({ depot => $depot,
path => '/m',
revision => $repos->fs->youngest_rev,
})->root->node_proplist('/m')),
{'svk:merge' => "$uuid:/l:$rev",
'svm:source' => uri($srepos->path).'!/A',
'svm:uuid' => $suuid },
'simple smerge back to source');
$svk->smerge ('-C', '//m', '//l');
is_output ($svk, 'smerge', ['-m', 'mergedown', '//m', '//l'],
['Auto-merging (6, 8) /m to /l (base */m:6).',
'Empty merge.'], 'merge down - empty');
$svk->pl ('-v', '//m');
is_output ($svk, 'smerge', ['-m', 'mergedown', '//m', '//l'],
['Auto-merging (6, 8) /m to /l (base */m:6).',
'Empty merge.'], 'merge up - empty');
$svk->update ($scopath);
append_file ("$scopath/A/be", "more modification on trunk\n");
mkdir "$scopath/A/newdir";
mkdir "$scopath/A/newdir2";
overwrite_file ("$scopath/A/newdir/deepnewfile", "new file added on source\n");
overwrite_file ("$scopath/A/newfile", "new file added on source\n");
overwrite_file ("$scopath/A/newfile2", "new file added on source\n");
$svk->add (map {"$scopath/A/$_"} qw/newdir newdir2 newfile newfile2/);
append_file ("$scopath/A/Q/qz", "file appened on source\n");
$svk->propset ("bzz", "newprop", "$scopath/A/Q/qz");
$svk->propset ("bzz", "newprop", "$scopath/A/Q/qu");
$svk->commit ('-m', 'commit on trunk', $scopath);
$svk->sync ('//m');
$svk->update ($copath);
overwrite_file ("$copath/newfile", "new file added on source\n");
overwrite_file ("$copath/newfile2", "new file added on source\nalso on local\n");
mkdir ("$copath/newdir");
$svk->add ("$copath/newfile");
append_file ("$copath/be", "modification on local\n");
append_file ("$copath/Q/qu", "modified on local\n");
$svk->rm ("$copath/Q/qz");
$svk->commit ('-m', 'commit on local', $copath);
is_output ($svk, 'smerge', ['-C', '//m', '//l'],
['Auto-merging (6, 9) /m to /l (base /l:7).',
' U Q/qu',
' Q/qz - skipped',
'C be',
'A newdir',
'A newdir/deepnewfile',
'g newfile',
'A newdir2',
'A newfile2',
"New merge ticket: $suuid:/A:5",
'Empty merge.', '1 conflict found.'],
'smerge - added file collision');
$svk->smerge ('-C', '//m', $copath);
is_output ($svk, 'smerge', ['//m', $copath],
['Auto-merging (6, 9) /m to /l (base /l:7).',
__" U $copath/Q/qu",
__" $copath/Q/qz - skipped",
__"C $copath/be",
__" $copath/newdir - skipped",
__" $copath/newdir/deepnewfile - skipped",
__"g $copath/newfile",
__"A $copath/newdir2",
__" $copath/newfile2 - skipped",
"New merge ticket: $suuid:/A:5",
'1 conflict found.']);
$svk->revert ('-R', $copath);
# XXX: newdir is not removed after revert
rmtree ["$copath/newdir2"];
$svk->add ("$copath/newdir");
is_output ($svk, 'smerge', ['//m', $copath],
['Auto-merging (6, 9) /m to /l (base /l:7).',
__" U $copath/Q/qu",
__" $copath/Q/qz - skipped",
__"C $copath/be",
__"A $copath/newdir/deepnewfile",
__"G $copath/newdir",
__"g $copath/newfile",
__"A $copath/newdir2",
__" $copath/newfile2 - skipped",
"New merge ticket: $suuid:/A:5",
'1 conflict found.'], 'scheduled dir merged with add');
is_output ($svk, 'commit', ['-m', 'commit with conflict state', $copath],
["1 conflict detected. Use 'svk resolved' after resolving them."],
'forbid commit with conflict state');
$svk->revert ("$copath/be");
is_output ($svk, 'commit', ['-m', 'merge down committed from checkout', $copath],
['Committed revision 11.']);
( run in 2.101 seconds using v1.01-cache-2.11-cpan-14f38c9f855 )