[vhffs-dev] [1969] archives for svn, cvs, web, repository, bazaar, git, mercurial

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1969
Author:   gradator
Date:     2012-01-29 01:26:34 +0100 (Sun, 29 Jan 2012)
Log Message:
-----------
archives for svn, cvs, web, repository, bazaar, git, mercurial

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Robots/Bazaar.pm
    trunk/vhffs-api/src/Vhffs/Robots/Cvs.pm
    trunk/vhffs-api/src/Vhffs/Robots/Git.pm
    trunk/vhffs-api/src/Vhffs/Robots/Mercurial.pm
    trunk/vhffs-api/src/Vhffs/Robots/Repository.pm
    trunk/vhffs-api/src/Vhffs/Robots/Svn.pm
    trunk/vhffs-api/src/Vhffs/Robots/Web.pm
    trunk/vhffs-api/src/Vhffs/Robots.pm

Modified: trunk/vhffs-api/src/Vhffs/Robots/Bazaar.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Bazaar.pm	2012-01-28 23:52:20 UTC (rev 1968)
+++ trunk/vhffs-api/src/Vhffs/Robots/Bazaar.pm	2012-01-29 00:26:34 UTC (rev 1969)
@@ -99,6 +99,8 @@
 
 	# Remove Bazaar dir and group dir if empty
 	my $dir = $bazaar->get_dir;
+	Vhffs::Robots::archive_targz( $bazaar->{main}, $bazaar, $dir );
+
 	File::Path::rmtree($dir) if(-d $dir);
 	my $groupdir = dirname($dir);
 	rmdir($groupdir);

Modified: trunk/vhffs-api/src/Vhffs/Robots/Cvs.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Cvs.pm	2012-01-28 23:52:20 UTC (rev 1968)
+++ trunk/vhffs-api/src/Vhffs/Robots/Cvs.pm	2012-01-29 00:26:34 UTC (rev 1969)
@@ -86,6 +86,8 @@
 	return -1 unless defined $cvs;
 
 	my $dir = $cvs->get_dir;
+	Vhffs::Robots::archive_targz( $cvs->{main}, $cvs, $dir );
+
 	File::Path::rmtree($dir) if(-d $dir);
 	# Remove parent dir if empty (i.e. this group has no move CVSes).
 	my $groupdir = dirname($dir);

Modified: trunk/vhffs-api/src/Vhffs/Robots/Git.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Git.pm	2012-01-28 23:52:20 UTC (rev 1968)
+++ trunk/vhffs-api/src/Vhffs/Robots/Git.pm	2012-01-29 00:26:34 UTC (rev 1969)
@@ -115,6 +115,8 @@
 
 	# Remove GIT dir and group dir if empty
 	my $dir = $git->get_dir;
+	Vhffs::Robots::archive_targz( $git->{main}, $git, $dir );
+
 	File::Path::rmtree($dir) if(-d $dir);
 	my $groupdir = dirname($dir);
 	rmdir($groupdir);

Modified: trunk/vhffs-api/src/Vhffs/Robots/Mercurial.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Mercurial.pm	2012-01-28 23:52:20 UTC (rev 1968)
+++ trunk/vhffs-api/src/Vhffs/Robots/Mercurial.pm	2012-01-29 00:26:34 UTC (rev 1969)
@@ -141,6 +141,8 @@
 
 	# Remove Mercurial dir and group dir if empty
 	my $dir = $mercurial->get_dir;
+	Vhffs::Robots::archive_targz( $mercurial->{main}, $mercurial, $dir );
+
 	File::Path::rmtree($dir) if(-d $dir);
 	my $groupdir = dirname($dir);
 	rmdir($groupdir);

Modified: trunk/vhffs-api/src/Vhffs/Robots/Repository.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Repository.pm	2012-01-28 23:52:20 UTC (rev 1968)
+++ trunk/vhffs-api/src/Vhffs/Robots/Repository.pm	2012-01-29 00:26:34 UTC (rev 1969)
@@ -66,9 +66,11 @@
 	if( defined $repo )
 	{
 		my $vhffs = $repo->{'main'};
+		my $dir = $repo->get_dir;
 
+		Vhffs::Robots::archive_targz( $vhffs, $repo, $dir );
+
 		# erase all files
-		my $dir = $repo->get_dir;
 		my $cmd = "rm -rf $dir";
 		system( $cmd );
 

Modified: trunk/vhffs-api/src/Vhffs/Robots/Svn.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Svn.pm	2012-01-28 23:52:20 UTC (rev 1968)
+++ trunk/vhffs-api/src/Vhffs/Robots/Svn.pm	2012-01-29 00:26:34 UTC (rev 1969)
@@ -170,6 +170,8 @@
 	return -1 unless defined $svn;
 
 	my $dir = $svn->get_dir;
+	Vhffs::Robots::archive_targz( $svn->{main}, $svn, $dir );
+
 	File::Path::rmtree($dir);
 	my $group_dir = dirname($dir);
 	rmdir $group_dir;

Modified: trunk/vhffs-api/src/Vhffs/Robots/Web.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Web.pm	2012-01-28 23:52:20 UTC (rev 1968)
+++ trunk/vhffs-api/src/Vhffs/Robots/Web.pm	2012-01-29 00:26:34 UTC (rev 1969)
@@ -107,6 +107,8 @@
 			$web->add_history( "Webdir is now unlinked from the group directory");
 		}
 
+		Vhffs::Robots::archive_targz( $main, $web, $webdir );
+
 		File::Path::rmtree( $webdir );
 		my $parent = dirname($webdir);
 		rmdir $parent;

Modified: trunk/vhffs-api/src/Vhffs/Robots.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots.pm	2012-01-28 23:52:20 UTC (rev 1968)
+++ trunk/vhffs-api/src/Vhffs/Robots.pm	2012-01-29 00:26:34 UTC (rev 1969)
@@ -157,7 +157,9 @@
 	my $oldcwd = getcwd();
 	return undef unless chdir($dir);
 
-	my $tarfile = $robotconf->{'archive_deleted_path'}.'/'.time().'_'.$object->get_group->get_groupname.'_'.Vhffs::Functions::type_string_fs_from_type_id( $object->get_type ).'_'.$object->get_label.'_'.join('_', @$namepart).'.tar.gz';
+	my $label = $object->get_label;
+	$label =~ s/\//_/g; # workaround for SCM which use / in object name
+	my $tarfile = $robotconf->{'archive_deleted_path'}.'/'.time().'_'.$object->get_group->get_groupname.'_'.Vhffs::Functions::type_string_fs_from_type_id( $object->get_type ).'_'.$label.( defined $namepart ? '_'.join('_', @$namepart) : '' ).'.tar.gz';
 	my $childpid = open( my $output, '-|', 'tar', 'czf', $tarfile, '.' );
 	if ($childpid) {	
 		# read process output then discard


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/