Jake Wilson
Jake Wilson

Reputation: 91213

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...

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?

Upvotes: 5

Views: 3210

Answers (4)

Chris Thornton
Chris Thornton

Reputation: 15817

A non-sophisticated approach would be to simply checkout everything you'll need, work some, play some, work some more, enjoy your surroundings, meet some new people, work some more, and then when you get back, commit. A week can seem like a long time to go without committing, but when I'm away, especially those non-internet places, I tend to not do NEARLY as much work as I had intended.

WinZip can help if you need to take a "save game" snapshot now and then.

Upvotes: 0

Amardeep AC9MF
Amardeep AC9MF

Reputation: 19054

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.

Upvotes: 2

John Weldon
John Weldon

Reputation: 40789

I would recommend making a git or mercurial local repository right on top of your local working copy.

You can add the .svn folders and the artifacts to the .hgignore or the .gitignore files to keep the repository clean, and then when you get back you can just do an svn commit of the changes, or if you want to get fancy do a staged commit back to subversion for every significant unit of work you checked into mercurial/git while you were on the road.

Both of those repos make it really easy to keep your own local working copy in revision control, and to easily sync to defined check in points in the history.

Upvotes: 0

William Leara
William Leara

Reputation: 10697

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. . .

Upvotes: 2

Related Questions