[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

hot-backup.py fails on repositories with numbered names

From: Yutaka OIWA <yutaka.oiwa_at_gmail.com>
Date: 2007-11-22 12:54:20 CET

Dear all,

hot-backup.py fails when the name of the copied repository has a
hyphen and digits.

----
sh-2.05b$ svnadmin create test-2008
sh-2.05b$ mkdir backup
sh-2.05b$ ./hot-backup.py test-2008 backup
sys:1: DeprecationWarning: Non-ASCII character '\xb6' in file
./hot-backup.py.old on line 26, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details
Beginning hot backup of 'test-2008'.
Youngest revision is 0
Backing up repository to 'backup/test-2008-0'...
Done.
sh-2.05b$ ./hot-backup.py test-2008 backup
sys:1: DeprecationWarning: Non-ASCII character '\xb6' in file
./hot-backup.py.old on line 26, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details
Beginning hot backup of 'test-2008'.
Youngest revision is 0
Backing up repository to 'backup/test-2008-0-1'...
Done.
sh-2.05b$ ./hot-backup.py test-2008 backup
sys:1: DeprecationWarning: Non-ASCII character '\xb6' in file
./hot-backup.py.old on line 26, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details
Beginning hot backup of 'test-2008'.
Youngest revision is 0
Backing up repository to 'backup/test-2008-0-1'...
svnadmin: 'backup/test-2008-0-1' exists and is non-empty
Unable to backup the repository.
----
The cause of the problem is that the revision comparator in
hot-backup.py misunderstands that test-2008-0 (2008-0) is newer than
test-2008-0-1 (0-1), and thus the next backup should be test-2008-0-1.
Tested environment is Debian GNU/Linux 3.1 (sarge) with trunk version
of hot-backup.py.in and python 2.3.5, but I think that the issue is
portable.
The attached is the patch possibly solving this issue.
Indentation is intentionally kept as the same as the original to
simplify the diff, so please fix it before committing.
Regards,
-- 
Yutaka OIWA <yutaka.oiwa@gmail.com>, <y.oiwa@aist.go.jp>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Nov 22 12:58:32 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.