Why I hate mercurial?

Wt, 26 Sty 2010 16:17:24 +0100

I am developer with some experience in programming and SCM as well. I was working with CVS (since 2002), then Subversion (since 2004) and finally switched to bazaar (2006).

I have been always thinking that developer tools – including version controling systens has been created to help developers manage their works and allows programmer control theirs sources better.

So, let’s assume this – tools should help devs, ok?

Now face the facts.

I am long time bazaar user. I like it. It’s not perfect, but it’s quite fast, stable, and performs good merges. Last days I have been involved in another project, which uses mercurial at it’s control system. So I was so excited to have possibility to learn something new.

First days were so nice. I cloned the repository, started commiting locally and go on. After few days i decided to created my own branch on the server. So I made:

hg push ssh://server/new_reps_dir

and ups.

There is no .hg directory? What the fuck? I asked my friends from the project – nobody had idea how it works. Somebody told me to rsync/scp sources first, or hg clone and then finally push there. What the fuck? Two steps instead of one? Once again, tools should be helpful?

Ok, it was only warning.

First deploy. A lot of conflicts. Broken HTML files. Everybody started complain for other people – it is not my fault etc. I decided to fix all repository. I managed to do it. But the strange thing, I discovered that mercurial is not able to detect even easy changes in repository and merge them correctly. Example?

I created one file test_repo.py in two reps, one bzr, one mercurial.

File looked like this:


import sys

def cipka(self): print “hello” print 0 print 2 print 3 print True sys.exit(1)

I commited to both repositories. Than I cloned for second hg repository, and branch for second bzr as well.

In both I changed file to:

#!/usr/bin/python
from sys import exit

def another(): pass

def cipka(self): “docs docs docs” print “hello” print 3 print 2 print “hello” print 4 print True fuck_me exit(1)

Nothing special, right?

I tried to merge the changes with bazaar and mercurial. Guess what?

Mercurial:

bluszcz@bluszcz [(wto sty 26) 15:56]:/tmp/test_repo
$ hg pull ../test_repo2 
pulling from ../test_repo2
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
bluszcz@bluszcz [(wto sty 26) 15:56]:/tmp/test_repo

Command hg merge showed me tool to merge two files? What the fuck it is?

And with bazaar:

bluszcz@bluszcz [(wto sty 26) 15:56]:/tmp/test_repo                                                                                                         
$ bzr merge ../test_repo2_bzr/
 M  test_repo.py                                                                                                                                            
All changes applied successfully.                                                                                                                           
bluszcz@bluszcz [(wto sty 26) 15:56]:/tmp/test_repo

I know. People are complaing for bazaar. “Their change the format of repository every time” etc etc.

But during work even on small project (about 10 files changes during one commit) situation that vcs tool break you sources and push you into some sick merges is not normal for me.

So, tools should be useful. Tools should be helpful.

Fuck off mercurial.

With greetings to all involved in this project ;)

Komentarzy: 32

amad3us: everything because of cipka function - you have offended mercurial ;)

cezio: Stop whining and RTFM:) Mercurial pushes/pulls whole repo changes (all branches), so when you do push, mercurial assumes, that target is a repository dir. Second, pull =/= merge! Those are separate operations.

bluszcz: Cezio, so tell me how to merge this two files from example to avoid manually fixing them.

cezio: assuming, that they are identical in branch_a and branch_b: $ hg pull; hg up -r branch_a; hg merge -r branch_b; hg commit -m 'merged with branch_b'.

bluszcz: unfortunately still not working, but i am very interested how to work with it. can you make full description? step by step from creating first files? :D my results: pull: searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) merge: merging a.py merging a.py failed! 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon bluszcz@soprano:/tmp/branch_1$

wholesale Cell phone battery: discounted cellular phone battery wholesale,Which do you like greatest? Cellular phone battery or phone accessories?The wholesale price real cheap!No Minimum quantity!Try here Earn High Profit Margin <a href="http://www.kungfubattery.com/"> Cell phone batteries accessories wholesale</a>

Organic green Tea: Thanks for letting us know about this. I appreciate your effort a lot. <a href="http://www.findfreetrial.com/tea/how-to-get-free-organic-green-tea.html">Organic green Tea</a> <a href="http://www.findfreetrial.com/weight-loss/free-green-tea-sample-help-you-lose-weight.html">weigth loss tea</a>

Wordpress Themes: Nice post and this fill someone in on helped me alot in my college assignement. Say thank you you for your information.

free trial: Thanks a lot for the post!

unlock iphone: Good journey and experience! .I bookmarked your site!<a href="http://www.smmmail.com/">unlock iphone</a>

Wholesale polo shirts: Thanks for making my morning a little bit better with this great article!!

wholesale nfl jerseys: A good article Thank you!

mulberry handbags: Nice article. Thank you for this info

Bad Credit Car Loans: A good article Thank you!

atlanta cheap tickets: nice share, good article, very usefull for me...thanks

cheap mbt shoes: good share, great article, very usefull for us...thanks!

Anxiety: Very good journey and experience!

Baseball jerseys: Was an interesting article, thank you..

Hermes birkin bag: I am the first time on this site and am really enthusiastic about and so many good articles. I think it's just very good.

Forex Marketiva: Thans for the nice post.

vprisk: virtual beach <a href=http://vprisk.ru>nude dance</a>

Эротические Истории: he history of erotic depictions includes representations of sexual acts that have been created by nearly every civilisation, ancient and modern. http://en.wikipedia.org/wiki/History_of_erotic_depictions

sunglass armani: Really nice and impressive blog i found today.

Discount sunglasses: Hey I think you have a great blog going here, I found it on Bing and plan on returning regularly for the information that you all are providing.

dumoksun: free por <a href=http://pornushi.ru/english-version/russian-voyeur/page_992.html>girl arabian piss video</a>

sunglasses shop: Hello everyone thanks for good information.

sunglasses shop: Good journey and experience!

Christian Louboutin: I like that you think. Thank you for share very

Christian Louboutin: Really good sharing this.

Louboutin shoes: very well information you write it very clean. I'm very lucky to get this information from you.

registry cleaner software: wow.. i'm very enjoy reading your post. great.

oxydayweara: Alternative Dating Home on free bdsm dating sites, the best BDSM personals