views:

724

answers:

5

I want to change my current subversion setup to Mercurial or Git.

I read about the two and I have a conflicted view about how well they work on windows.

Alot of pages say Git is sub-par on windows, slow and badly integrated. And almost everyone say Mercurial is better. But some say Git now is better and Mercurial is behind.

I check the screenshots of TortoiseHG and TortoiseGIT and the mercurial one look "worse"... but maybe is just crappy screenshots?

I read about the two, prefer the command-line interface of Mercurial, but seriously, I don't pretend to touch the command line. And if one of the two is a real improvenment to SVN, I don't have to do that (In SVN is necesary go to the metal because something need fix).

In SVN I have issues when commit or get code made on OSX (I code on Windows, OSX, Solaris. Mainly windows). So I hope don't get that issues again (I mean, failure to commit to the repo).

I have a small repository, doing solo.

A: 

according to my knowledge they both use hard links for every unmodified file, as hard links aren't supported on FAT drives, and only slightly supported for directories on NTFS, both are terrible on windows, as every unedited file, is copied every time the repository is updated.

if that doesn't bother you, pick which ever you feel most inclined to try. Which ever you pick, don't move all your projects over immediately start with one project and see how you like it.

EDIT: A FAT example for non-believers:

b2s@localhost:/mnt/data/tst$ cp /home/b2s/music/Hopes.and.Fears/00.\ Keane\ -\ Everybody\'s\ Changing.mp3  .
b2s@localhost:/mnt/data/tst$ git init
Initialized empty Git repository in /mnt/data/tst/.git/
b2s@localhost:/mnt/data/tst$ git add 00.\ Keane\ -\ Everybody\'s\ Changing.mp3 
b2s@localhost:/mnt/data/tst$ git commit -m 'init'
[master (root-commit) 3f3bba9] init
 1 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 00. Keane - Everybody's Changing.mp3
b2s@localhost:/mnt/data/tst$ du -sh *
1,3M    00. Keane - Everybody's Changing.mp3
b2s@localhost:/mnt/data/tst$ du -sh .
4,9M    .
b2s@localhost:/mnt/data/tst$ cat >hello.txt <<EOF
> blabla
> EOF
b2s@localhost:/mnt/data/tst$ git add hello.txt 
b2s@localhost:/mnt/data/tst$ git commit -m 'init'
[master fd5fb88] init
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 hello.txt
b2s@localhost:/mnt/data/tst$ du -sh .
5,3M    .
b2s@localhost:/mnt/data/tst$ 

My music taste aside, if it is not due to an extra copy of the mp3 file, why else would the directory suddenly fill an extra 1.4 MB, when all that was done was adding a 6-byte file to the git repository...

Admittedly though they now seem to have fixed the issue with NTFS, the same test did not result in duplicate copies. This was not the case half a year ago. That being said NTFS is still not writable by all operating systems.

/B2S

Born2Smile
Hardlinks are supported for files on ntfs. Directory Junctions are supported for directories. Using FAT32 for HDD isn't a good idea for any modern machine due to the FAT32 Filesystem limitation and huge amount of wasted space. As far as I know git doesn't copy every unedited file every time repository is updated, and all stored files are unique. Git works fine on windows, the only problm that may araise is windows filename case insensitivity.
SigTerm
I use NTFS (I drop FAT32 when move to Win2000 :))Git or Mercurial will change the case of the files???
mamcx
"every unedited file, is copied every time the repository is updated" << no such thing, at least in git, objects are identified by their sha1 hash, so even if there were no hard links in the filesystem, you still won't get duplicate entries.
hasen j
+9  A: 

Mercurial is probably more windows friendly but there isn't a huge difference. Mercurial does have the slight advantage of support on Codeplex if that matters to you.

Kevin Won
We use Mercurial to great effect in a 6-user group Mac, Windows, and FreeBSD ecosystem . Things work together beautifully!
Shane Holloway
TortoiseHG doesn't seem to need the CLI really. I'm not impressed with TortoiseGit.
Paul Nathan
A: 

I've been having very good luck with MSysGit on Windows. My major problem so far has been unsuspecting people on the Mac OS side inadvertently creating Windows-incompatible filenames.

John Stoneham
+1  A: 

I think git support on windows is decent enough.

The only thing is, on bash, you get readline magic completion of command and --options, where as on cmd, the completion is pretty limited (no completion for commands, not to mention options!). Also you don't get man pages (for better or for worse).

So, while it feels like git on windows is less powerful than on linux, it's only because of the limits of the cmd shell/terminal.

In general the command line on windows is pretty poor compared to linux, and while you can run bash on windows, it doesn't integrate nicely with the system.

e.g. if you're at a windows shop and you want to introduce git, using bash probably won't work because all scripts which are already in place make windowsy assumptions about the environment, such as that paths start with C:\ or D:\ or what have you.

So you're stuck with cmd (and cmd sucks).

In bash you can do "git comTAB--amTAB", but in cmd you'll have to type the whole thing: git commit --amend.

But if nothing prevents you from using bash on windows, then by all mean do so! Also run it in Console2 so you get terminal tabs and nice fonts.

I don't pretend to touch the command line. And if one of the two is a real improvenment to SVN, I don't have to do that

Well, they both work primarily from the command line. Yes there are some gui tools, but you can't survive by pretending that you don't need to use the command line.

hasen j
+1 for command line.Git bash on windows works fine for me, although pathes look that way /c/program/ instead of c:\program\.
Gauthier
Windows cmd does indeed suck which is why my colleagues don't use the command line any more. They want some thing which "just works" on Windows and have gone for tortoisehg for this reason. They didn't want to frig around with msys or cygwin or whatever.
blokeley
TortoiseHg with VisualHg for Visual Studio *does* indeed make the command line almost unnecessary for every day usage. GitExtensions (also for MSVS) provides similar experience.
kizzx2
+8  A: 

I have switched from Git to Mercurial because of the better Windows support:

  • every Mercurial release has installers available for all supported platforms - no delayed access to the latest enhancements and bug fixes
  • TortoiseHg is not requiring a separate Mercurial installation - easier maintenance
  • hg serve - built-in light-weight web server which can be used for browsing a repository with a web browser or for allowing remote machines to push/pull to/from you
  • you can easily publish Mercurial repositories using only IIS or Apache2
alexandrul
The cmdline interface is way more intuitive. The workflow, I find, is less painful. I find it easier to configure. It works natively from a command window and doesn't require it's own bash prompt to work. +1 from me ;)
OJ