Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy only certain SVN revisions from one repository to another

I run an SVN server on a linux server. I'm going out of town for a week somewhere with no internet access, and therefore no SVN access.

So I'm trying to figure out how to take a snapshot of the repository with me on my laptop, and then merge the new revisions back into the existing repository when I get back...

  • My laptop runs Windows 7, so first off, I think that VisualSVN Server is probably the server I'll run locally.

  • I should be able to dump my current repository, and then load it into a new repository on my laptop

  • But what I'm not sure about, is when I get back from out of town. I'll have all these new revisions on the SVN server on my laptop. How do I dump and then load only these new revisions into the repository on my linux server?

  • If I use >svnadmin dump --revision 50:75 (assuming revisions 50 thru 75 represent the new revisions I made on my laptop), can I simply load that dump file into my existing repository on my linux server? Is it that easy? I know there is some stuff with regards to repository UUIDs that might cause some issues...

  • One more note, I'm the only developer contributing to this SVN repository at the moment. So no code merging will be required.

UPDATE

I wasn't aware that I could access a repository locally simply using file:///. So that will probably work better than having to run VisualSVN Server. However, the primary question still remains: How do I get the new revisions from one repository to another?

like image 871
Jake Wilson Avatar asked Oct 15 '22 03:10

Jake Wilson


2 Answers

If you're the only developer, perhaps you could just take the repository with you.

Access it with the file:/// protocol while you're away, then put it back on the server when you return. . .

like image 72
William Leara Avatar answered Oct 21 '22 01:10

William Leara


To extract a set of revisions (nn to mm) from a repository:

svnadmin dump --incremental -r nn:mm /path/to/repository > /path/to/dumpfile.svn

The --incremental option allows you to merge this set of changes without bringing the entire baseline along with the import.

To apply those revisions to a repository:

svnadmin load --ignore-uuid /path/to/repository < /path/to/dumpfile.svn

The --ignore-uuid option allows the import to strip out uuid information from the source repository.

I would restrict this operation to repositories with a common revision heritage otherwise the load would probably fail.

like image 38
Amardeep AC9MF Avatar answered Oct 20 '22 23:10

Amardeep AC9MF