don't click here

Replacing svn with git/Mercurial

Discussion in 'Engineering & Reverse Engineering' started by FraGag, Jun 16, 2011.

Switch to git, switch to Mercurial (hg), or stay with Subversion (svn)?

  1. Switch to git

    5 vote(s)
    55.6%
  2. Switch to Mercurial (hg)

    2 vote(s)
    22.2%
  3. Stay with Subversion (svn)

    2 vote(s)
    22.2%
  1. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    If you don't use branches, you don't worry about merging at all; just keep doing the commit/push and pull. If you are on branches, then
    Code (Text):
    1. git checkout [branch to merge into]
    2. git merge [branch to merge]
    is all you need to do, and git (and Mercurial — but I've never used it so IDK) are usually better at doing merging than svn (which is why your worker friends call it sucking cock).
     
  2. Aren't the merging programs separate or can't they be customized?
     
  3. Conan Kudo

    Conan Kudo

    「真実はいつも一つ!」工藤新一 Member
    478
    1
    18
    In both Mercurial and git, the merging programs can be customized because they are essentially scripts operating on top of the base repository interface, though git recently had most of them ported to C from Perl.

    In theory, it would be possible to write replacement merging programs. In reality, it just isn't worth it most of the time. Merging algorithms can get pretty complex, especially for revlog-based tracking (which Mercurial uses). Combined with the high number of edge case algorithms added to merging programs to help make merging easier, it would be pointless to write a new merging program. However, extending the existing merging programs is a far more realistic option and it has been done from time to time.
     
  4. Scarred Sun

    Scarred Sun

    Be who you needed when you were younger Administrator
    7,745
    127
    101
    Tower 8 ️
    Welp, this.
    Given that this topic has died, can we at least narrow things down? I'd prefer Mercurial simply because it'd be easier to transition to.

    Is there any major argument for Git specifically over hg?
     
  5. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Going by the first post and what I've heard elsewhere, I'm being given the impression that Mercurial support is better on Windows and Git support is better elsewhere. So I guess it's ultimately a matter of which platform do you wish to support more.
     
  6. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    I'd choose Hg, since I develop programs on Windows, for Windows.
    + - And I found a library so I can rewrite my IRC bot.  
     
  7. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    Git, because more people voted for it in the poll above.
     
  8. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    Among people that actually commit to the SVN: Andlabs, Flamewing, and Hivebrain don't care; Scarred Sun and I want Hg.
     
  9. Spanner

    Spanner

    The Tool Member
    Not that it's going to happen, how about a poll with Git and Hg being the sole options? It'll force the SVN users to make a choice, or just abstain from voting. Probably won't work.

    Also, still going down on Hg here.

    EDIT: Now that I looked at the poll again, I guess my suggestion is really pointless based on only 4 people wanting to stay with SVN.
     
  10. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
    If the performance bottleneck for SVN is the result of the web interface and not the VCS itself, why not use both Git and Hg and attach the web interface to the lighter of the two sides?
    http://hg-git.github.com/
     
  11. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    Wait seriously? ...I like this. It'll keep everyone happy. Git users can use Git, Hg users can use Hg.
    Cool suggestion, sonicblur!
     
  12. Conan Kudo

    Conan Kudo

    「真実はいつも一つ!」工藤新一 Member
    478
    1
    18
    Except.... hg-git doesn't actually work with repositories outside of github very well. I don't know why, but it doesn't. I've certainly tried! Also, hg-git doesn't work the way you seem to think it does. It doesn't emulate the full host interface that git uses, it just emulates enough of the basic protocol that you can do basic pulls and pushes, and unfortunately it is brittle as heck. I can't even get hg-git to properly switch branches or handle repository merging. It won't work right.
     
  13. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    How would I go about downloading the entire svn repo, including all history? Or would I need to grab it off the server itself?
     
  14. git-svn checks out the entire history by default.
     
  15. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    Yes but (apparently, as someone else tested it) running git-svn directly to the server didn't work (and is a bad idea anyway, apparently)...
     
  16. Scarred Sun

    Scarred Sun

    Be who you needed when you were younger Administrator
    7,745
    127
    101
    Tower 8 ️
    Welp, this.
  17. FraGag

    FraGag

    Tech Member
    Exasperated by how MSYS fails to handle Unicode, I decided to give Cygwin a try. The Cygwin libraries work with UTF-8, just like Linux does by default on most systems, so Cygwin-based applications automatically support Unicode. In particular, I tried git in Cygwin, and it works perfectly when I push a repository to Github: file names and commit messages are displayed correctly. I suppose installing Python and Mercurial in Cygwin would lead to the same results without having to use the fix-utf8 extension, but now that git works well with Unicode, I'd rather we switch to git. :P

    Scarred Sun, if you can't import the history from the svn repository into the new git/hg repository, would it be asking too much to keep the svn repository online (but not WebSVN), read-only, so we can retain that history? Alternatively, there's probably a way to make the whole repository available without keeping an svn server up.
     
  18. Conan Kudo

    Conan Kudo

    「真実はいつも一つ!」工藤新一 Member
    478
    1
    18
    That requires installing Cygwin and all the requisite crap it wants... I really don't think people want to do that just to pull from the repo...
     
  19. FraGag

    FraGag

    Tech Member
    I'm sure we (I?) could create an installer with the bare minimum (unless that already exists), for those who wouldn't otherwise use Cygwin. By the way, I tried git gui, and it sadly has some encoding issues. The file names and commit messages are processes using the system's ANSI code page; however, adding files with that wrong encoding seems to work just fine (it calls the git program behind the scenes). The only issue would be if you typed a commit message containing characters outside of ASCII. Maybe I could try making a Cygwin-based shell extension...
     
  20. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    For people that only want to get stuff from the repo, isn't that what websvn/gitweb/whatever is for?