| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Want to get organized in 2022? Let Dokkio put your cloud files (Drive, Dropbox, and Slack and Gmail attachments) and documents (Google Docs, Sheets, and Notion) in order. Try Dokkio (from the makers of PBworks) for free. Available on the web, Mac, and Windows.

View
 

Mercurial

Page history last edited by Wheeler Ruml 11 years, 10 months ago

These instructions are intended for someone setting up mercurial on their lava account using CShell. Only a few things will differ if you happen to have root or you use a different shell.

 

  1. Go to the project home page
  2. Select Download and Build Mercurial
  3. Grab the latest source-code tarball (.95 as of Feb. 27th)
  4. Move that to somewhere that you've got a decent amount of space (/export/home/ for example)
  5. tar -xzvf it.
  6. Change to the mercurial directory
  7. make install-home-bin (I say -bin because we don't have the libraries to build the documentation)
  8. setenv PYTHONPATH $HOME/lib/python (lib may need to be replaced by lib64 if you're on a 64 bit machine)
  9. set path=($HOME/bin $path)
  10. hg debuginstall

 

If the final command doesn't spew errors everywhere, congratulations, you're up and running with mercurial.

 

There is a general mercurial tutorial here.

 

AI Group Repositories

Creating a Repository

Getting an Existing Repository

Getting All Repositories

Committing Changes

Updating Local Versions

Configuring Mercurial

Mercurial and Emacs

hg diff 

 

Merging with mercurial (using kdiff3)

kdiff3 seems to be a much better tool than meld.  To use kdiff3 with mercurial on Ubuntu, just install it from the package manager and mercurial will find it and use it by default.  kdiff3 has a "next conflict" button you can click on, then you can select lines from either file A, B or C which are displayed at the top.  When you are finished, save and quit.

 

Merging with mercurial (using meld)

meld is a graphical tool that is desinged for aiding in the merging of files.  This tool takes 3 (or 2 if you'd like) files as an argument and will display them side-by-side with the differences hilighted.  meld is easy to use, this entry will describe how to use meld with mercurial on Ubuntu.

 

- First get meld:

  sudo apt-get install meld

 

- Next, add the following to your ~/.hgrc file:

  [merge-tools]

  meld.args = $local $other $base

  meld.priority = 1

 

That is it!  Next time mercurial needs to merge a conflict (from the hg merge command) it will automatically load up merge with three files: the first is the local     version, the second is the remote file and the 3rd is the base file (the last version that was in common).  When you are finished merging, save and close meld.  When I closed meld it prompted me to see if I wanted to "save the selected file,"  I choose to save the default selection and it seemed to work well.

Comments (0)

You don't have permission to comment on this page.