Showing posts with label mercurial. Show all posts
Showing posts with label mercurial. Show all posts

How to install Mercurial 1.0 on Cygwin



This is my OLD blog. I've copied this post over to my NEW blog at:

http://www.saltycrane.com/blog/2008/04/how-to-install-mercurial-10-on-cygwin/

You should be redirected in 2 seconds.



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
  1. Install Python Easy Install
    $ cd /tmp
    $ wget http://peak.telecommunity.com/dist/ez_setup.py
    $ python ez_setup.py
  2. Install Mercurial 1.0
    $ easy_install -U mercurial
  3. Trying hg version, gives me a ImportError: Permission denied error. 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
Try hg version again:
Mercurial Distributed SCM (version 1.0)

Copyright (C) 2005-2008 Matt Mackall  and 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.
[Read the full post...]

How to install Mercurial 1.0 on Ubuntu Hardy



This is my OLD blog. I've copied this post over to my NEW blog at:

http://www.saltycrane.com/blog/2008/04/how-to-install-mercurial-10-on-ubuntu/

You should be redirected in 2 seconds.



Mercurial 1.0 is out! Mercurial is a next generation "fast, lightweight source control management system" boasting conversions by notable projects NetBeans, OpenJDK, Globulation2, Xine, Mozilla, grml, and OpenSolaris.

From the release notes, version 1.0 has improvements for copying, renaming, removing, and merging. I want to use the most robust version possible, so I decided to upgrade. Ubuntu Gutsy's Mercurial version is 0.9.4, and even Hardy will only have 0.9.5. Luckily, Mercurial 1.0 is easy-installable. That makes it easy to install:


Install Mercurial 1.0
  1. If you don't already have Mercurial 0.9.4 installed, I'd suggest installing it because it will setup /etc/mercurial for using Mercurial extenstions.
    sudo apt-get install mercurial
  2. Install Python Easy Install, build tools, and Python header files.
    sudo apt-get install python-setuptools python-dev build-essential
  3. Install Mercurial 1.0
    sudo easy_install -U mercurial
That was easy! Test it out by typing hg version.
Mercurial Distributed SCM (version 1.0)

Copyright (C) 2005-2008 Matt Mackall  and 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.

Upgrade to 1.0.1
Update 6/2/2008: Mercurial 1.0.1 has been released as a bugfix version. You can upgrade from 1.0 to 1.0.1 using Easy Install:
sudo easy_install -U mercurial

Install hgk extension
If you try the hg view command, you will get a sh: hgk: not found error. To fix this, I copied the hgk executable from the contrib directory in the source package to a directory in my path:
  1. Download and unpack the Mercurial source package.
    cd /tmp
    wget http://www.selenic.com/mercurial/release/mercurial-1.0.tar.gz
    tar zxvf mercurial-1.0.tar.gz
  2. Copy hgk somewhere on your path. E.g.:
    cp mercurial-1.0/contrib/hgk ~/bin
Note, if you get a /usr/bin/env: wish: No such file or directory error, it means you need to install the Tk package:
sudo apt-get install tk8.5

Other Notes
  • hbisect warning
    Per the Upgrade Notes, bisect is now a built-in command and the hbisect extension should not be used. If you get a extension 'hgext/hbisect' overrides commands: bisect warning, remove the hbisect= line from your configuration file (located at /etc/mercurial/hgrc.d/hgext.rc or ~/.hgrc).

  • Where are the files located?
    The hgext and mercurial files should be located at /usr/lib/python2.5/site-packages/mercurial-1.0-py2.5-linux-*.egg

  • Python.h error during easy_install
    If you got the following error while trying to run easy_install, it probably means you don't have the "python-dev" package installed. $ sudo apt-get install python-dev.
    Searching for mercurial
    Reading http://cheeseshop.python.org/pypi/mercurial/
    Couldn't find index page for 'mercurial' (maybe misspelled?)
    Scanning index of all packages (this may take a while)
    Reading http://cheeseshop.python.org/pypi/
    Reading http://cheeseshop.python.org/pypi/Mercurial/1.0
    Reading http://www.selenic.com/mercurial
    Best match: mercurial 1.0
    Downloading http://www.selenic.com/mercurial/release/mercurial-1.0.tar.gz
    Processing mercurial-1.0.tar.gz
    Running mercurial-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-MfmZhU/mercurial-1.0/egg-dist-tmp-JDYH6V
    mercurial/mpatch.c:23:20: error: Python.h: No such file or directory
    mercurial/mpatch.c:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    mercurial/mpatch.c: In function 'lalloc':
    mercurial/mpatch.c:92: warning: implicit declaration of function 'PyErr_Occurred'
    mercurial/mpatch.c:93: warning: implicit declaration of function 'PyErr_NoMemory'
    mercurial/mpatch.c: In function 'decode':
    mercurial/mpatch.c:265: warning: implicit declaration of function 'PyErr_SetString'
    mercurial/mpatch.c:265: error: 'mpatch_Error' undeclared (first use in this function)
    mercurial/mpatch.c:265: error: (Each undeclared identifier is reported only once
    mercurial/mpatch.c:265: error: for each function it appears in.)
    mercurial/mpatch.c: In function 'calcsize':
    mercurial/mpatch.c:283: error: 'mpatch_Error' undeclared (first use in this function)
    mercurial/mpatch.c: In function 'apply':
    mercurial/mpatch.c:306: error: 'mpatch_Error' undeclared (first use in this function)
    mercurial/mpatch.c: At top level:
    mercurial/mpatch.c:322: error: expected ')' before '*' token
    mercurial/mpatch.c:344: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    mercurial/mpatch.c:392: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    mercurial/mpatch.c:432: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'methods'
    mercurial/mpatch.c:439: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'initmpatch'
    error: Setup script exited with error: command 'gcc' failed with exit status 1
  • Couldn't find a setup script Error:
    If you get the following error when trying to run sudo easy_install -U mercurial, it could mean that there is a "mercurial" directory in your current working directory. Change to a different directory and run the command again.
    Processing mercurial
    error: Couldn't find a setup script in mercurial

