[svk-commit] r2745 - branches/path-resolver/lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Tue Apr 22 05:14:59 EDT 2008
Author: ruz
Date: Tue Apr 22 05:13:39 2008
New Revision: 2745
Added:
branches/path-resolver/lib/SVK/PathResolve.pm
Log:
* add initial implementation of path resolver
Added: branches/path-resolver/lib/SVK/PathResolve.pm
==============================================================================
--- (empty file)
+++ branches/path-resolver/lib/SVK/PathResolve.pm Tue Apr 22 05:13:39 2008
@@ -0,0 +1,49 @@
+package SVK::PathResolve;
+use strict;
+use SVK::I18N;
+use SVK::Logger;
+use SVK::Util qw(get_prompt);
+
+sub new {
+ my ($class, %args) = @_;
+ return bless(\%args, $class);
+}
+
+sub add_file {
+ my ($self, $path) = @_;
+
+ my ($prompt, $default);
+ my $default = 'a';
+ my $prompt = loc(
+ "Conflict found in %1:\na)add, s)kip, h)elp? [%2] ",
+ $path, $default
+ );
+
+ my $action = lc(get_prompt(
+ $prompt, qr/^[ash]?/i
+ ) || $default);
+ return $action if $action !~ /^h/;
+
+ die "help is not implemented yet";
+
+}
+
+sub add_directory {
+ my ($self, $path) = @_;
+
+ my ($prompt, $default);
+ my $default = 'a';
+ my $prompt = loc(
+ "Conflict found in %1:\na)dd all, o)only this, s)kip, h)elp? [%2] ",
+ $path, $default
+ );
+
+ my $action = lc(get_prompt(
+ $prompt, qr/^[ash]?/i
+ ) || $default);
+ return $action if $action !~ /^h/;
+
+ die "help is not implemented yet";
+}
+
+1;
More information about the svk-commit
mailing list