Monotone analysis

Richard Laager rlaager at wiktel.com
Wed Jul 9 14:26:10 EDT 2008


On Wed, 2008-07-09 at 12:44 -0500, Richard Laager wrote:
> Also, it seems BZR has a feature that I wanted out of Monotone for
> some time.

In case anyone is interested, you can replicate this fairly well with
the script below--which I put in ~/bin/mtn on my system, where ~/bin
comes before /usr/bin in my path. If you don't want to use the PATH
manipulation, you can remove that line and replace the calls to mtn with
a full path, like /usr/bin/mtn.

Richard

#!/bin/sh

PATH="$(echo "$PATH" | sed "s|$(echo ~/bin):\?||g")"

if [ "x$1" != "x" -a "$1" = "commit" ]; then
        if [ "x$(mtn ls unknown | head -n1)" != "x" ] ; then
                echo mtn: misuse: unknown changes in working copy >&2
		# OPTIONAL: Prints the files.
		#mtn list unknown | sed "s|^|mtn: misuse:     |" >&2
                exit 1
        fi
fi

mtn "$@"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://pidgin.im/pipermail/devel/attachments/20080709/0b4ecf5b/attachment.sig>


More information about the Devel mailing list