[svk-commit] r3009 - in trunk: lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Thu Jul 24 07:04:41 EDT 2008


Author: clsung
Date: Thu Jul 24 07:04:38 2008
New Revision: 3009

Modified:
   trunk/lib/SVK/Project.pm
   trunk/t/bm/online-offline.t

Log:
- for http://task.hm/FXW7

Modified: trunk/lib/SVK/Project.pm
==============================================================================
--- trunk/lib/SVK/Project.pm	(original)
+++ trunk/lib/SVK/Project.pm	Thu Jul 24 07:04:38 2008
@@ -384,6 +384,7 @@
 	if ($where) {
 	    $logger->info ( loc("Branch: %1 (%2)\n", $bname, $where ));
 	    return unless $verbose;
+	    $logger->info ( loc("Revision: %1\n", $target->revision));
 	    $logger->info ( loc("Repository path: %1\n", $target->depotpath ));
 	    if ($where ne 'trunk') { # project trunk should not have Copied info
 		for ($target->copy_ancestors) {
@@ -391,6 +392,13 @@
 		    $logger->info( loc("Copied From: %1@%2\n", $self->branch_name($_->[0]), $_->[1]));
 		    last;
 		}
+		$self->{xd} = $target->{xd};
+		$self->{merge} = SVK::Merge->new (%$self);
+		my $minfo = $self->{merge}->find_merge_sources ($target, 0,1);
+		for (sort { $minfo->{$b} <=> $minfo->{$a} } keys %$minfo) {
+		    $logger->info( loc("Merged From: %1@%2\n",$self->branch_name((split/:/)[1]),$minfo->{$_}));
+		    last;
+		}
 	    }
 	}
     }

Modified: trunk/t/bm/online-offline.t
==============================================================================
--- trunk/t/bm/online-offline.t	(original)
+++ trunk/t/bm/online-offline.t	Thu Jul 24 07:04:38 2008
@@ -118,8 +118,10 @@
 is_output ($svk, 'br', [],
     ["Project name: MyProject",
      "Branch: release/abc (offline)",
+     "Revision: 22",
      "Repository path: //local/MyProject/release/abc/C",
-     'Copied From: feature/foobar at 12']);
+     'Copied From: feature/foobar at 12',
+     'Merged From: release/abc at 18']);
 
 is_output ($svk, 'br', ['--offline'],
     ["Current branch already offline"]);
@@ -127,6 +129,8 @@
 is_output ($svk, 'br', [],
     ["Project name: MyProject",
      "Branch: release/abc (offline)",
+     "Revision: 22",
      "Repository path: //local/MyProject/release/abc/C",
-     'Copied From: feature/foobar at 12']);
+     'Copied From: feature/foobar at 12',
+     'Merged From: release/abc at 18']);
 


More information about the svk-commit mailing list