Reputation: 15114
I am working on a project currently on SVN. I however will not have access to the internet for a few days, and will be working on my project.
Is there any way to make a clone of the repository on my local machine, commit changes to it, and when I gain access to the internet "push" them onto the shared repository? Thinking in terms of Mercurial here, is it worth migrating completely?!
Upvotes: 39
Views: 21637
Reputation: 39
Disclaimer: I'm the author of SOS (SVN Offline Support).
I wrote this easy to use command-line tool to solve exactly the problem of working with SVN offline, but it works not only within SVN checkouts, but for any VCS working copy (e.g. Bazaar, Git, fossil), or even in untracked file trees. SOS allows simple commits, branching, switch/update operations, without all the complex semantic background knowledge required by traditional VCS. After coming back online, you can integrate all changes back to your underlying VCS.
Installation requires Python 3, and is handled via pip install -U sos-vcs
While I still use SOS it daily, the code became an unmaintainable mess requiring a major rewrite. The idea is still valid and may serve as inspiration for similar projects.
Upvotes: 3
Reputation: 67177
Your problem sounds to me like the use case for git-svn
:
git svn clone http://svn.example.com/project/trunk
git svn rebase
to get your Git repo in sync with the SVN repogit commit
git svn dcommit
to push your changes back to the SVN repoI'm using this workflow daily!
You get two huge advantages doing so:
Upvotes: 59
Reputation: 8291
I've been using git on a project that uses SVN for the same reason you describe above. There is some getting used to git/mercurial but after a while I really like the new approach. Further I never had any issues with using git-svn, never have tried mercurial and svn..
If you are onto Mercurial and are still looking for a good tutorial with one or two chuckles in between check out this tutorial written by Joel Spolsky. And as mentioned before, surely is a great opportunity to get started with DVCS.
Upvotes: 5
Reputation: 11337
Ridiculous answer would be to migrate to another versioning tool, no offence!
I had the exact issue.
Been using SVN on my "real" server where the "real" repository is.
When I went out with my laptop, without internet I would simply duplicate the "real" repository on this laptop (VisualSVN + TortoiseSVN), work on it, change/commit whatever, and when come back simply "sync" the new 'revision' files to the "real" repository.
To be a bit more clear: Have two SVN servers, one locally on your laptop (the clone) and one on your "real" server (obviously). Just sync between the two.
Upvotes: 8
Reputation: 18657
There's always SVK as well. I haven't used it in years though, so I'm not sure of how well it works anymore.
Upvotes: 0