For git
there is the bundle
command. It creates binary archive of the revisions given. You can put any piece of your history into the bundle either on per commit basis or in bunch, copy to the file server and then restore back to the repository.
git bundle create file.name revisions..list
— command for creating bundle.
git bundle unbundle file.name
— command to restore revisions.
Definetely, you should come up with chronologically naming for your bundles not to mix them up.
It works for git
and, as far as I remember, hg
has bundle
command as well. This is the approach as you draw it.
Another way out might be just init
new intermediate repository in your Dropbox folder and push there your commits from main repository and let Dropbox synchronize it with mirror. However in this case the pulling into mirror repository should be done only after Dropbox synchronization had finished. Otherwise the data might be inconsistent, since git uses whole lot of small files to hold repository contents. It is possible to avoid such behavior by packing repository content. But if you what to be on the safe side, the bundle approach will work for you best...
EDIT: Regarging svn
I got another clue recently. If for git
and hg
you can use standard backup approach to achieve what you need, why could you try the svn
's standard backup approach as described in this Q&A?
svnadmin dump repositorypath -r LO_REV:HI_REV > backupname.svn
to backup revisions.
svnadmin load repositorypath < backupname.svn
to restore data.