[almost OT] version control - Page 3

[almost OT] version control

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

semi
Posts: 69
Joined: 30 Mar 2007, 20:42

Post by semi »

I see nobody mentioned SVK at all. It is a distributed version control system that works on top of subversions filesystem. It should give all the benefits of distributed version control system, but let you keep the central repo as a SVN repo.

Basically it goes like this:

Code: Select all

svk mirror https://spring.clan-sy.com/svn/spring //mirror/spring
The initial mirror operation initializes a mirroring of the master spring SVN repository to your local SVK repo. It will be an exact copy of the original repo, with full history and all (you can opt to not take all history for time/space saving).

Code: Select all

svk sync //mirror/spring
This will sync your local mirror with the master. The first time you do this, it downloads the whole repo (setting up the mirror downloads nothing), and all the next times you do this you only get the changes that you did not yet have.

Code: Select all

svk copy -p //mirror/spring //local/spring
This will create a local branch of the spring project. You can do this as many times as you want, with different names for the last parameter. The -p is only needed the first time to create the parent dir 'local'. This branching is very cheap, as the SVN filesystem implements the SVK repo.

Code: Select all

svk checkout //local/spring/trunk ~/my-svk-checkouts/spring
Checkout our local branch to get a working copy. The working copy does not have any hidden metadata files or dirs unlike SVN with it's .svn dirs (per default. you could get that if you wanted).

Now hack away on your working copy. Then...

Code: Select all

svk commit
This commits your changes to your local branch.

Code: Select all

svk push //local/spring
This pushes your local commits to the master spring svn repo.

Code: Select all

svk pull //local/spring
This pulls others changes to your local branch.

This is pretty much how all the other distributed version control systems also work, but you get to keep SVN master repo and some devs can keep using SVN as their tool of choise, and others can use SVK.

Oh and this is just as new as all the other distributed things, so prefer versions at least 2.*, because 1.* is not so nice.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

svk is better than nothing, but having read this, I'd rather use the real thing...
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

git has the added benefit of being *incredibly* fast (commits, pulls; pulling something using git:// is incredibly fast) and for supporting *massive* compression ratios.

Additionally, there's a feature underway called "gittorrent"; its a protocol that's being implemented (no solid programs yet) but when its implemented, it essentially promises a bit-torrent-like distribution mechanism for source code. Cool stuff, eh?
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Post by malric »

Working on Core2 and not on modem with an svn server more or less the same, I wander what *incredibly* fast or *massive* means in the context of a commit/update etc.

(for checkout I can understand but as I do that just couple of times...).

Please do not consider this a rant but I am an engineer and I like numbers :). If you do not have them, I respect that you think/know that git is faster than svn, the problem is that for times like 1 s for me faster is useless if we are talking commit/update.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

"Massive" is used in the following way:
Source
The Mozilla project's CVS repository is about 3 GB; its about 12 GB in Subversion's fsfs format. In Git its around 300 MB.
As for fast patching:
Here wrote: Yee-haa! 198 patches applied in less than 3 minutes. That's pretty exactly
the "one patch per second" I was aiming for (0.8 seconds per patch, so my
estimate from a few days ago of 0.75 was pretty much on the money).
By the way, a quick googling of "SVN vs git" would have told you the same thing :P
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

malric wrote:Working on Core2 and not on modem with an svn server more or less the same, I wander what *incredibly* fast or *massive* means in the context of a commit/update etc.
Commit to spring repo - several seconds, grows with number of files.
Commit to a local spring git repo - instant (defined as less than 0,5 seconds.)
Pushing to a remote repo - didn't try that.

Accessing svn spring history log - several seconds. Git - instant.

Updating - in svn, several seconds. Pulling with git-deamon serving - noticeably faster, but didn't test it over ssh (no need to do that anyway.)
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

How's the state on the dual SVN <-> git thing btw, do you manage to just commit stuff to SVN yourself?

I myself have not yet found much time to play with git so I can't really make a master branch or something like that yet.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Post by BrainDamage »

Tobi wrote:How's the state on the dual SVN <-> git thing btw, do you manage to just commit stuff to SVN yourself?
git svn commit seems to be unable yet to commit stuff that were merged from branches, so it makes the the svn commit interface basically useless, there seems to be plan to have it working for next version...

adding .svn metadata & using standard svn commit seems to replace it ok until it will support it natively

EDIT: typo (switched commit with merge) :p
Last edited by BrainDamage on 12 Sep 2007, 00:15, edited 1 time in total.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

Tobi wrote:How's the state on the dual SVN <-> git thing btw, do you manage to just commit stuff to SVN yourself?

I myself have not yet found much time to play with git so I can't really make a master branch or something like that yet.
git svn doesn't work on windows. (yet. it's a perl bindings issue for svn, kinda unrelated.) I haven't tried to commit anything to svn, but a pull-only git repo is alive and updated hourly: git://neoteric.pl:9994/spring (it had an outage as I borked up the crontab and didn't notice for 2 days, but it works now.)

edit: it's also 100MB big. compare that to svn dump which is bigger when bz2'd.
Post Reply

Return to “Engine”