[Scummvm-devel] Switching from SVN to git, mercurial or bazaar

Max Horn max at quendi.de
Tue Oct 27 19:04:58 CET 2009


Am 27.10.2009 um 17:58 schrieb Marcus Comstedt:

>
> Max Horn <max at quendi.de> writes:
>
>> [...] Maybe some people would prefer to stay with
>> SVN, although I'd hope that many of the reasons formerly named for
>> that have been addressed by now. If not, please recap them briefly.
>
> The things I feel Git lack compared to SVN are
>
> * Numerical revision ids, which can be compared to see which
>  revision precedes which

I agree this is somewhat annoying, and one thing were Bazaar seems to  
beat both Mercurial and Git. There are workarounds, though, as  
explained on the following page (WARNING, might hurt your eyes *g*): <http://blogs.codewise.org/wrf/article/sequential_revision_numbers_in_git 
 >

>
> * Proper tracking of moves and copies

Well, git will never explicitly track this information (if you mean  
that by "proper"). However, as you may know, it provides automatic  
move & copy tracking (see <http://git.or.cz/gitwiki/GitFaq#Whydoesgitnot.22track.22renames.3F 
 >).

It seems to work pretty well for me, too. In my local ScummVM git  
tree, I tried
   git log --follow engines/sci/engine/segment.cpp
and it worked just fine. This way the log goes back till rev 41166  
("SCI: Moved MemObject code into a separate source file"), which  
matches *exactly* what SVN sees, cf <http://scummvm.svn.sourceforge.net/viewvc/scummvm/scummvm/trunk/engines/sci/engine/segment.cpp?view=log 
 >.

A "git blame" on the same file not only correctly notices that the  
file was renamed and correctly contains data about things that  
happened before the rename; no, it can even do things SVN *can't* do  
and detect that this file contains stuff copied/moved from still  
existing files. Specifically,
   git blame -M -C segment.h
even detects that segment.h used to be called memobj.h, and most of  
its code came originally from vm.h. Quite impressive, I feel :)

Another nice example were this works better than in SVN is engines/ 
scumm/script_v4.cpp, which contains a lot of code formerly in  
script_v5.cpp, which git correctly detects (when asked to look for it).


>
> If those have been addressed, then great.  If not, then meh.  I can
> take a slight degradation in functionality.  It's not like we're
> going back to CVS anyway.

:)

Cheers,
Max




More information about the Scummvm-devel mailing list