svn: local commits

SvnCommit

Svn Problem Overview


Subversion: is it possible to commit local revisions without pushing them, and push them at a later date - or is the lack of this feature why it's called "centralized" ?

Svn Solutions


Solution 1 - Svn

It is not possible to do local commits with Subversion.

This is because, as a centralized version control system, your local working copy does not have all the information the server has about past revisions, log entries, etc. which it would have had if it was a Distributed Version Control System (DVCS).

A subversion working copy contains a copy of all files as they were checked out so you can revert changed files without contacting the server.

If you really want to do local commits you should have a look at SVK, which is built on top of Subversion and provides DVCS like features.

Solution 2 - Svn

Much of the above has become somewhat obsolete, and since this question comes up as a hit in a google search for "svn local commit" here's an update:

Consider using the package "git-svn" (along with "git-gui" if you don't know git) to make local commits both possible and easy, with full remote SVN integration. A decent overview/tutorial/use-case is here. I've just started using this process with Sourceforge projects, so I can't yet report any problems. Be sure to get the Authors file right!

EDIT: Updated link. Thanks, hdl!

Solution 3 - Svn

You could do such a thing so if you interface the SVN Server with a GIT or Mercurial Bridge. Since GIT and Mercurial are able to do local Commits you could then use them like that. Maybe check out git-svn or something similiar (I remember there being a bazaar-svn but not sure).

Solution 4 - Svn

That is why it is called centralized. You could try using a repo inside a repo. One is local and the other is remote. You then commit the entire inner repository to the remote.

Solution 5 - Svn

As others have said, no.

I would strongly recommend trying to use anything remotely janky with svn.

I haven't used SVK enough to recommend against it, it seemed nice enough. However I am skeptical of using anything built on top of SVN for an entire project without anything breaking. I have use SVN enough to know that even regular work cycles can toast it if you're not careful.

We use SVN at work. I have been using bzr and bzr-svn to do all my interaction with and it works wonderfully. My workflow is something like:

$ bzr branch file:///var/svn/project ~/project

(hack, hack, hack)

$ bzr commit -m "commit log" (repeat)

when I'm ready

$ bzr push

Yes, instead of updating you have $ bzr merge and commit change (possibly shelving what you are working on) but local commits are a very nice thing, and shelving is too (shelving is like revert with a save)

I think git handles this as well. I've heard it is not as complete as bzr-svn, but I can not corroborate that.

But using a DVCS with a svn repository is a good way to go!

Solution 6 - Svn

Further to BobC's answer, for mercurial you would use hgsubversion.

Solution 7 - Svn

No! git however can do this, and you can use git-svn to keep in sync with the original repository.

Solution 8 - Svn

To get the best of both worlds, SVK was built on top of Subversion, but maintaining local state so you can do local commits...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAdrian PanasiukView Question on Stackoverflow
Solution 1 - SvnarturhView Answer on Stackoverflow
Solution 2 - SvnBobCView Answer on Stackoverflow
Solution 3 - SvnSideshowcoderView Answer on Stackoverflow
Solution 4 - SvnManuel FerreriaView Answer on Stackoverflow
Solution 5 - Svnjon skulskiView Answer on Stackoverflow
Solution 6 - SvnSethView Answer on Stackoverflow
Solution 7 - SvnRhythmic FistmanView Answer on Stackoverflow
Solution 8 - SvnStoborView Answer on Stackoverflow