Why does MacPorts Mercurial behave differently from Windows Mercurial?

Russell Hanneken rhanneken at pobox.com
Tue Jan 18 03:03:07 PST 2011


I've been working my way through the book _Mercurial: The Definitive Guide_.  When I try the example that runs from here 

http://hgbook.red-bean.com/read/collaborating-with-other-people.html#id371865

to here

http://hgbook.red-bean.com/read/collaborating-with-other-people.html#id372450

using the MacPorts version of Mercurial, I get results that are different from what the book says I should get.  When I use the Windows version of Mercurial, I get what's in the book.

The difference arises with the last box.  When I do the "hg merge" part using Windows Mercurial, I get what the author gets:

    C:> hg merge
    merging myfile
    0 files updated, 1 files merged, 0 files removed, 0 files unresolved
    (branch merge, don't forget to commit)

But when I use MacPorts Mercurial, I get a merge conflict, and I have to merge the changes manually:

    $ hg merge
    merging myfile
    warning: conflicts during merge.
    merging myfile failed!
    0 files updated, 0 files merged, 0 files removed, 1 files unresolved
    use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon

I've created a simplified series of commands that should let you reproduce the issue:

hg init main
cd main
echo This is a boring feature. > myfile
hg commit -A -m "We have reached an important milestone"
hg tag v1.0
echo This is exciting and new! >> myfile
hg commit -m "Add a new feature"
cd ..
hg clone -rv1.0 main stable
cd stable
echo This is a fix to a boring feature. > myfile
hg commit -m "Fix a bug"
cd ../main
hg pull ../stable
hg merge

On Windows, you'd have to change the forward slashes to backslashes, but otherwise the commands should work as is on both platforms.

Can anyone explain the difference?  Is it a bug in the MacPorts version of Mercurial?

I'm using Mercurial 1.7.3 on both platforms.  I also experienced the merge conflict when I used version 1.7.2 of MacPorts Mercurial.

Regards,

Russell Hanneken
rhanneken at pobox.com



More information about the macports-users mailing list