Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move `Fcm::` namespace to `FCM1::`

This should avoid problems in case insensitive file system.
  • Loading branch information...
commit 7b8a6b1e92d01330d22e820b41caaa7fc17d138d 1 parent 3fd67b7
@matthewrmshin matthewrmshin authored
Showing with 587 additions and 587 deletions.
  1. +7 −7 bin/fcm_gui
  2. +1 −1  bin/fcm_internal
  3. +2 −2 doc/user_guide/annex_fcm_cfg.html
  4. +4 −4 doc/user_guide/api.html
  5. +6 −6 doc/user_guide/code_management.html
  6. +24 −24 lib/FCM/System/CM.pm
  7. +13 −13 lib/FCM/System/Old.pm
  8. +3 −3 lib/FCM/Util/Event.pm
  9. +7 −7 lib/{Fcm → FCM1}/Base.pm
  10. +34 −34 lib/{Fcm → FCM1}/Build.pm
  11. +4 −4 lib/{Fcm → FCM1}/Build/Fortran.pm
  12. +24 −24 lib/{Fcm → FCM1}/BuildSrc.pm
  13. +11 −11 lib/{Fcm → FCM1}/BuildTask.pm
  14. +21 −21 lib/{Fcm → FCM1}/CfgFile.pm
  15. +17 −17 lib/{Fcm → FCM1}/CfgLine.pm
  16. +93 −93 lib/{Fcm → FCM1}/Cm.pm
  17. +31 −31 lib/{Fcm → FCM1}/CmBranch.pm
  18. +9 −9 lib/{Fcm → FCM1}/CmUrl.pm
  19. +7 −7 lib/{Fcm → FCM1}/Config.pm
  20. +31 −31 lib/{Fcm → FCM1}/ConfigSystem.pm
  21. +16 −16 lib/{Fcm → FCM1}/Dest.pm
  22. +5 −5 lib/{Fcm → FCM1}/Exception.pm
  23. +74 −74 lib/{Fcm → FCM1}/Extract.pm
  24. +20 −20 lib/{Fcm → FCM1}/ExtractConfigComparator.pm
  25. +10 −10 lib/{Fcm → FCM1}/ExtractFile.pm
  26. +7 −7 lib/{Fcm → FCM1}/ExtractSrc.pm
  27. +12 −12 lib/{Fcm → FCM1}/Interactive.pm
  28. +10 −10 lib/{Fcm → FCM1}/Interactive/InputGetter.pm
  29. +10 −10 lib/{Fcm → FCM1}/Interactive/InputGetter/CLI.pm
  30. +11 −11 lib/{Fcm → FCM1}/Interactive/InputGetter/GUI.pm
  31. +14 −14 lib/{Fcm → FCM1}/Keyword.pm
  32. +23 −23 lib/{Fcm → FCM1}/ReposBranch.pm
  33. +7 −7 lib/{Fcm → FCM1}/SrcDirLayer.pm
  34. +3 −3 lib/{Fcm → FCM1}/Timer.pm
  35. +7 −7 lib/{Fcm → FCM1}/Util.pm
  36. +8 −8 lib/{Fcm → FCM1}/Util/ClassLoader.pm
  37. +1 −1  t/fcm-commit/02-bad.t