[Read the full post...]

My software tools list



This is my OLD blog. I've copied this post over to my NEW blog at:

http://www.saltycrane.com/blog/2007/08/current-configuration/

You should be redirected in 2 seconds.



Below is a table of my current software configuration. If you notice a lot of "I switched from ..." statements, keep in mind that I am a programmer who likes shiny things.

Category Currently using Comments
Operating System Ubuntu 8.04, Windows XP, Windows Vista Work Desktop: Ubuntu Hardy via coLinux on Windows XP and Cygwin when needed.
Home Laptop: dual-boot Windows Vista with Cygwin and Ubuntu Hardy
Home Desktop: Ubuntu Hardy

I am in the process of migrating from Windows to Linux. My first Ubuntu install was in 2007 (dual-boot) and I got my first Windows-free machine in 2008. Currently I am using Cygwin and coLinux when on Windows. Cygwin integrates better with Windows applications, but coLinux is super fast and allows you to run a full Linux distro on top of Windows. Windows does have some advantages, but overall I prefer Linux.

I don't have enough experience with OSX to draw any authoritative conclusions, though I think Mark Pilgrim has biased me against Apple. Also, I think Linux's free as in beer (and somewhat related free as in speech) characteristics vs. Mac's expensive (and somewhat related proprietary) characteristics resonate with the cheap engineer in me.

Additional Linux vs. Mac commentary from some A-list geeks:
Window Manager wmii Dynamic, tiling, scriptable window manager that doesn't require a mouse. It sucks less.

I switched from ratpoison at the same time I started using coLinux because running native Linux allowed me to use any Linux window manager as well.

Recently, some have switched from wmii to xmonad, the new Haskell tiling window manager. It has some nice features over wmii, including dual head support, but after a brief excursion, I slightly prefer wmii's way of doing things.

If you're a hard core Lisper, stumpwm is the window manager for you. It has a REPL. This one seems a little too hard core for me, especially since I don't know Lisp (yet).

Other options: ion, dwm, awesomewm

Editor/IDE GNU Emacs Switched from Eclipse in 2007. It was a slow transition, but worth it. I think Emacs is definitely worth the investment if you do a lot of coding.

Terminal urxvt +
screen
urxvt supports xft (anti-aliased) fonts, real transparency (not that I actually use transparency with wmii), and fading (which I do use with wmii) and it is much lighter than gnome-terminal or konsole. screen allows me to switch terminal sessions without ugly tabs, attach to remote sessions, search through the scrollback buffer, and more.

Version Control System Mercurial Switched from Subversion in June 2007. The merging in Mercurial is very nice and can be done without thinking. I do miss Subversion/Subclipse's revision history viewer, file compare, and ability to isolate files apart from changesets.

Compiled Language C Wouldn't mind learning C++. Although, Linus doesn't like it.

Dynamic Language Python 2.5 My love for python is strong. I switched from Perl in 2005 and have no regrets. Object-oriented, easy to read (no more TIMTOWTDI), and smart people use it. I also want to learn Javascript 2 becuase it is the "Next Big Language" and Lisp because it is the "most powerful language".

On Python vs. Ruby: from what I've read, I characterize Ruby as the more expressive language more similar to Perl (than Python is) and Python as the more regimented language. Since I like regimented, I like Python.

On Python vs. Lisp: I've concluded that I lack the intelligence to harness enough of Lisp's power to counteract its non-practicality (e.g. lack of libraries).

Some other links:
Paul Graham: Python is getting closer to Lisp (2002)
Paul Prescod: no it isn't

Web Framework Django I haven't tried much else, but Django is pretty cool.

Here are some links:
Ian Bicking: There's so much more than Rails (2005), What PHP deployment gets right (2008)

Web Browser Conkeror Not to be confused with Konqueror, Conkeror is an emacs-like, keyboard driven, scriptable, Mozilla-based web browser. I've used it almost full time since January 2008. It is still considered alpha stage software so there are a number of bugs. However, it is still pretty sweet. I use Firefox as a backup (and IE Tab for Launchcast and Netflix on Windows). Unfortunately, one of the annoying things in Firefox 2 is present in Conkeror as well-- memory leaks. Based on this Mozilla article and some brief personal experience, Firefox 3 has made fixes in this area. It would be nice if Conkeror could benefit from the Firefox 3 fixes.

Email/PIM Undecided Thunderbird?, Evolution?, Mutt?, Gnus?, Alpine?, Gmail?, Claws Mail?,

I currently use Microsoft Outlook with an Exchange Server at work. Evolution supports Exchange Server through Outlook Web Access (OWA), but I couldn't get it to work for me. Thunderbird (and I assume others) support Exchange through IMAP, but this is only available at work by special request.

Links:
Adam Gomaa chooses Claws Mail over Thunderbird, Evolution, Mutt, and Gnus (2007)

PDF Viewer KPDF Preferred over Gnome's Evince
Screen Capture KSnapshot Courtesy of Mark Pilgrim's essentials list
Graphical diff/merge KDiff3 I started using KDiff a while ago on Windows and have always liked it. I'm thinking, though, since I'm an Emacs person, I ought to use Ediff.
Updated 7/2/2008
[Read the full post...]

About

This is my *OLD* blog. I've copied all of my posts and comments over to my NEW blog at:

http://www.saltycrane.com/blog/.

Please go there for my updated posts. I will leave this blog up for a short time, but eventually plan to delete it. Thanks for reading.