Working offline with SVN on local machine temporary

谁说我不能喝 提交于 2019-11-29 19:27:08

Your problem sounds to me like the use case for git-svn:

  • set up your Git repo: git svn clone http://svn.example.com/project/trunk
  • while being online, commit your changes to SVN
  • before going offline, do a git svn rebase to get your Git repo in sync with the SVN repo
  • while being offline, commit to the Git repo using git commit
  • when getting back online again, do a git svn dcommit to push your changes back to the SVN repo

I'm using this workflow daily!

You get two huge advantages doing so:

  • your complete SVN history is backed up in the Git repo and in every Git repo that gets cloned from that one
  • while being offline, you can view the commit messages, checkout other branches, etc.

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.

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.

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.

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.

Website

Installation requires a Python 3, and is handled via pip install -U sos-vcs

Hehehe, a good time to discover mercurial or git for yourself!!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!