How to install Mercurial 1.0 on Cygwin
Mercurial 1.0 has been released and I just posted, How to install Mercurial 1.0 on Ubuntu Gutsy (or Hardy). Here are instructions for installing Mercurial 1.0 on Cygwin.
Install Mercurial 1.0- Install Python Easy Install
$ cd /tmp $ wget http://peak.telecommunity.com/dist/ez_setup.py $ python ez_setup.py
- Install Mercurial 1.0
$ easy_install -U mercurial
- Trying
hg version, gives me aImportError: Permission deniederror. Apparently, there is a Eggs/Cygwin problem. To fix it, make the dll files executable:
$ chmod +x /usr/lib/python2.5/site-packages/mercurial-1.0-py2.5-cygwin-1.5.25-i686.egg/mercurial/*.dll
hg version again:
Mercurial Distributed SCM (version 1.0) Copyright (C) 2005-2008 Matt Mackalland others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Install hgk extension
I'm not sure how to get
hg view working in Cygwin. If anyone knows,
please let me know.
5
Comments
—
Comments feed for this post
#3 Jonathan commented on 2008-05-05:
Oh yeah, one more thing. Depending on your env you may need to create a Windows hg "executable"; freewrap creates a Windows executable and it doesn't like calling the Cygwin hg python script. Coupled with the previous enabling of ~/bin, this did the trick for me:
$ cat ~/bin/hg.bat
@echo off
C:cygwinbinbash.exe -c "/bin/hg %*"
#4 Jonathan commented on 2008-05-05:
This really simplifies the whole thing:
Using mercurial on windows with cygwin
TortoiseHg-0.4-rc2 just works. Sure, you have to use "hgtk log" instead of "hg view", but with only one installation it works in Explorer, in Cygwin, and in Eclipse. The only downside is that I can't seem to find a way to use different merge tools when in Cygwin (prefer vi) and when using the Explorer integration (prefer GUI tool).
#5 Ramesh Nagul commented on 2009-07-01:
This was great! Thanks! I think this article should be part of code.google.com
Post a comment
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(4)
-
aws
(8)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(9)
-
conkeror
(2)
-
cygwin
(18)
-
datastructures
(15)
-
datetime
(3)
-
dell
(3)
-
django
(39)
-
emacs
(20)
-
files_directories
(10)
-
install_setup
(7)
-
javascript
(3)
-
keyboard
(6)
-
matplotlib
(5)
-
mercurial
(4)
-
nginx
(2)
-
preferences
(8)
-
processes
(3)
-
pyqt
(18)
-
python
(122)
-
ratpoison
(3)
-
regexes
(5)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(13)
-
ssh
(7)
-
subversion
(6)
-
twisted
(6)
-
ubuntu
(60)
-
urxvt
(5)
-
vxworks
(25)
-
webservices
(4)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan
#1 Jonathan commented on 2008-05-04:
The Tcl/Tk in Cygwin doesn't like hgk (always sets window attributes to negative values so you can't see anything). I came across a recommendation to use freewrap (http://freewrap.sourceforge.net/) to convert hgk into an executable. This worked for me. Hopefully what I describe below (from memory) is accurate.
I downloaded freewrap641.zip and unzipped it in ~/bin (uncomment the lines in your ~/.bash_profile to add ~/bin to you path). I then created an update script to grab the latest hgk and run freewrap on it:
$ cat update_hgk.sh
!/bin/sh
cd ~/bin && wget -O hgk.tcl http://selenic.com/repo/index.cgi/hg-stable/raw-file/tip/contrib/hgk && chmod 755 hgk.tcl && freewrap hgk.tcl
Running this creates ~/bin/hgk.exe. Then all you need to do is ensure you have hgk enabled in ~/.hgrc:
[extensions]
hgext.hgk =
After those steps "hg view" works fine. Whenever you upgrade mercurial just remember to run the update_hgk.sh script to ensure your hgk executable is up-to-date.