Henrik Skupin on May 1st, 2009

Within the last two weeks I messed up my Mercurial queue a couple of times. Working on several patches in parallel you will forget about the currently applied patch. Doing changes and refreshing the patch will overwrite the whole content of the wrong patch! That could be really bad. To circumvent such an action Jason Orendorff posted a nice solution which integrates the name of the top patch into your prompt. So it will like like:

henrik@mbp:/mozilla/mozmill-tests[privatebrowsing.patch]$

The only thing you have to do is to enter the following entry into your .bashrc or .bash_profile:
PS1='\u@\h:\w[\[`hg qtop 2>/dev/null`\]]\$ '

That’s it!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Tags:

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>