wiki:remote/mercurial

How to use Mercurial

Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface.

Command line

hg status #Check if you have the last repository version downloaded

hg pull #Downloads files and udpates the local repository

hg add   #Add elements flagged as ?

hg commit -m "Your message"   #Commit changes and include a message

hg diff -c tip  #See differences in the last commit

hg push #Push changes to the server

hg help config #Shows help tips

How To update from the Remote repository

   hg pull  #pull changesets from the Remote repository to the local one but does not merge
   hg update #updates the local repository ignoring modified files to merge
   hg merge #If there are no conflicts, it will inform about files updated, merged, removed...

Mercurial Typical errors

abort no username supplied

If does not exist, create a file in .hg called hgrc and include the following:

[paths]
default = http://your_domain/hg/project_name
[ui]
username = Your name and surname <Your email>

merge conflicts

Sometimes when you are working with your local copy, some conflicts may appear. To solve the "outstanding uncommitted merges" when you try to merge the local repo, execute the following in the command line.

   hg update --clean -r tip
   hg merge #Now you must see no errors.

Check http://mercurial.selenic.com/wiki/QuickStart for further details

Last modified 7 years ago Last modified on Apr 2, 2015 3:07:47 PM