[svk-commit] r2311 - in trunk: lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Mon Mar 5 23:37:11 EST 2007
Author: mb
Date: Mon Mar 5 23:37:10 2007
New Revision: 2311
Modified:
trunk/lib/SVK/Merge.pm
trunk/t/07smerge-anchor-replace.t
trunk/t/07smerge-branch-renamed.t
trunk/t/07smerge-copy.t
trunk/t/07smerge-mixanchor.t
trunk/t/07smerge-multi.t
trunk/t/07smerge-tags.t
Log:
Prevent unwanted repeated merges when repeatedly merging tags to a branch.
We now also record the copy source(s) of the path being merged from in the
merge ticket.
* lib/SVK/Merge.pm
(run): Use merge_info_with_copy rather than merge_info for the new ticket.
* t/07smerge-tags.t
Removed TODO since this fixes the bug this testcase is looking for.
* t/07smerge-anchor-replace.t, t/07smerge-branch-renamed.t,
t/07smerge-copy.t, t/07smerge-mixanchor.t, t/07smerge-multi.t
Updated to deal with additional merge tickets that are added by smerge now.
Modified: trunk/lib/SVK/Merge.pm
==============================================================================
--- trunk/lib/SVK/Merge.pm (original)
+++ trunk/lib/SVK/Merge.pm Mon Mar 5 23:37:10 2007
@@ -534,7 +534,7 @@
}
},
ticket =>
- sub { $self->get_new_ticket ($self->merge_info ($src)->add_target ($src)) }
+ sub { $self->get_new_ticket ($self->merge_info_with_copy ($src)->add_target ($src)) }
) :
( prop_resolver => { 'svk:merge' => sub { ('G', undef, 1)} # skip
}),
Modified: trunk/t/07smerge-anchor-replace.t
==============================================================================
--- trunk/t/07smerge-anchor-replace.t (original)
+++ trunk/t/07smerge-anchor-replace.t Mon Mar 5 23:37:10 2007
@@ -34,4 +34,5 @@
['Auto-merging (6, 8) /trunk to /local (base /trunk:6).',
'U B/fe',
'U newfile',
- "New merge ticket: $uuid:/trunk:8"]);
+ "New merge ticket: $uuid:/trunk:8",
+ "New merge ticket: $uuid:/trunk-foo:4"]);
Modified: trunk/t/07smerge-branch-renamed.t
==============================================================================
--- trunk/t/07smerge-branch-renamed.t (original)
+++ trunk/t/07smerge-branch-renamed.t Mon Mar 5 23:37:10 2007
@@ -19,5 +19,6 @@
['Auto-merging (0, 6) /local-foo to /trunk (base /trunk:3).',
'===> Auto-merging (0, 6) /local-foo to /trunk (base /trunk:3).',
'A somedir',
+ qr'New merge ticket: .*:/local:5',
qr'New merge ticket: .*:/local-foo:6',
'Committed revision 7.']);
Modified: trunk/t/07smerge-copy.t
==============================================================================
--- trunk/t/07smerge-copy.t (original)
+++ trunk/t/07smerge-copy.t Mon Mar 5 23:37:10 2007
@@ -213,6 +213,7 @@
'A D/new-in-local',
'D D/de',
qr'New merge ticket: .*:/local-many:40',
+ qr'New merge ticket: .*:/trunk:3',
'Committed revision 41.']);
is_output($svk, 'diff', ['-sr40:41', '//'],
@@ -230,6 +231,7 @@
'U B/de',
'U b-s/de',
'A + b-s-cp',
+ qr'New merge ticket: .*:/trunk:3',
qr'New merge ticket: .*:/trunk-3:42',
'Committed revision 43.']);
Modified: trunk/t/07smerge-mixanchor.t
==============================================================================
--- trunk/t/07smerge-mixanchor.t (original)
+++ trunk/t/07smerge-mixanchor.t Mon Mar 5 23:37:10 2007
@@ -20,6 +20,7 @@
my ($srepospath, $spath, $srepos) = $xd->find_repos ('/test/', 1);
my ($repospath, undef, $repos) = $xd->find_repos ('//', 1);
my $uuid = $repos->fs->get_uuid;
+my $suuid = $srepos->fs->get_uuid;
my $uri = uri($srepospath);
$svk->mirror ('//mirror', $uri.($spath eq '/' ? '' : $spath));
@@ -47,13 +48,18 @@
is_output ($svk, 'pg', ['svk:merge', '//local/3.3-TESTING', '//mirror/3.3-TESTING'],
["//local/3.3-TESTING - $uuid:/3.3-exp:11",
- "//mirror/3.3-TESTING - $uuid:/3.3-exp:11"]);
+ "$suuid:/3.3-TESTING:7",
+ "$suuid:/trunk:3",
+ "//mirror/3.3-TESTING - $uuid:/3.3-exp:11",
+ "$suuid:/3.3-TESTING:7",
+ "$suuid:/trunk:3"]);
is_output ($svk, 'smerge', ['-m', 'merge back 3.3-another to remote directly', '//3.3-another', '//mirror/3.3-TESTING'],
['Auto-merging (0, 13) /3.3-another to /mirror/3.3-TESTING (base /3.3-exp:11).',
"Merging back to mirror source $uri.",
'A local-3.3-only/yay',
"New merge ticket: $uuid:/3.3-another:13",
+ "New merge ticket: $uuid:/local/3.3-TESTING:9",
'Merge back committed as revision 9.',
"Syncing $uri",
'Retrieving log information from 9 to 9',
Modified: trunk/t/07smerge-multi.t
==============================================================================
--- trunk/t/07smerge-multi.t (original)
+++ trunk/t/07smerge-multi.t Mon Mar 5 23:37:10 2007
@@ -69,7 +69,7 @@
system {$^X} ($^X, "-pi.bak", "-e", "s|#!/usr/bin/|#!env |", "$copath/trunk/test.pl");
-$svk->commit ('-m', 'mod on trunk before branch to featre', "$copath/trunk");
+$svk->commit ('-m', 'mod on trunk before branch to feature', "$copath/trunk");
$svk->copy ('-m', 'branch //feature', '//trunk', '//feature');
$svk->update ($copath);
@@ -89,7 +89,7 @@
is_output_like ($svk, 'smerge', ['-m', 'merge from //feature', '//feature', '//work'],
qr|base /trunk:9|);
is_output_like ($svk, 'smerge', ['-m', 'merge from //work to //trunk', '//work', '//trunk'],
- qr|base /trunk:9|);
+ qr|base /trunk:11|);
is_output_like ($svk, 'smerge', ['-m', 'merge from //trunk to //feature', '//trunk', '//feature'],
qr|base /feature:14|);
Modified: trunk/t/07smerge-tags.t
==============================================================================
--- trunk/t/07smerge-tags.t (original)
+++ trunk/t/07smerge-tags.t Mon Mar 5 23:37:10 2007
@@ -13,9 +13,6 @@
my $tree = create_basic_tree ($xd, '//trunk');
$svk->cp ('-m', 'tag1', '//trunk', '//tag1');
-TODO: {
-local $TODO = "Copy source isn't tracked in merge ticket.";
-
is_output($svk, 'sm', ['-m', 'merge tag1 to branch', '//tag1', '//branch'],
['Auto-merging (0, 5) /tag1 to /branch (base /trunk:1).',
'A A',
@@ -62,4 +59,3 @@
is_output($svk, 'sm', ['-m', 'merge trunk to branch', '//trunk', '//branch'],
['Auto-merging (7, 7) /trunk to /branch (base /trunk:7).',
'Empty merge.']);
-}
More information about the svk-commit
mailing list