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

Re: [PATCH] normalize path of repository in hot-backup.py

From: Jani Averbach <jaa_at_cc.jyu.fi>
Date: 2003-03-06 13:59:42 CET

On Thu, 6 Mar 2003, Sander Roobol wrote:

> Still looks like a valid problem to me. Can someone take a look at it?
>

I think that this is still valid fix.

BR, Jani

P.S. This new patch-manager system looks like promising. Thanks for
picking this up from floor.

Log:

The repo_dir have to be normalized and absolutized before call of
basename. Otherwise "./hot-backup.py /repo_path/repo/ /backup_dir" won't
work, the result will be /backup_dir/-<repo_num> instead of
/backup_dir/<repo>-<repo_num>.

* tools/backup/hot-backup.py.in:
  Added os.path.abspath() call before call of os.path.basename

Index: hot-backup.py.in
===================================================================
--- hot-backup.py.in (revision 5216)
+++ hot-backup.py.in (working copy)
@@ -49,7 +49,7 @@

 # Path to repository
 repo_dir = sys.argv[1]
-repo = os.path.basename(repo_dir)
+repo = os.path.basename(os.path.abspath(repo_dir))

 # Where to store the repository backup. The backup will be placed in
 # a *subdirectory* of this location, named after the youngest

--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 6 14:00:28 2003

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.