How can I save a commit in Subversion?
If I'm not online, I sometimes want to package some changes to a commit, that is saved in the working copy and can be really committed to the repository once I back online. Ho开发者_开发问答w can I do that with Subversion (possible with the help of additional tools).
You could use git-svn and establish a local git repository that you keep in sync with the svn. You can do local commits to the git repository while working offline and transfer the changes to the central svn when you come back online.
If you're looking to batch up some changes into a single sort of commit, the only option I can think of is to generate a diff of all the stuff that you've done (TortoiseSVN has an option to do this, or you can use the svn diff
command if you're command-line friendly), but that only works once really unless you know you'll be working on separate files for each batch.
I've done this a few times in the past when I didn't want to create a whole new branch for a feature that was very experimental but didn't want to check it into the central repo either. I could then share that patch file with others, but it was still a relatively fragile way of doing it since it was only guaranteed to apply to the revision I generated it against.
erm... If you have checked out a copy of the code, you just work on that local copy, then when you are back on-line, you commit your changes. Your computer only checks if it has the latest version. Or I have missed something in the question here?
Try looking at GIT as repository control. GIT handles a lot of actions offline and in this way is very fast and reliable. GIT however is something completely else then SVN so you'll have to do some research on that. But if you're working offline frequently I would definitly take a loot at GIT if I were you :]
http://git-scm.com/
SVN does not support this feature, local offline commits by itself. Therefore you would net something like git-svn that extends the working copy with a distributed repository to make local commits possible.
However, you can save your commit as a patch file what goes easily with e.g. TortoiseSVN or simply "svn diff" save every step as a patch and they'll work like iterative commits.
when back online you can simply apply one patch after another and commit every step.
精彩评论