View
14 bin/fcm_gui
@@ -26,10 +26,10 @@ use lib "$FindBin::Bin/../lib";
use Cwd qw{cwd};
use FCM::Context::Event;
use FCM::Util;
-use Fcm::Config;
-use Fcm::Keyword;
-use Fcm::Timer qw{timestamp_command};
-use Fcm::Util qw{get_url_of_wc get_wct is_wc};
+use FCM1::Config;
+use FCM1::Keyword;
+use FCM1::Timer qw{timestamp_command};
+use FCM1::Util qw{get_url_of_wc get_wct is_wc};
use File::Basename qw{basename};
use File::Spec::Functions qw{catfile rel2abs};
use Tk;
@@ -43,10 +43,10 @@ if (@ARGV) {
chdir $dir if -d $dir;
}
-Fcm::Keyword::set_util(FCM::Util->new());
+FCM1::Keyword::set_util(FCM::Util->new());
# Get configuration settings
-my $config = Fcm::Config->new ();
+my $config = FCM1::Config->new ();
$config->get_config ();
# ------------------------------------------------------------------------------
@@ -1294,7 +1294,7 @@ sub invoke_cmd {
# If the command is "checkout", change directory to working copy
if (lc ($selsubcmd) eq 'checkout' && $subcmdvar{CHECKOUT}{URL}) {
- my $url = Fcm::Keyword::expand($subcmdvar{CHECKOUT}{URL});
+ my $url = FCM1::Keyword::expand($subcmdvar{CHECKOUT}{URL});
my $dir = $subcmdvar{CHECKOUT}{PATH}
? $subcmdvar{CHECKOUT}{PATH}
: basename($url);
View
2  bin/fcm_internal
@@ -21,7 +21,7 @@
use strict;
use warnings;
-use Fcm::Timer qw{timestamp_command};
+use FCM1::Timer qw{timestamp_command};
# Function declarations
sub catfile;
View
4 doc/user_guide/annex_fcm_cfg.html
@@ -53,8 +53,8 @@
<ul>
<li>The detail of the above settings will remain undocumented. For further
- information, please refer to the Perl module <code>Fcm::Config</code>,
- which should be located at <samp>lib/Fcm/Config.pm</samp> in your FCM
+ information, please refer to the Perl module <code>FCM1::Config</code>,
+ which should be located at <samp>lib/FCM1/Config.pm</samp> in your FCM
distribution.</li>
<li>Setting labels in both files are case insensitive.</li>
View
8 doc/user_guide/api.html
@@ -39,7 +39,7 @@
<p>The majority of FCM functionalities are provided by a set of Perl modules.
Old modules developed prior to <a href="../release_notes/2-0.html">release
- 2-0</a> reside in the <code>Fcm::*</code> name-space. Modules developed
+ 2-0</a> reside in the <code>FCM1::*</code> name-space. Modules developed
thereafter reside in the <code>FCM::*</code> name-space. These are
sub-divided into the following name-spaces:</p>
@@ -121,7 +121,7 @@
<dt><code>FCM::System::CM</code></dt>
<dd>The code management system. Currently a thin adapter to
- <code>Fcm::Cm</code>.</dd>
+ <code>FCM1::Cm</code>.</dd>
<dt><code>FCM::System::Misc</code></dt>
@@ -197,8 +197,8 @@
</dd>
</dl>
- <p>Note: The majority of modules in the old <code>Fcm::*</code> name space
- are considered deprecated, with the exception of <code>Fcm::Cm</code> and
+ <p>Note: The majority of modules in the old <code>FCM1::*</code> name space
+ are considered deprecated, with the exception of <code>FCM1::Cm</code> and
those providing support functionalities for it. The functionalities of these
modules will eventually be absorbed into the <code>FCM::System::CM</code>
framework.</p>
View
12 doc/user_guide/code_management.html
@@ -859,11 +859,11 @@ <h4 id="svn_branching_switch">Switching your working copy to point to another
U doc/user_guide/getting_started.html
U doc/user_guide/code_management.html
U doc/user_guide/command_ref.html
-U src/lib/Fcm/SrcFile.pm
-U src/lib/Fcm/Util.pm
-U src/lib/Fcm/Build.pm
-U src/lib/Fcm/Cm.pm
-U src/lib/Fcm/SrcPackage.pm
+U src/lib/FCM1/SrcFile.pm
+U src/lib/FCM1/Util.pm
+U src/lib/FCM1/Build.pm
+U src/lib/FCM1/Cm.pm
+U src/lib/FCM1/SrcPackage.pm
U src/bin/fcm_internal
U src/bin/fcm_gui
Updated to revision 1009.
@@ -959,7 +959,7 @@ <h4 id="svn_branching_merge">Merging</h4>
c.f.: /FCM/trunk@1371
-------------------------------------------------------------------------dry-run
A doc/fortran_standards/index.html
-U src/lib/Fcm/ReposBranch.pm
+U src/lib/FCM1/ReposBranch.pm
-------------------------------------------------------------------------dry-run
Would you like to go ahead with the merge?
Enter "y" or "n" (or just press &lt;return&gt; for "n"): y
View
48 lib/FCM/System/CM.pm
@@ -24,8 +24,8 @@ package FCM::System::CM;
use base qw{FCM::Class::CODE};
use Cwd qw{cwd};
-use Fcm::Cm;
-use Fcm::Interactive;
+use FCM1::Cm;
+use FCM1::Interactive;
use FCM::Context::Event;
use FCM::Context::Locator;
use FCM::System::CM::CommitMessage;
@@ -40,31 +40,31 @@ use Storable qw{dclone};
# The (keys) named actions of this class and (values) their implementations.
our %ACTION_OF = (
cm_branch_create => \&_cm_branch_create,
- cm_branch_delete => _fcm1_func(\&Fcm::Cm::cm_branch_delete),
- cm_branch_diff => _fcm1_func(\&Fcm::Cm::cm_branch_diff),
- cm_branch_info => _fcm1_func(\&Fcm::Cm::cm_branch_info),
+ cm_branch_delete => _fcm1_func(\&FCM1::Cm::cm_branch_delete),
+ cm_branch_diff => _fcm1_func(\&FCM1::Cm::cm_branch_diff),
+ cm_branch_info => _fcm1_func(\&FCM1::Cm::cm_branch_info),
cm_branch_list => \&_cm_branch_list,
- cm_commit => _fcm1_func(\&Fcm::Cm::cm_commit),
+ cm_commit => _fcm1_func(\&FCM1::Cm::cm_commit),
cm_checkout => \&_cm_checkout,
cm_check_missing => _fcm1_func(
- \&Fcm::Cm::cm_check_missing,
+ \&FCM1::Cm::cm_check_missing,
_opt_mod_st_check_handler_func('WC_STATUS_PATH'),
),
cm_check_unknown => _fcm1_func(
- \&Fcm::Cm::cm_check_unknown,
+ \&FCM1::Cm::cm_check_unknown,
_opt_mod_st_check_handler_func('WC_STATUS_PATH'),
),
cm_diff => \&_cm_diff,
cm_loc_layout => \&_cm_loc_layout,
- cm_merge => _fcm1_func(\&Fcm::Cm::cm_merge),
- cm_mkpatch => _fcm1_func(\&Fcm::Cm::cm_mkpatch),
+ cm_merge => _fcm1_func(\&FCM1::Cm::cm_merge),
+ cm_mkpatch => _fcm1_func(\&FCM1::Cm::cm_mkpatch),
cm_project_create => \&_cm_project_create,
cm_resolve_conflicts => \&_cm_resolve_conflicts,
cm_switch => _fcm1_func(
- \&Fcm::Cm::cm_switch, _opt_mod_st_check_handler_func('WC_STATUS'),
+ \&FCM1::Cm::cm_switch, _opt_mod_st_check_handler_func('WC_STATUS'),
),
cm_update => _fcm1_func(
- \&Fcm::Cm::cm_update, _opt_mod_st_check_handler_func('WC_STATUS'),
+ \&FCM1::Cm::cm_update, _opt_mod_st_check_handler_func('WC_STATUS'),
),
svn => \&_svn,
);
@@ -85,12 +85,12 @@ __PACKAGE__->class(
sub _init {
my ($attrib_ref) = @_;
- if (!defined(Fcm::Keyword::get_util())) {
- Fcm::Keyword::set_util($attrib_ref->{util});
+ if (!defined(FCM1::Keyword::get_util())) {
+ FCM1::Keyword::set_util($attrib_ref->{util});
}
if ($attrib_ref->{'gui'}) {
- Fcm::Interactive::set_impl(
- 'Fcm::Interactive::InputGetter::GUI',
+ FCM1::Interactive::set_impl(
+ 'FCM1::Interactive::InputGetter::GUI',
{geometry => $attrib_ref->{gui}},
);
}
@@ -102,9 +102,9 @@ sub _init {
util => $attrib_ref->{util},
});
$attrib_ref->{svn} = FCM::System::CM::SVN->new({util => $attrib_ref->{util}});
- Fcm::Cm::set_util($attrib_ref->{util});
- Fcm::Cm::set_commit_message_util($attrib_ref->{commit_message_util});
- Fcm::Cm::set_svn_util($attrib_ref->{svn});
+ FCM1::Cm::set_util($attrib_ref->{util});
+ FCM1::Cm::set_commit_message_util($attrib_ref->{commit_message_util});
+ FCM1::Cm::set_svn_util($attrib_ref->{svn});
}
# Create a branch in a project.
@@ -506,7 +506,7 @@ sub _cm_project_create {
$target;
}
-# Returns a simple wrapper to FCM 1 Fcm::Cm functions.
+# Returns a simple wrapper to FCM 1 FCM1::Cm functions.
sub _fcm1_func {
my ($action_ref, $opt_mod_ref) = @_;
$opt_mod_ref ||= sub {};
@@ -517,7 +517,7 @@ sub _fcm1_func {
$opt_mod_ref->($option_ref);
eval {$action_ref->($option_ref, @args)};
if ($@) {
- if (!Fcm::Cm::Abort->caught($@)) {
+ if (!FCM1::Cm::Abort->caught($@)) {
die($@);
}
if (!($@->get_code() eq $@->NULL || $@->get_code() eq $@->USER)) {
@@ -538,7 +538,7 @@ sub _opt_mod_st_check_handler_func {
sub {
my $option_ref = shift();
if (!$option_ref->{'non-interactive'}) {
- $option_ref->{st_check_handler} = $Fcm::Cm::CLI_HANDLER_OF{$key};
+ $option_ref->{st_check_handler} = $FCM1::Cm::CLI_HANDLER_OF{$key};
}
};
}
@@ -645,7 +645,7 @@ FCM::System::CM
=head1 DESCRIPTION
The FCM code management sub-system. This is currently a thin adaptor of
-L<Fcm::Cm|Fcm::Cm>.
+L<FCM1::Cm|FCM1::Cm>.
=head1 METHODS
@@ -693,7 +693,7 @@ Implement the C<fcm project-create> command.
=item $system->cm_update(\%option,@args)
Thin adaptors for the corresponding code management functions in
-L<Fcm::Cm|Fcm::Cm>.
+L<FCM1::Cm|FCM1::Cm>.
=item $system->svn($app,\%option,@args)
View
26 lib/FCM/System/Old.pm
@@ -23,13 +23,13 @@ package FCM::System::Old;
use base qw{FCM::Class::CODE};
use Cwd qw{cwd};
-use Fcm::Build;
-use Fcm::Config;
-use Fcm::Extract;
-#use Fcm::ExtractConfigComparator;
-use Fcm::Keyword;
+use FCM1::Build;
+use FCM1::Config;
+use FCM1::Extract;
+#use FCM1::ExtractConfigComparator;
+use FCM1::Keyword;
-my %CLASS_OF = (build => 'Fcm::Build', extract => 'Fcm::Extract');
+my %CLASS_OF = (build => 'FCM1::Build', extract => 'FCM1::Extract');
my %KEY_OF = (
'archive' => 'ARCHIVE',
@@ -54,23 +54,23 @@ __PACKAGE__->class(
sub _init {
my ($attrib_ref) = @_;
- if (!defined(Fcm::Keyword::get_util())) {
- Fcm::Keyword::set_util($attrib_ref->{util});
+ if (!defined(FCM1::Keyword::get_util())) {
+ FCM1::Keyword::set_util($attrib_ref->{util});
}
}
sub _config_compare {
my ($attrib_ref, $option_hash_ref, @args) = @_;
- $attrib_ref->{util}->class_load('Fcm::CmUrl');
- $attrib_ref->{util}->class_load('Fcm::ExtractConfigComparator');
+ $attrib_ref->{util}->class_load('FCM1::CmUrl');
+ $attrib_ref->{util}->class_load('FCM1::ExtractConfigComparator');
if (exists($option_hash_ref->{verbosity})) {
- Fcm::Config->instance()->verbose($option_hash_ref->{verbosity});
+ FCM1::Config->instance()->verbose($option_hash_ref->{verbosity});
}
my %option = %{$option_hash_ref};
if (exists($option{'wiki-format'})) {
$option{'wiki'} = delete($option{'wiki-format'});
}
- my $system = Fcm::ExtractConfigComparator->new({files => \@args, %option});
+ my $system = FCM1::ExtractConfigComparator->new({files => \@args, %option});
$system->invoke();
}
@@ -81,7 +81,7 @@ sub _run {
= split(qr{:}msx, join(':', @{$option_hash_ref->{targets}}));
}
if (exists($option_hash_ref->{verbosity})) {
- Fcm::Config->instance()->verbose($option_hash_ref->{verbosity});
+ FCM1::Config->instance()->verbose($option_hash_ref->{verbosity});
}
my $system = $CLASS_OF{$key}->new();
my $path_to_cfg = @args ? $args[0] : cwd();
View
6 lib/FCM/Util/Event.pm
@@ -78,14 +78,14 @@ my %ACTION_OF = (
);
# Helper for "_event_e", list of exception classes and their formatters.
our @E_FORMATTERS = (
- ['Fcm::Cm::Exception' , \&_format_e_cm ],
- ['Fcm::CLI::Exception' , sub {$_[0]->get_message()}],
+ ['FCM1::Cm::Exception' , \&_format_e_cm ],
+ ['FCM1::CLI::Exception' , sub {$_[0]->get_message()}],
['FCM::Class::Exception' , \&_format_e_class ],
['FCM::CLI::Exception' , \&_format_e_cli ],
['FCM::System::Exception', \&_format_e_sys ],
['FCM::Util::Exception' , \&_format_e_util ],
);
-# Error format strings for Fcm::Cm::Exception.
+# Error format strings for FCM1::Cm::Exception.
our %E_CM_FORMAT_FOR = (
DIFF_PROJECTS => "%s (target) and %s (source) are not related.\n",
INVALID_BRANCH => "%s: not a valid URL of a standard FCM branch.\n",
View
14 lib/Fcm/Base.pm → lib/FCM1/Base.pm
@@ -17,31 +17,31 @@
# along with FCM. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------------
# NAME
-# Fcm::Base
+# FCM1::Base
#
# DESCRIPTION
# This is base class for all FCM OO packages.
#
# ------------------------------------------------------------------------------
-package Fcm::Base;
+package FCM1::Base;
# Standard pragma
use strict;
use warnings;
-use Fcm::Config;
+use FCM1::Config;
my @scalar_properties = (
- 'config', # instance of Fcm::Config, configuration setting
+ 'config', # instance of FCM1::Config, configuration setting
);
# ------------------------------------------------------------------------------
# SYNOPSIS
-# $obj = Fcm::Base->new;
+# $obj = FCM1::Base->new;
#
# DESCRIPTION
-# This method constructs a new instance of the Fcm::Base class.
+# This method constructs a new instance of the FCM1::Base class.
# ------------------------------------------------------------------------------
sub new {
@@ -82,7 +82,7 @@ for my $name (@scalar_properties) {
if (not defined $self->{$name}) {
if ($name eq 'config') {
# Configuration setting of the main program
- $self->{$name} = Fcm::Config->instance();
+ $self->{$name} = FCM1::Config->instance();
}
}
View
68 lib/Fcm/Build.pm → lib/FCM1/Build.pm
@@ -17,7 +17,7 @@
# along with FCM. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------------
# NAME
-# Fcm::Build
+# FCM1::Build
#
# DESCRIPTION
# This is the top level class for the FCM build system.
@@ -27,18 +27,18 @@
use strict;
use warnings;
-package Fcm::Build;
-use base qw(Fcm::ConfigSystem);
+package FCM1::Build;
+use base qw(FCM1::ConfigSystem);
use Carp qw{croak} ;
use Cwd qw{cwd} ;
-use Fcm::BuildSrc ;
-use Fcm::BuildTask ;
-use Fcm::Config ;
-use Fcm::Dest ;
-use Fcm::CfgLine ;
-use Fcm::Timer qw{timestamp_command} ;
-use Fcm::Util qw{expand_tilde run_command touch_file w_report};
+use FCM1::BuildSrc ;
+use FCM1::BuildTask ;
+use FCM1::Config ;
+use FCM1::Dest ;
+use FCM1::CfgLine ;
+use FCM1::Timer qw{timestamp_command} ;
+use FCM1::Util qw{expand_tilde run_command touch_file w_report};
use File::Basename qw{dirname} ;
use File::Spec ;
use List::Util qw{first} ;
@@ -71,14 +71,14 @@ my @compare_setting_methods = (
'compare_setting_tool', # build tool settings
);
-my $DELIMITER_LIST = $Fcm::Config::DELIMITER_LIST;
+my $DELIMITER_LIST = $FCM1::Config::DELIMITER_LIST;
# ------------------------------------------------------------------------------
# SYNOPSIS
-# $obj = Fcm::Build->new;
+# $obj = FCM1::Build->new;
#
# DESCRIPTION
-# This method constructs a new instance of the Fcm::Build class.
+# This method constructs a new instance of the FCM1::Build class.
# ------------------------------------------------------------------------------
sub new {
@@ -86,7 +86,7 @@ sub new {
my %args = @_;
my $class = ref $this || $this;
- my $self = Fcm::ConfigSystem->new (%args);
+ my $self = FCM1::ConfigSystem->new (%args);
$self->{$_} = undef for (@scalar_properties);
@@ -372,7 +372,7 @@ sub compare_setting_dependency {
else {
# Use cached dependency
my ($progname, %hash) = split (
- /$Fcm::Config::DELIMITER_PATTERN/, $old{$key}->value
+ /$FCM1::Config::DELIMITER_PATTERN/, $old{$key}->value
);
$srcpkg->progname ($progname) if $progname and not $flag;
$srcpkg->$method (\%hash);
@@ -384,9 +384,9 @@ sub compare_setting_dependency {
push @value, $name, $srcpkg->$method ($name);
}
- push @$new_lines, Fcm::CfgLine->new (
- LABEL => $prefix . $Fcm::Config::DELIMITER . $key,
- VALUE => join ($Fcm::Config::DELIMITER, @value),
+ push @$new_lines, FCM1::CfgLine->new (
+ LABEL => $prefix . $FCM1::Config::DELIMITER . $key,
+ VALUE => join ($FCM1::Config::DELIMITER, @value),
);
}
@@ -461,8 +461,8 @@ sub compare_setting_srcpkg {
# Return reference to an array of new lines
my $new_lines = [];
for my $key (keys %{ $self->srcpkg }) {
- push @$new_lines, Fcm::CfgLine->new (
- LABEL => $prefix . $Fcm::Config::DELIMITER . $key,
+ push @$new_lines, FCM1::CfgLine->new (
+ LABEL => $prefix . $FCM1::Config::DELIMITER . $key,
VALUE => $self->srcpkg ($key)->type,
);
}
@@ -495,7 +495,7 @@ sub compare_setting_target {
return (
(defined ($old) ? $old ne $new : 1),
- [Fcm::CfgLine->new (LABEL => $prefix, VALUE => $new)],
+ [FCM1::CfgLine->new (LABEL => $prefix, VALUE => $new)],
);
}
@@ -523,7 +523,7 @@ sub invoke_fortran_interface_generator {
}
my $target = $srcfile->interfacebase . $pdoneext;
- $task{$target} = Fcm::BuildTask->new (
+ $task{$target} = FCM1::BuildTask->new (
TARGET => $target,
TARGETPATH => $self->dest->donepath,
SRCFILE => $srcfile,
@@ -539,7 +539,7 @@ sub invoke_fortran_interface_generator {
? $srcfile->flagsbase ('GENINTERFACE', -$i - 1)
: undef;
- $task{$target} = Fcm::BuildTask->new (
+ $task{$target} = FCM1::BuildTask->new (
TARGET => $target,
TARGETPATH => $self->dest->flagspath,
DEPENDENCY => [defined ($depend) ? $depend : ()],
@@ -549,7 +549,7 @@ sub invoke_fortran_interface_generator {
}
# Set up build task to update the flags file for interface generator tool
- $task{$self->srcpkg ('')->flagsbase ('GENINTERFACE')} = Fcm::BuildTask->new (
+ $task{$self->srcpkg ('')->flagsbase ('GENINTERFACE')} = FCM1::BuildTask->new (
TARGET => $self->srcpkg ('')->flagsbase ('GENINTERFACE'),
TARGETPATH => $self->dest->flagspath,
ACTIONTYPE => 'UPDATE',
@@ -661,7 +661,7 @@ sub invoke_pre_process {
for my $srcfile (values %{ $self->srcpkg }) {
if ($srcfile->is_type_all (qw/CPP INCLUDE/)) {
# Set up a copy build task for each include file
- $task{$srcfile->base} = Fcm::BuildTask->new (
+ $task{$srcfile->base} = FCM1::BuildTask->new (
TARGET => $srcfile->base,
TARGETPATH => $self->dest->incpath,
SRCFILE => $srcfile,
@@ -683,7 +683,7 @@ sub invoke_pre_process {
next;
}
- $task{$target} = Fcm::BuildTask->new (
+ $task{$target} = FCM1::BuildTask->new (
TARGET => $target,
TARGETPATH => $self->dest->donepath,
SRCFILE => $srcfile,
@@ -702,7 +702,7 @@ sub invoke_pre_process {
? $srcfile->flagsbase ($ppkeys, -$i - 1)
: undef;
- $task{$target} = Fcm::BuildTask->new (
+ $task{$target} = FCM1::BuildTask->new (
TARGET => $target,
TARGETPATH => $self->dest->flagspath,
DEPENDENCY => [defined ($depend) ? $depend : ()],
@@ -718,7 +718,7 @@ sub invoke_pre_process {
$self->setting ('TOOL_SRC_PP', $lang, 'PPKEYS')
);
- $task{$target} = Fcm::BuildTask->new (
+ $task{$target} = FCM1::BuildTask->new (
TARGET => $target,
TARGETPATH => $self->dest->flagspath,
ACTIONTYPE => 'UPDATE',
@@ -915,7 +915,7 @@ sub invoke_setup_build {
while ($pattern =~ /##([\w:]+)##/g) {
my $match = $1;
- my $val = $self->setting (split (/$Fcm::Config::DELIMITER/, $match));
+ my $val = $self->setting (split (/$FCM1::Config::DELIMITER/, $match));
last unless defined $val;
$val =~ s/\./\\./;
@@ -1068,7 +1068,7 @@ sub parse_cfg_dep {
}
for my $dep (@deps) {
- $dep =~ s/$Fcm::Config::DELIMITER_PATTERN/__/g;
+ $dep =~ s/$FCM1::Config::DELIMITER_PATTERN/__/g;
}
$self->setting ([$name, $target], join (' ', sort @deps));
@@ -1095,7 +1095,7 @@ sub parse_cfg_dest {
my $rc = $self->SUPER::parse_cfg_dest ($cfg_lines);
# Set up search paths
- for my $name (@Fcm::Dest::paths) {
+ for my $name (@FCM1::Dest::paths) {
(my $label = uc ($name)) =~ s/PATH//;
$self->setting (['PATH', $label], $self->dest->$name);
@@ -1267,7 +1267,7 @@ sub parse_cfg_source {
# ----------------------------------------------------------------------------
my %pkg = ();
for my $name (keys %src) {
- $pkg{$name} = Fcm::BuildSrc->new (PKGNAME => $name, SRC => $src{$name});
+ $pkg{$name} = FCM1::BuildSrc->new (PKGNAME => $name, SRC => $src{$name});
}
# INHERIT::SRC declarations
@@ -1310,7 +1310,7 @@ sub parse_cfg_source {
my $parent = @names ? join ('__', @names) : '';
# If parent package does not exist, create it
- $pkg{$parent} = Fcm::BuildSrc->new (PKGNAME => $parent)
+ $pkg{$parent} = FCM1::BuildSrc->new (PKGNAME => $parent)
unless exists $pkg{$parent};
# Current package is a child of the parent package
@@ -1340,7 +1340,7 @@ sub parse_cfg_source {
next SRCPKG;
}
if (!defined($self->dummysrcpkg($dummy_name))) {
- $self->dummysrcpkg($dummy_name, Fcm::BuildSrc->new(PKGNAME => $dummy_name));
+ $self->dummysrcpkg($dummy_name, FCM1::BuildSrc->new(PKGNAME => $dummy_name));
}
push(@{$self->dummysrcpkg($dummy_name)->children()}, $srcpkg);
}
View
8 lib/Fcm/Build/Fortran.pm → lib/FCM1/Build/Fortran.pm
@@ -20,7 +20,7 @@ use strict;
use warnings;
# ------------------------------------------------------------------------------
-package Fcm::Build::Fortran;
+package FCM1::Build::Fortran;
use Text::Balanced qw{extract_bracketed extract_delimited};
@@ -505,12 +505,12 @@ __END__
=head1 NAME
-Fcm::Build::Fortran
+FCM1::Build::Fortran
=head1 SYNOPSIS
- use Fcm::Build::Fortran;
- my $fortran_util = Fcm::Build::Fortran->new();
+ use FCM1::Build::Fortran;
+ my $fortran_util = FCM1::Build::Fortran->new();
open(my($handle), '<', $path_to_a_fortran_source_file);
print($fortran_util->extract_interface($handle)); # prints interface
close($handle);
View
48 lib/Fcm/BuildSrc.pm → lib/FCM1/BuildSrc.pm
@@ -17,7 +17,7 @@
# along with FCM. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------------
# NAME
-# Fcm::BuildSrc
+# FCM1::BuildSrc
#
# DESCRIPTION
# This is a class to group functionalities of source in a build.
@@ -27,17 +27,17 @@
use strict;
use warnings;
-package Fcm::BuildSrc;
-use base qw{Fcm::Base};
+package FCM1::BuildSrc;
+use base qw{FCM1::Base};
use Carp qw{croak};
use Cwd qw{cwd};
-use Fcm::Build::Fortran;
-use Fcm::CfgFile;
-use Fcm::CfgLine;
-use Fcm::Config;
-use Fcm::Timer qw{timestamp_command};
-use Fcm::Util qw{find_file_in_path run_command};
+use FCM1::Build::Fortran;
+use FCM1::CfgFile;
+use FCM1::CfgLine;
+use FCM1::Config;
+use FCM1::Timer qw{timestamp_command};
+use FCM1::Util qw{find_file_in_path run_command};
use File::Basename qw{basename dirname};
use File::Spec;
@@ -92,26 +92,26 @@ my %RE_OF = (
);
{
- # Returns a singleton instance of Fcm::Build::Fortran.
+ # Returns a singleton instance of FCM1::Build::Fortran.
my $FORTRAN_UTIL;
sub _get_fortran_util {
- $FORTRAN_UTIL ||= Fcm::Build::Fortran->new();
+ $FORTRAN_UTIL ||= FCM1::Build::Fortran->new();
return $FORTRAN_UTIL;
}
}
# ------------------------------------------------------------------------------
# SYNOPSIS
-# $obj = Fcm::BuildSrc->new (%args);
+# $obj = FCM1::BuildSrc->new (%args);
#
# DESCRIPTION
-# This method constructs a new instance of the Fcm::BuildSrc class. See
+# This method constructs a new instance of the FCM1::BuildSrc class. See
# above for allowed list of properties. (KEYS should be in uppercase.)
# ------------------------------------------------------------------------------
sub new {
my ($class, %args) = @_;
- my $self = bless(Fcm::Base->new(%args), $class);
+ my $self = bless(FCM1::Base->new(%args), $class);
for my $key (@scalar_properties, @hash_properties) {
$self->{$key}
= exists($args{uc($key)}) ? $args{uc($key)}
@@ -578,7 +578,7 @@ sub get_dep {
next DEP_TYPE;
}
# Get list of dependency type for this file
- for my $dep_type (split(/$Fcm::Config::DELIMITER/, $dep_type_string)) {
+ for my $dep_type (split(/$FCM1::Config::DELIMITER/, $dep_type_string)) {
if (exists($PATTERN_OF{$dep_type}) && !exists($EXCLUDE_SET{$dep_type})) {
push(@dep_types, $dep_type);
}
@@ -618,7 +618,7 @@ sub get_dep {
}
# $match may contain multiple items delimited by space
for my $item (split(qr{\s+}msx, $match)) {
- my $key = uc($dep_type . $Fcm::Config::DELIMITER . $item);
+ my $key = uc($dep_type . $FCM1::Config::DELIMITER . $item);
if (!exists($EXCLUDE_SET{$key})) {
$dep_of{$item} = $dep_type;
}
@@ -636,7 +636,7 @@ sub get_dep {
= $self->setting('BLD_DEP' . ($flag ? '_PP' : ''), $self->pkgname());
if (defined($manual_deps_ref)) {
for (@{$manual_deps_ref}) {
- my ($dep_type, $item) = split(/$Fcm::Config::DELIMITER/, $_, 2);
+ my ($dep_type, $item) = split(/$FCM1::Config::DELIMITER/, $_, 2);
$dep_of{$item} = $dep_type;
}
}
@@ -1022,7 +1022,7 @@ sub get_rules {
# Depends on dummy copy file, if file is an "always build type"
push @dep, $self->setting (qw/BLD_CPDUMMY/)
if $self->is_type_any (split (
- /$Fcm::Config::DELIMITER_LIST/, $self->setting ('BLD_TYPE_ALWAYS_BUILD')
+ /$FCM1::Config::DELIMITER_LIST/, $self->setting ('BLD_TYPE_ALWAYS_BUILD')
));
# Depends on other executable files
@@ -1140,7 +1140,7 @@ sub get_setting {
sub get_type {
my $self = shift();
my @IGNORE_LIST
- = split(/$Fcm::Config::DELIMITER_LIST/, $self->setting('INFILE_IGNORE'));
+ = split(/$FCM1::Config::DELIMITER_LIST/, $self->setting('INFILE_IGNORE'));
if (grep {$self->curbase() eq $_} @IGNORE_LIST) {
return q{};
}
@@ -1192,7 +1192,7 @@ sub get_type {
while (my $line = readline($handle)) {
my $extra = $code_ref->($line);
if ($extra) {
- $type .= $Fcm::Config::DELIMITER . $extra;
+ $type .= $FCM1::Config::DELIMITER . $extra;
last LINE;
}
}
@@ -1258,7 +1258,7 @@ for my $name ('all', 'any') {
my $rc = 0;
if ($self->type) {
- my %types = map {($_, 1)} split /$Fcm::Config::DELIMITER/, $self->type;
+ my %types = map {($_, 1)} split /$FCM1::Config::DELIMITER/, $self->type;
for my $intype (@intypes) {
$rc = exists $types{$intype};
@@ -1356,7 +1356,7 @@ sub write_lib_dep_excl {
['OBJ' , [qw{SOURCE }], sub {$_[0]->root()} ],
);
- my $cfg = Fcm::CfgFile->new();
+ my $cfg = FCM1::CfgFile->new();
my @stack = ($self);
NODE:
while (my $node = pop(@stack)) {
@@ -1377,9 +1377,9 @@ sub write_lib_dep_excl {
if ($name && $node->is_type_all(@{$type_list_ref})) {
push(
@{$cfg->lines()},
- Fcm::CfgLine->new(
+ FCM1::CfgLine->new(
label => $LABEL_OF_EXCL_DEP,
- value => $key . $Fcm::Config::DELIMITER . $name,
+ value => $key . $FCM1::Config::DELIMITER . $name,
),
);
next NODE;
View
22 lib/Fcm/BuildTask.pm → lib/FCM1/BuildTask.pm
@@ -17,15 +17,15 @@
# along with FCM. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------------
# NAME
-# Fcm::BuildTask
+# FCM1::BuildTask
#
# DESCRIPTION
# This class hosts information of a build task in the FCM build system.
#
# ------------------------------------------------------------------------------
-package Fcm::BuildTask;
-@ISA = qw(Fcm::Base);
+package FCM1::BuildTask;
+@ISA = qw(FCM1::Base);
# Standard pragma
use strict;
@@ -40,15 +40,15 @@ use File::Path;
use File::Spec::Functions;
# FCM component modules
-use Fcm::Base;
-use Fcm::Timer;
-use Fcm::Util;
+use FCM1::Base;
+use FCM1::Timer;
+use FCM1::Util;
# List of property methods for this class
my @scalar_properties = (
'actiontype', # type of action
'dependency', # list of dependencies for this target
- 'srcfile', # reference to input Fcm::BuildSrc instance
+ 'srcfile', # reference to input FCM1::BuildSrc instance
'output', # output file
'outputmtime', # output file modification time
'target', # target name for this task
@@ -57,10 +57,10 @@ my @scalar_properties = (
# ------------------------------------------------------------------------------
# SYNOPSIS
-# $obj = Fcm::BuildTask->new (%args);
+# $obj = FCM1::BuildTask->new (%args);
#
# DESCRIPTION
-# This method constructs a new instance of the Fcm::BuildTask class. See
+# This method constructs a new instance of the FCM1::BuildTask class. See
# above for allowed list of properties. (KEYS should be in uppercase.)
# ------------------------------------------------------------------------------
@@ -69,7 +69,7 @@ sub new {
my %args = @_;
my $class = ref $this || $this;
- my $self = Fcm::Base->new (%args);
+ my $self = FCM1::Base->new (%args);
bless $self, $class;
@@ -125,7 +125,7 @@ for my $name (@scalar_properties) {
# argument TASKLIST must be a reference to a hash containing the other tasks
# of the build, which this task may depend on. The keys of the hash must the
# name of the target names of the tasks, and the values of the hash must be
-# the references to the corresponding Fcm::BuildTask instances. The method
+# the references to the corresponding FCM1::BuildTask instances. The method
# returns true if the task has been performed to create a new version of the
# target.
# ------------------------------------------------------------------------------
View
42 lib/Fcm/CfgFile.pm → lib/FCM1/CfgFile.pm
@@ -17,7 +17,7 @@
# along with FCM. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------------
# NAME
-# Fcm::CfgFile
+# FCM1::CfgFile
#
# DESCRIPTION
# This class is used for reading and writing FCM config files. A FCM config
@@ -26,8 +26,8 @@
#
# ------------------------------------------------------------------------------
-package Fcm::CfgFile;
-@ISA = qw(Fcm::Base);
+package FCM1::CfgFile;
+@ISA = qw(FCM1::Base);
# Standard pragma
use warnings;
@@ -40,16 +40,16 @@ use File::Path;
use File::Spec;
# FCM component modules
-use Fcm::Base;
-use Fcm::CfgLine;
-use Fcm::Config;
-use Fcm::Keyword;
-use Fcm::Util;
+use FCM1::Base;
+use FCM1::CfgLine;
+use FCM1::Config;
+use FCM1::Keyword;
+use FCM1::Util;
# List of property methods for this class
my @scalar_properties = (
'actual_src', # actual source of configuration file
- 'lines', # list of lines, Fcm::CfgLine objects
+ 'lines', # list of lines, FCM1::CfgLine objects
'pegrev', # peg revision of configuration file
'src', # source of configuration file
'type', # type of configuration file
@@ -58,10 +58,10 @@ my @scalar_properties = (
# ------------------------------------------------------------------------------
# SYNOPSIS
-# $obj = Fcm::CfgFile->new (%args);
+# $obj = FCM1::CfgFile->new (%args);
#
# DESCRIPTION
-# This method constructs a new instance of the Fcm::CfgFile class. See above
+# This method constructs a new instance of the FCM1::CfgFile class. See above
# for allowed list of properties. (KEYS should be in uppercase.)
# ------------------------------------------------------------------------------
@@ -70,7 +70,7 @@ sub new {
my %args = @_;
my $class = ref $this || $this;
- my $self = Fcm::Base->new (%args);
+ my $self = FCM1::Base->new (%args);
bless $self, $class;
@@ -147,13 +147,13 @@ sub read_cfg {
# List of CFG types that need INC declarations expansion
my %exp_inc = ();
- for (split (/$Fcm::Config::DELIMITER_LIST/, $self->setting ('CFG_EXP_INC'))) {
+ for (split (/$FCM1::Config::DELIMITER_LIST/, $self->setting ('CFG_EXP_INC'))) {
$exp_inc{uc ($_)} = 1;
}
# List of CFG labels that are reserved keywords
my %cfg_keywords = ();
- for (split (/$Fcm::Config::DELIMITER_LIST/, $self->setting ('CFG_KEYWORD'))) {
+ for (split (/$FCM1::Config::DELIMITER_LIST/, $self->setting ('CFG_KEYWORD'))) {
$cfg_keywords{$self->cfglabel ($_)} = 1;
}
@@ -254,7 +254,7 @@ sub read_cfg {
if ($src) {
# Invoke a new instance to read the source
- my $cfg = Fcm::CfgFile->new (
+ my $cfg = FCM1::CfgFile->new (
SRC => expand_tilde ($src), TYPE => $self->type,
);
@@ -262,20 +262,20 @@ sub read_cfg {
# Add lines to the lines array in the current configuration file
$comment = 'INC ' . $src . ' ';
- push @{$self->lines}, Fcm::CfgLine->new (
+ push @{$self->lines}, FCM1::CfgLine->new (
comment => $comment . '# Start',
number => ($start ? $start->number : $line_num),
src => $self->actual_src,
warning => $warning,
);
push @{ $self->lines }, @{ $cfg->lines };
- push @{$self->lines}, Fcm::CfgLine->new (
+ push @{$self->lines}, FCM1::CfgLine->new (
comment => $comment . '# End',
src => $self->actual_src,
);
} else {
- push @{$self->lines}, Fcm::CfgLine->new (
+ push @{$self->lines}, FCM1::CfgLine->new (
number => $line_num,
src => $self->actual_src,
warning => 'empty INC declaration.'
@@ -284,7 +284,7 @@ sub read_cfg {
} else {
# Push label:value pair into lines array
- push @{$self->lines}, Fcm::CfgLine->new (
+ push @{$self->lines}, FCM1::CfgLine->new (
label => $label,
value => ($label ? $value : ''),
comment => $comment,
@@ -302,7 +302,7 @@ sub read_cfg {
# Check config file type and version
if (index (uc ($slabel), $self->cfglabel ('CFGFILE')) == 0) {
- my @words = split /$Fcm::Config::DELIMITER_PATTERN/, $slabel;
+ my @words = split /$FCM1::Config::DELIMITER_PATTERN/, $slabel;
shift @words;
my $name = @words ? lc ($words[0]) : 'type';
@@ -485,7 +485,7 @@ sub _get_cfg_lines {
}
if ($self->src() =~ qr{\A([A-Za-z][\w\+-\.]*):}xms) {
# $self->src() is a URI, try "svn cat"
- my $src = Fcm::Util::tidy_url(Fcm::Keyword::expand($self->src()));
+ my $src = FCM1::Util::tidy_url(FCM1::Keyword::expand($self->src()));
my ($uri, $rev) = $src =~ qr{\A(.+?)(?:\@([^\@]+))?\z}msx;
$rev ||= 'HEAD';
for my $paths_ref (@paths_refs) {
View
34 lib/Fcm/CfgLine.pm → lib/FCM1/CfgLine.pm
@@ -17,7 +17,7 @@
# along with FCM. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------------
# NAME
-# Fcm::CfgLine
+# FCM1::CfgLine
#
# DESCRIPTION
# This class is used for grouping the settings in each line of a FCM
@@ -25,8 +25,8 @@
#
# ------------------------------------------------------------------------------
-package Fcm::CfgLine;
-@ISA = qw(Fcm::Base);
+package FCM1::CfgLine;
+@ISA = qw(FCM1::Base);
# Standard pragma
use warnings;
@@ -36,9 +36,9 @@ use strict;
use File::Basename;
# In-house modules
-use Fcm::Base;
-use Fcm::Config;
-use Fcm::Util;
+use FCM1::Base;
+use FCM1::Config;
+use FCM1::Util;
# List of property methods for this class
my @scalar_properties = (
@@ -61,19 +61,19 @@ our $COMMENT_RULER = '-' x 78;
# ------------------------------------------------------------------------------
# SYNOPSIS
-# @cfglines = Fcm::CfgLine->comment_block (@comment);
+# @cfglines = FCM1::CfgLine->comment_block (@comment);
#
# DESCRIPTION
-# This method returns a list of Fcm::CfgLine objects representing a comment
+# This method returns a list of FCM1::CfgLine objects representing a comment
# block with the comment string @comment.
# ------------------------------------------------------------------------------
sub comment_block {
my @return = (
- Fcm::CfgLine->new (comment => $COMMENT_RULER),
- (map {Fcm::CfgLine->new (comment => $_)} @_),
- Fcm::CfgLine->new (comment => $COMMENT_RULER),
- Fcm::CfgLine->new (),
+ FCM1::CfgLine->new (comment => $COMMENT_RULER),
+ (map {FCM1::CfgLine->new (comment => $_)} @_),
+ FCM1::CfgLine->new (comment => $COMMENT_RULER),
+ FCM1::CfgLine->new (),
);
return @return;
@@ -81,10 +81,10 @@ sub comment_block {
# ------------------------------------------------------------------------------
# SYNOPSIS
-# $obj = Fcm::CfgLine->new (%args);
+# $obj = FCM1::CfgLine->new (%args);
#
# DESCRIPTION
-# This method constructs a new instance of the Fcm::CfgLine class. See above
+# This method constructs a new instance of the FCM1::CfgLine class. See above
# for allowed list of properties. (KEYS should be in uppercase.)
# ------------------------------------------------------------------------------
@@ -93,7 +93,7 @@ sub new {
my %args = @_;
my $class = ref $this || $this;
- my $self = Fcm::Base->new (%args);
+ my $self = FCM1::Base->new (%args);
for (@scalar_properties) {
$self->{$_} = exists $args{uc ($_)} ? $args{uc ($_)} : undef;
@@ -170,7 +170,7 @@ for my $name (qw/label slabel/) {
my $sub_name = $name . '_fields';
*$sub_name = sub {
- return (split (/$Fcm::Config::DELIMITER_PATTERN/, $_[0]->$name));
+ return (split (/$FCM1::Config::DELIMITER_PATTERN/, $_[0]->$name));
}
}
@@ -191,7 +191,7 @@ for my $name (qw/label slabel/) {
my ($self, $index) = @_;
my $method = $name . '_fields';
my @fields = $self->$method;
- return join ($Fcm::Config::DELIMITER, @fields[$index .. $#fields]);
+ return join ($FCM1::Config::DELIMITER, @fields[$index .. $#fields]);
}
}
View
186 lib/Fcm/Cm.pm → lib/FCM1/Cm.pm
@@ -17,7 +17,7 @@
# along with FCM. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------------
# NAME
-# Fcm::Cm
+# FCM1::Cm
#
# DESCRIPTION
# This module contains the FCM code management functionalities and wrappers
@@ -27,18 +27,18 @@
use strict;
use warnings;
-package Fcm::Cm;
+package FCM1::Cm;
use base qw{Exporter};
our @EXPORT_OK = qw(cm_check_missing cm_check_unknown cm_switch cm_update);
use Cwd qw{cwd};
use FCM::System::Exception;
-use Fcm::Config;
-use Fcm::CmBranch;
-use Fcm::CmUrl;
-use Fcm::Keyword;
-use Fcm::Util qw{
+use FCM1::Config;
+use FCM1::CmBranch;
+use FCM1::CmUrl;
+use FCM1::Keyword;
+use FCM1::Util qw{
get_url_of_wc
get_url_peg_of_wc
is_url
@@ -239,28 +239,28 @@ sub set_util {
our $COMMIT_MESSAGE_UTIL;
sub set_commit_message_util {
$COMMIT_MESSAGE_UTIL = shift();
- Fcm::CmBranch::set_commit_message_util($COMMIT_MESSAGE_UTIL);
+ FCM1::CmBranch::set_commit_message_util($COMMIT_MESSAGE_UTIL);
}
# Set the SVN utility provided by FCM::System::CM.
our $SVN;
sub set_svn_util {
$SVN = shift();
- Fcm::CmUrl::set_svn_util($SVN);
- Fcm::CmBranch::set_svn_util($SVN);
+ FCM1::CmUrl::set_svn_util($SVN);
+ FCM1::CmBranch::set_svn_util($SVN);
}
-# Returns the branch URL as an instance of Fcm::CmUrl.
+# Returns the branch URL as an instance of FCM1::CmUrl.
sub _branch_url {
my $arg = shift();
my $url
- = $arg && is_url($arg) ? Fcm::CmUrl->new(URL => $arg)
- : $arg && is_wc($arg) ? Fcm::CmUrl->new(URL => get_url_of_wc($arg))
- : is_wc() ? Fcm::CmUrl->new(URL => get_url_of_wc())
+ = $arg && is_url($arg) ? FCM1::CmUrl->new(URL => $arg)
+ : $arg && is_wc($arg) ? FCM1::CmUrl->new(URL => get_url_of_wc($arg))
+ : is_wc() ? FCM1::CmUrl->new(URL => get_url_of_wc())
: undef
;
if (!$url) {
- return _cm_err(Fcm::Cm::Exception->INVALID_TARGET, '.');
+ return _cm_err(FCM1::Cm::Exception->INVALID_TARGET, '.');
}
$url;
}
@@ -298,11 +298,11 @@ sub cm_branch_diff {
my $target_is_path = !is_url($target);
# Get repository and branch information
- my $url = bless(_branch_url($target), 'Fcm::CmBranch');
+ my $url = bless(_branch_url($target), 'FCM1::CmBranch');
# Check that URL is a standard FCM branch
if (!$url->is_branch()) {
- return _cm_err(Fcm::Cm::Exception->INVALID_BRANCH, $url->url_peg());
+ return _cm_err(FCM1::Cm::Exception->INVALID_BRANCH, $url->url_peg());
}
# Save and remove sub-directory part of the URL
@@ -311,18 +311,18 @@ sub cm_branch_diff {
# Check that $url exists
if (!$url->url_exists()) {
- return _cm_err(Fcm::Cm::Exception->INVALID_URL, $url->url_peg());
+ return _cm_err(FCM1::Cm::Exception->INVALID_URL, $url->url_peg());
}
# Compare current branch with its parent
- my $parent = Fcm::CmBranch->new(URL => $url->parent()->url());
+ my $parent = FCM1::CmBranch->new(URL => $url->parent()->url());
if ($url->pegrev()) {
$parent->url_peg($parent->url() . '@' . $url->pegrev());
}
if (!$parent->url_exists()) {
return _cm_err(
- Fcm::Cm::Exception->PARENT_NOT_EXIST, $url->url_peg(), $parent->url(),
+ FCM1::Cm::Exception->PARENT_NOT_EXIST, $url->url_peg(), $parent->url(),
);
}
@@ -348,7 +348,7 @@ sub cm_branch_diff {
}
else { # if $option_ref->{trac}
my $browser = $UTIL->external_cfg_get('browser');
- my $trac_url = Fcm::Keyword::get_browser_url($url->project_url());
+ my $trac_url = FCM1::Keyword::get_browser_url($url->project_url());
# FIXME: assuming that the browser URL uses the InterTrac syntax
$trac_url =~ s{/intertrac/.*$}{/intertrac/$wiki_syntax}xms;
my %value_of = %{$UTIL->shell_simple([$browser, $trac_url])};
@@ -376,13 +376,13 @@ sub cm_branch_diff {
sub cm_branch_info {
my ($option_ref, $arg) = @_;
my $url = _branch_url($arg);
- Fcm::Config->instance()->verbose($option_ref->{verbose} ? 1 : 0);
- my $branch = Fcm::CmBranch->new(URL => $url->url_peg());
+ FCM1::Config->instance()->verbose($option_ref->{verbose} ? 1 : 0);
+ my $branch = FCM1::CmBranch->new(URL => $url->url_peg());
if (!$branch->branch()) {
- return _cm_err(Fcm::Cm::Exception->INVALID_BRANCH, $branch->url_peg());
+ return _cm_err(FCM1::Cm::Exception->INVALID_BRANCH, $branch->url_peg());
}
if (!$branch->url_exists()) {
- return _cm_err(Fcm::Cm::Exception->NOT_EXIST, $branch->url_peg());
+ return _cm_err(FCM1::Cm::Exception->NOT_EXIST, $branch->url_peg());
}
$branch->url_peg($branch->branch_url_peg());
$option_ref->{'show-children'} ||= $option_ref->{'show-all'};
@@ -398,7 +398,7 @@ sub cm_branch_info {
# ------------------------------------------------------------------------------
# SYNOPSIS
-# &Fcm::Cm::cm_commit ();
+# &FCM1::Cm::cm_commit ();
#
# DESCRIPTION
# This is a FCM wrapper to the "svn commit" command.
@@ -408,12 +408,12 @@ sub cm_commit {
my ($option_ref, $path) = @_;
$path ||= cwd();
if (!-e $path) {
- return _cm_err(Fcm::Cm::Exception->NOT_EXIST, $path);
+ return _cm_err(FCM1::Cm::Exception->NOT_EXIST, $path);
}
# Make sure we are in a working copy
if (!is_wc($path)) {
- return _cm_err(Fcm::Cm::Exception->INVALID_WC, $path);
+ return _cm_err(FCM1::Cm::Exception->INVALID_WC, $path);
}
# Make sure we are at the top level of the working copy
@@ -421,7 +421,7 @@ sub cm_commit {
my $dir = $SVN->get_wc_root($path);
if ($dir ne cwd ()) {
- chdir($dir) || return _cm_err(Fcm::Cm::Exception->CHDIR, $dir);
+ chdir($dir) || return _cm_err(FCM1::Cm::Exception->CHDIR, $dir);
$CLI_MESSAGE->('CHDIR_WCT', $dir);
}
@@ -458,7 +458,7 @@ sub cm_commit {
my @lines = map {"$_\n"} @{$st_lines_of{$key}};
$CLI_MESSAGE->('ST_' . $key, join(q{}, @lines));
}
- return _cm_abort(Fcm::Cm::Abort->FAIL);
+ return _cm_abort(FCM1::Cm::Abort->FAIL);
}
}
@@ -470,7 +470,7 @@ sub cm_commit {
# Abort if there is no change in the working copy
if (!@status) {
- return _cm_abort(Fcm::Cm::Abort->NULL);
+ return _cm_abort(FCM1::Cm::Abort->NULL);
}
# Get associated URL of current working copy
@@ -549,7 +549,7 @@ sub cm_commit {
# ------------------------------------------------------------------------------
# SYNOPSIS
-# &Fcm::Cm::cm_merge ();
+# &FCM1::Cm::cm_merge ();
#
# DESCRIPTION
# This is a wrapper to "svn merge".
@@ -559,16 +559,16 @@ sub cm_merge {
my ($option_ref, @args) = @_;
# Find out the URL of the working copy
if (!is_wc()) {
- return _cm_err(Fcm::Cm::Exception->INVALID_WC, '.');
+ return _cm_err(FCM1::Cm::Exception->INVALID_WC, '.');
}
my $wct = $SVN->get_wc_root();
if ($wct ne cwd()) {
- chdir($wct) || return _cm_err(Fcm::Cm::Exception->CHDIR, $wct);
+ chdir($wct) || return _cm_err(FCM1::Cm::Exception->CHDIR, $wct);
$CLI_MESSAGE->('CHDIR_WCT', $wct);
}
- my $target = Fcm::CmBranch->new(URL => get_url_of_wc($wct));
+ my $target = FCM1::CmBranch->new(URL => get_url_of_wc($wct));
if (!$target->url_exists()) {
- return _cm_err(Fcm::Cm::Exception->WC_URL_NOT_EXIST, '.');
+ return _cm_err(FCM1::Cm::Exception->WC_URL_NOT_EXIST, '.');
}
# The target must be at the top of a branch
@@ -590,7 +590,7 @@ sub cm_merge {
if ($option_ref->{reverse}) {
# Reverse merge, the SOURCE is the working copy URL
- $source = Fcm::CmBranch->new (URL => $target->url);
+ $source = FCM1::CmBranch->new (URL => $target->url);
} else {
# Automatic/custom merge, argument 1 is the SOURCE of the merge
@@ -687,17 +687,17 @@ sub cm_merge {
# --------------------------------------------------------------------------
# Check to ensure source branch is not the same as the target branch
if (!$target->branch()) {
- return _cm_err(Fcm::Cm::Exception->WC_INVALID_BRANCH, $wct);
+ return _cm_err(FCM1::Cm::Exception->WC_INVALID_BRANCH, $wct);
}
if ($source->branch() eq $target->branch()) {
- return _cm_err(Fcm::Cm::Exception->MERGE_SELF, $target->url_peg(), $wct);
+ return _cm_err(FCM1::Cm::Exception->MERGE_SELF, $target->url_peg(), $wct);
}
# Only allow the merge if the source and target are "directly related"
# --------------------------------------------------------------------------
my $anc = $target->ancestor ($source);
return _cm_err(
- Fcm::Cm::Exception->MERGE_UNRELATED, $target->url_peg(), $source->url_peg
+ FCM1::Cm::Exception->MERGE_UNRELATED, $target->url_peg(), $source->url_peg
) unless
($anc->url eq $target->url and $anc->url_peg eq $source->parent->url_peg)
or
@@ -725,7 +725,7 @@ sub cm_merge {
}
} else {
- return _cm_abort(Fcm::Cm::Abort->NULL);
+ return _cm_abort(FCM1::Cm::Abort->NULL);
}
# If more than one merge available, prompt user to enter a revision number
@@ -743,11 +743,11 @@ sub cm_merge {
}
# Expand revision keyword if necessary
if ($reply) {
- $reply = (Fcm::Keyword::expand($target->project_url(), $reply))[1];
+ $reply = (FCM1::Keyword::expand($target->project_url(), $reply))[1];
}
# Check that the reply is a number in the available merges list
if (!grep {$_ eq $reply} @revs) {
- return _cm_err(Fcm::Cm::Exception->MERGE_REV_INVALID, $reply)
+ return _cm_err(FCM1::Cm::Exception->MERGE_REV_INVALID, $reply)
}
$source->url_peg($source->url() . '@' . $reply);
}
@@ -756,15 +756,15 @@ sub cm_merge {
# we need to check whether the merge will result in losing changes made in
# other sub-directories of the source.
if ($subdir and not $target->allow_subdir_merge_from ($source, $subdir)) {
- return _cm_err(Fcm::Cm::Exception->MERGE_UNSAFE, $source->url_peg());
+ return _cm_err(FCM1::Cm::Exception->MERGE_UNSAFE, $source->url_peg());
}
# Calculate the base of the merge
my $base = $target->base_of_merge_from ($source);
# $source and $base must take into account the sub-directory
- my $source_full = Fcm::CmBranch->new (URL => $source->url_peg);
- my $base_full = Fcm::CmBranch->new (URL => $base->url_peg);
+ my $source_full = FCM1::CmBranch->new (URL => $source->url_peg);
+ my $base_full = FCM1::CmBranch->new (URL => $base->url_peg);
if ($subdir) {
$source_full->url_peg(
@@ -806,7 +806,7 @@ sub cm_merge {
# Abort merge if it will result in no change
if (!$dry_run_output) {
- return _cm_abort(Fcm::Cm::Abort->NULL);
+ return _cm_abort(FCM1::Cm::Abort->NULL);
}
# Report result of "svn merge --dry-run"
@@ -862,7 +862,7 @@ sub cm_merge {
# ------------------------------------------------------------------------------
# SYNOPSIS
-# &Fcm::Cm::cm_mkpatch ();
+# &FCM1::Cm::cm_mkpatch ();
#
# DESCRIPTION
# This is a FCM command to create a patching script from particular revisions
@@ -895,12 +895,12 @@ sub cm_mkpatch {
_cli_err('CLI_USAGE', 'URL');
}
- my $url = Fcm::CmUrl->new (URL => $u);
+ my $url = FCM1::CmUrl->new (URL => $u);
if (!$url->is_url()) {
- return _cm_err(Fcm::Cm::Exception->INVALID_URL, $u);
+ return _cm_err(FCM1::Cm::Exception->INVALID_URL, $u);
}
if (!$url->url_exists()) {
- return _cm_err(Fcm::Cm::Exception->NOT_EXIST, $u);
+ return _cm_err(FCM1::Cm::Exception->NOT_EXIST, $u);
}
if (!$url->branch()) {
$CLI_MESSAGE->('INVALID_BRANCH', $u);
@@ -934,11 +934,11 @@ sub cm_mkpatch {
return _cm_abort();
}
- rmtree($outdir) || return _cm_err(Fcm::Cm::Exception->RMTREE, $outdir);
+ rmtree($outdir) || return _cm_err(FCM1::Cm::Exception->RMTREE, $outdir);
}
# (Re-)create output directory
- mkpath($outdir) || return _cm_err(Fcm::Cm::Exception->MKPATH, $outdir);
+ mkpath($outdir) || return _cm_err(FCM1::Cm::Exception->MKPATH, $outdir);
$CLI_MESSAGE->('OUT_DIR', $outdir);
# Get and process log of URL
@@ -1016,7 +1016,7 @@ sub cm_mkpatch {
# Create a directory for this revision in the output directory
my $outdir_rev = File::Spec->catfile ($outdir, $rev);
mkpath($outdir_rev)
- || return _cm_err(Fcm::Cm::Exception->MKPATH, $outdir_rev);
+ || return _cm_err(FCM1::Cm::Exception->MKPATH, $outdir_rev);
# Parse commit log message
my @msg = split /\n/, $log{$rev}{msg};
@@ -1093,7 +1093,7 @@ sub cm_mkpatch {
# History exists for this file
my $copyfrom_path = $log{$rev}{paths}{$path}{'copyfrom-path'};
my $copyfrom_rev = $log{$rev}{paths}{$path}{'copyfrom-rev'};
- my $cp_url = Fcm::CmUrl->new (
+ my $cp_url = FCM1::CmUrl->new (
URL => $url->root . $copyfrom_path . '@' . $copyfrom_rev,
);
@@ -1119,7 +1119,7 @@ sub cm_mkpatch {
# Check whether the "first" revision is copied from elsewhere.
if (exists $attrib{'copyfrom-path'}) {
# If source exists in the specified URL, set up the copy
- my $cp_cp_url = Fcm::CmUrl->new (
+ my $cp_cp_url = FCM1::CmUrl->new (
URL => $url->root . $attrib{'copyfrom-path'} . '@' .
$attrib{'copyfrom-rev'},
);
@@ -1271,7 +1271,7 @@ sub cm_mkpatch {
open FILE, '>', $out or die $out, ': cannot open (', $!, ')';
# Script header
- my $shell = Fcm::Config->instance()->setting(qw/TOOL SHELL/);
+ my $shell = FCM1::Config->instance()->setting(qw/TOOL SHELL/);
print FILE <<EOF;
#!$shell
# ------------------------------------------------------------------------------
@@ -1444,7 +1444,7 @@ EOF
rmtree $outdir or die $outdir, ': cannot remove';
# Diagnostic
- return _cm_abort(Fcm::Cm::Abort->NULL);
+ return _cm_abort(FCM1::Cm::Abort->NULL);
}
return 1;
@@ -1455,7 +1455,7 @@ EOF
sub _cli_err {
my ($key, @args) = @_;
my $message = sprintf($CLI_MESSAGE_FOR_ERROR{$key}, @args);
- die(Fcm::CLI::Exception->new({message => $message}));
+ die(FCM1::CLI::Exception->new({message => $message}));
}
# ------------------------------------------------------------------------------
@@ -1514,7 +1514,7 @@ sub _cli_keyword_expand_url {
next ARG;
}
eval {
- $value = Fcm::Util::tidy_url(Fcm::Keyword::expand($value));
+ $value = FCM1::Util::tidy_url(FCM1::Keyword::expand($value));
};
if ($@) {
if ($value ne 'fcm:revision') {
@@ -1558,7 +1558,7 @@ sub _cli_keyword_expand_rev {
my ($url, @url_list) = @targets;
for my $rev (@revs) {
if ($rev !~ $PATTERN_OF{SVN_REV}) {
- $rev = (Fcm::Keyword::expand($url, $rev))[1];
+ $rev = (FCM1::Keyword::expand($url, $rev))[1];
}
if (@url_list) {
$url = shift(@url_list);
@@ -1587,12 +1587,12 @@ sub _cli_message {
}
# ------------------------------------------------------------------------------
-# Wrapper for Fcm::Interactive::get_input.
+# Wrapper for FCM1::Interactive::get_input.
sub _cli_prompt {
my %option
= (type => 'yn', default => 'n', (ref($_[0]) ? %{shift(@_)} : ()));
my ($name, $key, @args) = @_;
- return Fcm::Interactive::get_input(
+ return FCM1::Interactive::get_input(
title => $CLI_PROMPT_PREFIX . $name,
message => sprintf($CLI_MESSAGE_FOR_PROMPT{$key}, @args),
%option,
@@ -1630,13 +1630,13 @@ sub cm_switch {
my ($source, $path) = @_;
$path ||= cwd();
if (!$source) {
- return _cm_err(Fcm::Cm::Exception->INVALID_TARGET, q{});
+ return _cm_err(FCM1::Cm::Exception->INVALID_TARGET, q{});
}
if (!-e $path) {
- return _cm_err(Fcm::Cm::Exception->NOT_EXIST, $path);
+ return _cm_err(FCM1::Cm::Exception->NOT_EXIST, $path);
}
if (!is_wc($path)) {
- return _cm_err(Fcm::Cm::Exception->INVALID_WC, $path);
+ return _cm_err(FCM1::Cm::Exception->INVALID_WC, $path);
}
# Check for merge template in the commit log file in the working copy
@@ -1645,7 +1645,7 @@ sub cm_switch {
my $commit_message_ctx = $COMMIT_MESSAGE_UTIL->load($commit_message_file);
if ($commit_message_ctx->get_auto_part()) {
return _cm_err(
- Fcm::Cm::Exception->SWITCH_UNSAFE,
+ FCM1::Cm::Exception->SWITCH_UNSAFE,
($path eq $path_of_wc
? File::Spec->abs2rel($commit_message_file)
: $commit_message_file
@@ -1669,7 +1669,7 @@ sub cm_switch {
($option{quiet} ? '--quiet' : ()),
_cm_get_source(
$source,
- Fcm::CmBranch->new(URL => $path_of_wc),
+ FCM1::CmBranch->new(URL => $path_of_wc),
)->url_peg(),
@targets,
);
@@ -1685,10 +1685,10 @@ sub cm_update {
}
for my $target (@targets) {
if (!-e $target) {
- return _cm_err(Fcm::Cm::Exception->NOT_EXIST, $target);
+ return _cm_err(FCM1::Cm::Exception->NOT_EXIST, $target);
}
if (!is_wc($target)) {
- return _cm_err(Fcm::Cm::Exception->INVALID_WC, $target);
+ return _cm_err(FCM1::Cm::Exception->INVALID_WC, $target);
}
$target = $SVN->get_wc_root($target);
if ($target eq cwd()) {
@@ -1711,7 +1711,7 @@ sub cm_update {
}
if ($option{revision} && $option{revision} !~ $PATTERN_OF{SVN_REV}) {
$option{revision} = (
- Fcm::Keyword::expand(get_url_of_wc($targets[0]), $option{revision})
+ FCM1::Keyword::expand(get_url_of_wc($targets[0]), $option{revision})
)[1];
}
_svn_update(\@targets, \%option);
@@ -1721,8 +1721,8 @@ sub cm_update {
# Raises an abort exception.
sub _cm_abort {
my ($code) = @_;
- $code ||= Fcm::Cm::Abort->USER;
- die(bless({code => $code, message => 'abort'}, 'Fcm::Cm::Abort'));
+ $code ||= FCM1::Cm::Abort->USER;
+ die(bless({code => $code, message => 'abort'}, 'FCM1::Cm::Abort'));
}
# ------------------------------------------------------------------------------
@@ -1731,12 +1731,12 @@ sub _cm_err {
my ($code, @targets) = @_;
die(bless(
{code => $code, message => "ERROR: $code", targets => \@targets},
- 'Fcm::Cm::Exception',
+ 'FCM1::Cm::Exception',
));
}
# ------------------------------------------------------------------------------
-# Return a corresponding Fcm::CmBranch instance for $source_url w.r.t. $target.
+# Return a corresponding FCM1::CmBranch instance for $source_url w.r.t. $target.
sub _cm_get_source {
my ($source_url, $target) = @_;
if (!$UTIL->uri_match($source_url)) {
@@ -1760,14 +1760,14 @@ sub _cm_get_source {
$peg ||= q{};
$source_url = join('/', $target->project_url(), $path) . $peg;
}
- my $source = Fcm::CmBranch->new(URL => $source_url);
+ my $source = FCM1::CmBranch->new(URL => $source_url);
my $layout = eval {$source->layout()};
if ($@) {
$@ = undef;
- return _cm_err(Fcm::Cm::Exception->INVALID_URL, $source_url);
+ return _cm_err(FCM1::Cm::Exception->INVALID_URL, $source_url);
}
if (!$layout->get_branch()) {
- return _cm_err(Fcm::Cm::Exception->INVALID_BRANCH, $source_url);
+ return _cm_err(FCM1::Cm::Exception->INVALID_BRANCH, $source_url);
}
$source->url_peg(
$source->branch_url() . '/' . $target->subdir() . '@' . $source->pegrev()
@@ -1775,7 +1775,7 @@ sub _cm_get_source {
# Ensure that the source and target URLs are in the same project
if ($source->project_url() ne $target->project_url()) {
return _cm_err(
- Fcm::Cm::Exception->DIFF_PROJECTS,
+ FCM1::Cm::Exception->DIFF_PROJECTS,
$target->url_peg(),
$source->url_peg(),
);
@@ -1846,13 +1846,13 @@ sub _svn_update {
# ------------------------------------------------------------------------------
# CLI exception.
-package Fcm::CLI::Exception;
-use base qw{Fcm::Exception};
+package FCM1::CLI::Exception;
+use base qw{FCM1::Exception};
# ------------------------------------------------------------------------------
# Abort exception.
-package Fcm::Cm::Abort;
-use base qw{Fcm::Exception};
+package FCM1::Cm::Abort;
+use base qw{FCM1::Exception};
use constant {FAIL => 'FAIL', NULL => 'NULL', USER => 'USER'};
sub get_code {
@@ -1861,8 +1861,8 @@ sub get_code {
# ------------------------------------------------------------------------------
# Resource exception.
-package Fcm::Cm::Exception;
-our @ISA = qw{Fcm::Cm::Abort};
+package FCM1::Cm::Exception;
+our @ISA = qw{FCM1::Cm::Abort};
use constant {
CHDIR => 'CHDIR',
DIFF_PROJECTS => 'DIFF_PROJECTS',
@@ -1895,11 +1895,11 @@ __END__
=head1 NAME
-Fcm::Cm
+FCM1::Cm
=head1 SYNOPSIS
- use Fcm::Cm qw{cm_check_missing cm_check_unknown cm_switch cm_update};
+ use FCM1::Cm qw{cm_check_missing cm_check_unknown cm_switch cm_update};
# Checks status for "missing" items and "svn delete" them
$missing_st_handler = sub {
@@ -2003,9 +2003,9 @@ The following exceptions can be raised:
=over 4
-=item Fcm::Cm::Abort
+=item FCM1::Cm::Abort
-This exception @ISA L<Fcm::Exception|Fcm::Exception>. It is raised if a command
+This exception @ISA L<FCM1::Exception|FCM1::Exception>. It is raised if a command
is aborted for some reason. The $e->get_code() method can be used to retrieve an
error code, which can be one of the following:
@@ -2025,9 +2025,9 @@ The command aborts because of an action by the user.
=back
-=item Fcm::Cm::Exception
+=item FCM1::Cm::Exception
-This exception @ISA L<Fcm::Abort|Fcm::Abort>. It is raised if a command fails
+This exception @ISA L<FCM1::Abort|FCM1::Abort>. It is raised if a command fails
with a known reason. The $e->get_targets() method can be used to retrieve a list
of targets/resources associated with this exception. The $e->get_code() method
can be used to retrieve an error code, which can be one of the following:
@@ -2113,7 +2113,7 @@ The URL of the target working copy no longer exists at the HEAD revision.
=head1 TO DO
-Reintegrate with L<Fcm::CmUrl|Fcm::CmUrl> and L<Fcm::CmBranch|Fcm::CmBranch>,
+Reintegrate with L<FCM1::CmUrl|FCM1::CmUrl> and L<FCM1::CmBranch|FCM1::CmBranch>,
but separate this module into the CLI part and the CM part. Expose the remaining
CM functions when this is done.
@@ -2143,7 +2143,7 @@ The URL of the target working copy no longer exists at the HEAD revision.
=head1 TO DO
-Reintegrate with L<Fcm::CmUrl|Fcm::CmUrl> and L<Fcm::CmBranch|Fcm::CmBranch>,
+Reintegrate with L<FCM1::CmUrl|FCM1::CmUrl> and L<FCM1::CmBranch|FCM1::CmBranch>,
but separate this module into the CLI part and the CM part. Expose the remaining
CM functions when this is done.
View
62 lib/Fcm/CmBranch.pm → lib/FCM1/CmBranch.pm
@@ -17,31 +17,31 @@
# along with FCM. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------------------
# NAME
-# Fcm::CmBranch
+# FCM1::CmBranch
#
# DESCRIPTION
# This class contains methods for manipulating a branch. It is a sub-class of
-# Fcm::CmUrl, and inherits all methods from that class.
+# FCM1::CmUrl, and inherits all methods from that class.
#
# ------------------------------------------------------------------------------
-package Fcm::CmBranch;
-use base qw{Fcm::CmUrl};
+package FCM1::CmBranch;
+use base qw{FCM1::CmUrl};
use strict;
use warnings;
-use Fcm::Config;
-use Fcm::Interactive;
-use Fcm::Keyword;
-use Fcm::Util qw/e_report w_report svn_date/;
+use FCM1::Config;
+use FCM1::Interactive;
+use FCM1::Keyword;
+use FCM1::Util qw/e_report w_report svn_date/;
my @properties = (
'CREATE_REV', # revision at which the branch is created
'DELETE_REV', # revision at which the branch is deleted
- 'PARENT', # reference to parent branch Fcm::CmBranch
+ 'PARENT', # reference to parent branch FCM1::CmBranch
'ANCESTOR', # list of common ancestors with other branches
- # key = URL, value = ancestor Fcm::CmBranch
+ # key = URL, value = ancestor FCM1::CmBranch
'LAST_MERGE', # list of last merges from branches
# key = URL@REV, value = [TARGET, UPPER, LOWER]
'AVAIL_MERGE', # list of available revisions for merging
@@ -64,10 +64,10 @@ sub set_svn_util {
# ------------------------------------------------------------------------------
# SYNOPSIS
-# $cm_branch = Fcm::CmBranch->new (URL => $url,);
+# $cm_branch = FCM1::CmBranch->new (URL => $url,);
#
# DESCRIPTION
-# This method constructs a new instance of the Fcm::CmBranch class.
+# This method constructs a new instance of the FCM1::CmBranch class.
#
# ARGUMENTS
# URL - URL of a branch
@@ -78,7 +78,7 @@ sub new {
my %args = @_;
my $class = ref $this || $this;
- my $self = Fcm::CmUrl->new (%args);
+ my $self = FCM1::CmUrl->new (%args);
$self->{$_} = undef for (@properties);
@@ -146,7 +146,7 @@ sub create_rev {
# $parent = $cm_branch->parent;
#
# DESCRIPTION
-# This method returns the parent (a Fcm::CmBranch object) of the current
+# This method returns the parent (a FCM1::CmBranch object) of the current
# branch.
# ------------------------------------------------------------------------------
@@ -165,7 +165,7 @@ sub parent {
# Current branch is copied from somewhere, set the source as the parent
my $url = $self->root . $path->{'copyfrom-path'};
my $rev = $path->{'copyfrom-rev'};
- $self->{PARENT} = Fcm::CmBranch->new (URL => $url . '@' . $rev);
+ $self->{PARENT} = FCM1::CmBranch->new (URL => $url . '@' . $rev);
} else {
# Current branch is not copied from somewhere
@@ -197,7 +197,7 @@ sub delete_rev {
# Use "svn log" on the container between a revision where the branch exists
# and the HEAD
- my $dir = Fcm::CmUrl->new (URL => $dir_url);
+ my $dir = FCM1::CmUrl->new (URL => $dir_url);
my %log = $dir->svnlog (
REV => ['HEAD', ($self->pegrev ? $self->pegrev : $self->create_rev)],
);
@@ -289,7 +289,7 @@ sub _get_relatives {
next URL;
}
- my $branch = Fcm::CmBranch->new(URL => $url_peg);
+ my $branch = FCM1::CmBranch->new(URL => $url_peg);
# Test whether $branch is a relative we are looking for
my $can_return = $relation eq 'CHILDREN'
@@ -307,7 +307,7 @@ sub _get_relatives {
# @children = $cm_branch->children;
#
# DESCRIPTION
-# This method returns a list of children (Fcm::CmBranch objects) of the
+# This method returns a list of children (FCM1::CmBranch objects) of the
# current branch that exists in the current revision.
# ------------------------------------------------------------------------------
@@ -324,7 +324,7 @@ sub children {
# @siblings = $cm_branch->siblings;
#
# DESCRIPTION
-# This method returns a list of siblings (Fcm::CmBranch objects) of the
+# This method returns a list of siblings (FCM1::CmBranch objects) of the
# current branch that exists in the current revision.
# ------------------------------------------------------------------------------
@@ -341,9 +341,9 @@ sub siblings {
# $ancestor = $cm_branch->ancestor ($branch);
#
# DESCRIPTION
-# This method returns the common ancestor (a Fcm::CmBranch object) of a
+# This method returns the common ancestor (a FCM1::CmBranch object) of a
# specified $branch and the current branch. The argument $branch must be a
-# Fcm::CmBranch object. Both the current branch and $branch are assumed to be
+# FCM1::CmBranch object. Both the current branch and $branch are assumed to be
# in the same project.
# ------------------------------------------------------------------------------
@@ -428,10 +428,10 @@ sub ancestor {
# DESCRIPTION
# This method returns a 3-element list with information of the last merge
# into the current branch from a specified $branch. The first element in the
-# list $target (a Fcm::CmBranch object) is the target at which the merge was
+# list $target (a FCM1::CmBranch object) is the target at which the merge was
# performed. (This can be the current branch or a parent branch up to the
# common ancestor with the specified $branch.) The second and third elements,
-# $upper and $lower, (both Fcm::CmBranch objects), are the upper and lower
+# $upper and $lower, (both FCM1::CmBranch objects), are the upper and lower
# ends of the source delta. If there is no merge from $branch into the
# current branch from their common ancestor to the current revision, this
# method will return an empty list. If $stop_on_copy is specified, it ignores
@@ -492,9 +492,9 @@ sub last_merge_from {
# Set the return values
$self->{LAST_MERGE}{$branch->url_peg} = [
- Fcm::CmBranch->new (URL => $cr->url . '@' . $rev), # target
- Fcm::CmBranch->new (URL => $self->root . $u_path), # delta upper
- Fcm::CmBranch->new (URL => $self->root . $l_path), # delta lower
+ FCM1::CmBranch->new (URL => $cr->url . '@' . $rev), # target
+ FCM1::CmBranch->new (URL => $self->root . $u_path), # delta upper
+ FCM1::CmBranch->new (URL => $self->root . $l_path), # delta lower
];
last REV;
@@ -565,7 +565,7 @@ sub avail_merge_from {
# $lower = $cm_branch->base_of_merge_from ($branch);