Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svnadmin load renumbers revisions

I have a big single repository having multiple projects. I am filtering out few projects out of a complete repository dump using svnadminfilter command.

I have dumped the complete repository using --drop-empty-revs switch (and without --renumber-revs switch) which removes the empty revisions and preserves the relevant revisions in particular to those projects. Now while reloading the dump into new repository on new location, it renumbers those revisions starting from 1, but I want to preserve those revisions.

Is there any switch available with svnadmin load too ?

like image 230
user219140 Avatar asked Nov 10 '22 12:11

user219140


1 Answers

The trick here is to create empty revisions to create padding until you reach the desired revision number.

However, there's no switch to do that in svnadmin load. You either need to create them manually, or to use a tool like rsvndump.

From the manpage: --keep-revnums
Keep the revision numbers in the output in sync with the repository. This is done by inserting empty revisions for padding if necessary.

REVISION NUMBERS

The revision numbers in the dump output depend on the options and the path that are given to rsvndump. If you are dumping the root of a repository, you don’t need to worry about revision numbers out of sync, of course. If you are dumping a subdirectory, only the revisions that changed this subdirectory will occur in the dump output. The revision numbers in the dump are strictly sequential, so they will differ from the original ones.

If you need the keep the revision numbers from the original repository (e.g, if a bug tracker depends on them), you can use the --keep-revnums flag. It pads revisions that did not change the subdirectory with empty revisions. They don’t have an author or date property, but contain the log message "This is an empty revision for padding.".

(Note that you will most likely need to compile the rsvndump version yourself.)


If you want to create the padding yourself manually, you could still script your commit list. Here's an example on how to do so : http://hmcguirk.blogspot.ca/2010/06/subversion-trimming-old-commits-keeping.html

like image 50
P-L Avatar answered Nov 15 '22 13:11

P-L