Discussion:
svn: Can't open file ' . --revision/format': No such file or directory
prashant n
2006-01-16 09:56:16 UTC
Permalink
Hi ALL,

i am encountering the above error ie, svn: Can't open file ' . --revision/format': No such file or directory , when i try to backup my svn repo daily thru a script. The script is as follow:

#!/usr/bin/perl -w
#
# Perform a daily backup of a Subversion repository,
# using the previous most-recently-backed-up revision
# to create just an incremental dump.
#use strict;
#use warnings;
my $svn_repos = "/cvs/satrang/software";
my $backups_dir = "/home/svnbkp";
my $next_backup_file = "daily-incremental-backup." . `date +%Y%m%d`;
#print "*$next_backup_file*\n";
open(IN, "$backups_dir/last_backed_up");
$previous_youngest = <IN>;
chomp $previous_youngest;
close IN;
my $youngest = `svnlook youngest $svn_repos`;
chomp $youngest;
if($youngest eq $previous_youngest) {
print "No new revisions to back up.\n";
exit 0;
}
# We need to backup from the last backed up revision
# to the latest (youngest) revision in the repository
$first_rev = $previous_youngest + 1;
$last_rev = $youngest;
print "\n....Backing up revisions $first_rev to $last_rev...\n";
$svnadmin_cmd =`svnadmin dump --incremental " . "--revision $first_rev:$last_rev ". "$svn_repos > $backups_dir/$next_backup_file`;
`$svnadmin_cmd`;
print "\n...Compressing dump file...\n";
print `gzip -9 $backups_dir/$next_backup_file`;
open LOG, ">$backups_dir/last_backed_up";
print LOG $last_rev;
close LOG;

How to overcome this error?
Regards
Shann
--
_______________________________________________

Search for businesses by name, location, or phone number. -Lycos Yellow Pages

http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
Ryan Schmidt
2006-01-16 12:18:31 UTC
Permalink
Post by prashant n
$svnadmin_cmd =`svnadmin dump --incremental " . "--revision
$first_rev:$last_rev ". "$svn_repos > $backups_dir/$next_backup_file`;
How about changing those backquotes to regular double quotes.

$svnadmin_cmd = "svnadmin dump --incremental " . "--revision
$first_rev:$last_rev ". "$svn_repos > $backups_dir/$next_backup_file";
Paul Koning
2006-01-16 15:28:18 UTC
Permalink
Hi ALL,
i am encountering the above error ie, svn: Can't open file '
. --revision/format': No such file or directory , when i try to backup
my svn repo daily thru a script.

The book says that the switches, like --revision, must come after the
repository name, not before. Nasty... modern practice is for switches
to be accepted anywhere, and older practice is for switches to come
first, not last, so this is rather confusing.

But it seems to explain the message -- it looks like the program is
trying to interpret "--revision" as the repository name.

paul
prashant n
2006-01-17 04:41:05 UTC
Permalink
problem solved thanks for that tip
----- Original Message -----
From: "Ryan Schmidt" <subversion-***@ryandesign.com>
To: "prashant n" <***@lycos.com>
Subject: Re: svn: Can't open file ' . --revision/format': No such file or directory
Date: Mon, 16 Jan 2006 13:18:31 +0100
Post by Ryan Schmidt
Post by prashant n
$svnadmin_cmd =`svnadmin dump --incremental " . "--revision
$first_rev:$last_rev ". "$svn_repos >
$backups_dir/$next_backup_file`;
How about changing those backquotes to regular double quotes.
$svnadmin_cmd = "svnadmin dump --incremental " . "--revision
$first_rev:$last_rev ". "$svn_repos >
$backups_dir/$next_backup_file";
--
_______________________________________________

Search for businesses by name, location, or phone number. -Lycos Yellow Pages

http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
Loading...