You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by vb...@siuh.edu on 2003/07/31 15:25:19 UTC
RE: [PATCH] svnadmin copy command(Scanned for viruses: Notes Admin)
I am very glad that you like the idea. I have replaced incorrect
refference to "backup" with "copy".
In order to ensure that copy command patch would not break any existing
functionality I am splitting my effort into two parts. First part is
submitting small patches to enhance subversion core library to provide
sufficient API for my copy command implementation. Second part is
updating my implementation to work with the enhances core API and
submitting a patch.
For starters I would like to submit a patch to libsvn_fs's
svn_fs_berkeley_archive() functionality.
First is to change the return type of a function from Berkeley DBs pointer
list to apr array (apr_array_header_t). Add a new parameter allowing to
receive only log file names without the absolute path and a parameter that
would include used log files in the list.
The patch also contains changes to svnadmin archive command to allow
specifying the new parameters from command line. Default behavior of the
svnadmin archive command is not changed. If no parameters are specified
it will list absolute paths to unused log files.
Sincerely,
Vladimir Berezniker
"Sander Striker" <st...@apache.org>
07/31/2003 08:02 AM
To: <vb...@siuh.edu>, <de...@subversion.tigris.org>
cc:
Subject: RE: [PATCH] svnadmin copy command(Scanned for
viruses: Notes Admin)
> From: vberezniker@siuh.edu [mailto:vberezniker@siuh.edu]
> Sent: Thursday, July 31, 2003 3:00 AM
> The purpose of this command is to integrate hot-backup.py steps 2
through 7
> to allow anyone to create their own backup solutions with only stock
svnadmin
> executable.
> Copy command makes a hot copy of a repository to a new path, meaning
that you can
> use it to make a copy of an active repository.
I like the concept a lot. So +1 in concept.
> If --archive-logs option is specified unused logs in REPOS that were
copied to
> NEW_REPOS will be deleted.
'archive' is a bit of a misnomer. 'delete' or 'discard' would be better.
>Here is the output of "svnadmin help copy":
>
>copy: usage: svnadmin backup REPOS_PATH NEW_REPOS_PATH
^^^^ ^^^^^^
Inconsistency.
Sander
Re: [PATCH] svnadmin copy command(Scanned for viruses: Notes Admin)
Posted by vb...@siuh.edu.
Here is my logic. There are two ways the function can be used. First is
by outside tool that calls svnadmin archive. In this case absolute path
is *the* way, as the tool should not need to know anything about the
repository layout. However, in cases when a manipulation is done by
subversion internals that are aware of the repository structure and needs
to compare logs files between two repositories, then the relative path
would be useful.
In case of my proposed svnadmin copy command when unused log deletion is
requested, I use the following algorithm:
1. Make a copy of everything but /db area.
2. Copy all tables
3. Copy all logs
4. Get a list of unused logs in the source repository.
5. Iterate over unused log list
5a.If log exists at the destination and is the same file, then delete the
log at source
At step 3 absolute log path can be used to make a copy. However, at step
5a since I need to check log file name at two different repositories it is
easier to use log file name only and append it to a "db" paths within each
repository.
Logical question I expect here is why not delete all unused log files from
source and be done with it, as hot-backup.py does?
I have a concern about unconditionally deleting unused log files in the
source repository. Imagine the following scenario:
While logs a being copied (step 3) there is repository activity that
causes the latest log to go from used to the unused state (e.g. reached
maximum size limit). If at (step 5) we just delete unused logs we would
delete a log that was not copied fully.
Please correct me if I am overlooking something.
Sincerely,
Vladimir Berezniker
<cm...@collab.net>
Sent by: cmpilato@localhost.localdomain
07/31/2003 12:05 PM
Please respond to cmpilato
To: <vb...@siuh.edu>
cc: dev@subversion.tigris.org
Subject: Re: [PATCH] svnadmin copy command(Scanned for
viruses: Notes Admin)
<vb...@siuh.edu> writes:
> For starters I would like to submit a patch to libsvn_fs's
> svn_fs_berkeley_archive() functionality.
>
> First is to change the return type of a function from Berkeley DBs
pointer
> list to apr array (apr_array_header_t). Add a new parameter allowing to
> receive only log file names without the absolute path and a parameter
that
> would include used log files in the list.
I don't really see the need to have the abs-vs.-rel path parameter. I
mean, can we not do the right thing with both? The second parameter,
yes, we need that.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svnadmin copy command(Scanned for viruses: Notes Admin)
Posted by cm...@collab.net.
<vb...@siuh.edu> writes:
> For starters I would like to submit a patch to libsvn_fs's
> svn_fs_berkeley_archive() functionality.
>
> First is to change the return type of a function from Berkeley DBs pointer
> list to apr array (apr_array_header_t). Add a new parameter allowing to
> receive only log file names without the absolute path and a parameter that
> would include used log files in the list.
I don't really see the need to have the abs-vs.-rel path parameter. I
mean, can we not do the right thing with both? The second parameter,
yes, we need that.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org