pf-tools commit: r886 [ccaillet-guest] - in /branches/next-gen: debian/changelog lib/PFTools/Utils.pm lib/PFTools/VCS.pm
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Tue Sep 7 13:36:32 UTC 2010
Author: ccaillet-guest
Date: Tue Sep 7 13:36:30 2010
New Revision: 886
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=886
Log:
- renaming call to VCS_checkout instead of VCS_update
* lib/PFTools/VCS.pm
- renaming *_update into *_checkout which is better according to the
functionality
Modified:
branches/next-gen/debian/changelog
branches/next-gen/lib/PFTools/Utils.pm
branches/next-gen/lib/PFTools/VCS.pm
Modified: branches/next-gen/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/branches/next-gen/debian/changelog?rev=886&op=diff
==============================================================================
--- branches/next-gen/debian/changelog (original)
+++ branches/next-gen/debian/changelog Tue Sep 7 13:36:30 2010
@@ -13,8 +13,12 @@
- correctly handle pf_config_file into Init_TOOLS
- adding hosttype parameter where calling Init_SUBST function
- comment the check for checking if a depend exists
-
- -- Christophe Caillet <quadchris at free.fr> Mon, 06 Sep 2010 08:29:45 +0200
+ - renaming call to VCS_checkout instead of VCS_update
+ * lib/PFTools/VCS.pm
+ - renaming *_update into *_checkout which is better according to the
+ functionality
+
+ -- Christophe Caillet <tof at sitadelle.com> Tue, 07 Sep 2010 15:34:28 +0200
pf-tools (0.99.99-1) unstable; urgency=low
Modified: branches/next-gen/lib/PFTools/Utils.pm
URL: http://svn.debian.org/wsvn/pf-tools/branches/next-gen/lib/PFTools/Utils.pm?rev=886&op=diff
==============================================================================
--- branches/next-gen/lib/PFTools/Utils.pm (original)
+++ branches/next-gen/lib/PFTools/Utils.pm Tue Sep 7 13:36:30 2010
@@ -96,7 +96,7 @@
$hostname, {}, $pf_config );
if ( !-e $source ) {
Set_deferredlog();
- if ( !VCS_update( $hostname, $pf_config, {} ) ) {
+ if ( !VCS_checkout( $hostname, $pf_config, {} ) ) {
Abort( $CODE->{'EXEC'},
"Unable to checkout configuration from VCS system" );
}
@@ -1106,7 +1106,7 @@
my $errorcount = 0;
Set_deferredlog();
- if ( !VCS_update( $hostname, $pf_config, $options ) ) {
+ if ( !VCS_checkout( $hostname, $pf_config, $options ) ) {
Abort( $CODE->{'EXEC'},
"Unable to checkout configuration from VCS system" );
}
Modified: branches/next-gen/lib/PFTools/VCS.pm
URL: http://svn.debian.org/wsvn/pf-tools/branches/next-gen/lib/PFTools/VCS.pm?rev=886&op=diff
==============================================================================
--- branches/next-gen/lib/PFTools/VCS.pm (original)
+++ branches/next-gen/lib/PFTools/VCS.pm Tue Sep 7 13:36:30 2010
@@ -33,11 +33,11 @@
our @ISA = ('Exporter');
our @EXPORT = qw(
- VCS_update
+ VCS_checkout
);
# Updating CVS repository
-sub __CVS_update ($$$) {
+sub __CVS_checkout ($$$) {
my ( $hostname, $pf_config, $options ) = @_;
my $cvs_cmd = $pf_config->{'vcs'}->{'command'};
@@ -88,6 +88,10 @@
if ( !-d $co_dir ) {
system( "/bin/mkdir -p '" . $co_dir . "' 2>/dev/null" );
}
+ else {
+ system( "/bin/rm -rf '".$co_dir."'; /bin/mkdir -p '".
+ $co_dir."' 2>/dev/null" );
+ }
$ret = deferredlogsystem( "cd '" . $co_dir . "';" . $cvs_cmd );
if ($ret) {
@@ -100,7 +104,7 @@
return $ret;
}
-sub __SVN_update ($$$) {
+sub __SVN_checkout ($$$) {
my ( $hostname, $pf_config, $options ) = @_;
my $svn_cmd = $pf_config->{'vcs'}->{'command'};
@@ -140,7 +144,11 @@
if ( !-d $co_dir ) {
system( "/bin/mkdir -p '" . $co_dir . "' 2>/dev/null" );
}
-
+ else {
+ system( "/bin/rm -rf '".$co_dir."'; /bin/mkdir -p '".
+ $co_dir."' 2>/dev/null" );
+ }
+
$ret = deferredlogsystem( "cd '" . $co_dir . "';" . $svn_cmd );
if ($ret) {
FlushLog();
@@ -152,16 +160,16 @@
return $ret;
}
-sub VCS_update ($$$) {
+sub VCS_checkout ($$$) {
my ( $hostname, $pf_config, $options ) = @_;
if ( $pf_config->{'vcs'}->{'type'} eq 'cvs' ) {
- if ( __CVS_update( $hostname, $pf_config, $options ) ) {
+ if ( __CVS_checkout( $hostname, $pf_config, $options ) ) {
return 0;
}
}
elsif ( $pf_config->{'vcs'}->{'type'} eq 'svn' ) {
- if ( __SVN_update( $hostname, $pf_config, $options ) ) {
+ if ( __SVN_checkout( $hostname, $pf_config, $options ) ) {
return 0;
}
}
More information about the pf-tools-commits
mailing list