You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Fred Mailhot <fr...@gmail.com> on 2007/02/06 19:24:19 UTC
Dump/load question
Hi,
Pardon in advance for the painstaking explicitness of this
question...I want to be sure I'm being understood, since I'm not
perfectly comfortable with svn yet.
I guess this is a multipart question:
1) Assume I have a repo at revision 100, and I do the following:
$ svnadmin dump --revision 1:90 [path-to-repo] > partial.dump
$ svnadmin load [path-to-repo] < partial.dump
Will I have eliminated revisions 91-100 of my repository?
2) If the above works, let's now assume that my repo has a few subdirectories:
- repo
- foo
- bar
- baz
and I want to "eliminate" the most recent revisions that affected "bar"...
Can I do the following?
$ svnadmin dump [path-to-repo] > full.dump
$ svnadmin dump --revision 1:90 [path-to-repo] > partial.dump
$ cat full.dump | svndumpfilter include foo > foo-full.dump
$ cat full.dump | svndumpfilter include baz > baz-full.dump
$ cat partial.dump | svndumpfilter include bar > bar-partial.dump
$ svnadmin load [path-to-repo] < foo-full.dump
$ svnadmin load [path-to-repo] < baz-full.dump
$ svnadmin load [path-to-repo] < bar-partial.dump
Thanks in advance for any assistance...
Fred.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Dump/load question
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 6, 2007, at 13:24, Fred Mailhot wrote:
> 1) Assume I have a repo at revision 100, and I do the following:
>
> $ svnadmin dump --revision 1:90 [path-to-repo] > partial.dump
> $ svnadmin load [path-to-repo] < partial.dump
>
> Will I have eliminated revisions 91-100 of my repository?
Well... you'd have to delete the repository (or rename it or move it
out of the way for backup purposes) and create a new empty one
between those two steps:
$ svnadmin dump --revision 1:90 [path-to-repo] > partial.dump
$ mv [path-to-repo] [path-to-repo-backup]
$ svnadimn create [path-to-repo]
$ svnadmin load [path-to-repo] < partial.dump
Other than that, yes, I believe that will work. Anyone who has a
working copy of any revision higher than 90 will have to trash it and
check out a new one. (If they don't, things will probably break in
horrible ways.)
> 2) If the above works, let's now assume that my repo has a few
> subdirectories:
>
> - repo
> - foo
> - bar
> - baz
>
> and I want to "eliminate" the most recent revisions that affected
> "bar"...
> Can I do the following?
>
> $ svnadmin dump [path-to-repo] > full.dump
> $ svnadmin dump --revision 1:90 [path-to-repo] > partial.dump
> $ cat full.dump | svndumpfilter include foo > foo-full.dump
> $ cat full.dump | svndumpfilter include baz > baz-full.dump
> $ cat partial.dump | svndumpfilter include bar > bar-partial.dump
> $ svnadmin load [path-to-repo] < foo-full.dump
> $ svnadmin load [path-to-repo] < baz-full.dump
> $ svnadmin load [path-to-repo] < bar-partial.dump
As above, move the old repo out of the way, then create a new empty
one, after you create the dumps, before you try to load the dumps
back in.
Note that your revisions will get renumbered when they're loaded back
in. Whether this is a problem for you depends on how you've used your
repository. For example, if you've written lots of commit messages
like "Merged revision 5 of foobranch into trunk" then those comments
will no longer be accurate because the revision number will have
changed in the new repo.
There may be a way to avoid most of this problem but I'm not sure
because I haven't had to use svndumpfilter myself. Maybe someone else
has some better advice.
--
To reply to the mailing list, please use your mailer's Reply To All
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org