Source

dotfiles / .hgrc

Full commit
[ui]
username = olle <geek@nerd.sh>
ssh = ssh -C

[extensions]
hgext.churn =
hgext.graphlog =
hgext.children =
hgext.progress =
hgext.rebase   =
hgext.transplant =
hgext.color =
hgext.record =

[progress]
delay = 1.0

[diff]
git = True
unified = 5

[color]
status.modified = cyan
status.added = green
status.removed = red
status.deleted = yellow bold underline
status.unknown = magenta bold underline
status.ignored = black bold
diff.diffline = none
diff.extended = cyan
diff.file_a = red
diff.file_b = green
diff.hunk = yellow bold
diff.deleted = red
diff.inserted = green
diff.changed = white
diff.trailingwhitespace = white_background

[alias]
mkrepo = !$HG init $1 && cd $1 && $HG mkig && {
		echo "[paths]\n" > .hg/hgrc
	}

mkig   = !$HG st -q . > /dev/null 2>&1 && [ ! -f `$HG root`/.hgignore ] && {
		echo 'syntax: glob'
		echo ''
		echo '.DS_Store'
		echo '*.pyc'
		echo '*.swp'
		echo '*.swo'
		echo '*.un~'
		echo '.ropeproject'
		echo '.pydevproject'
		echo '.project'
		echo 'tags'
		echo '*egg-info/*'
	} > `$HG root`/.hgignore && {
		$HG commit `$HG root`/.hgignore -Am 'Added default .hgignore.'
	}

ignore = ![ -n "$@" ] && echo '$@' >> `$HG root`/.hgignore && 			\
          $HG commit `$HG root`/.hgignore -Am 'Add "$@" to .hgignore.'

push-all = !$HG push; $HG paths | while read line; do 				\
		name=${line%%=*}; 						\
		name=${name%% *}; 						\
		[[ ! ${name} =~ "default" ]] && $HG push "$name";		\
           done

rsync = ![ -n "$1" ] && {							\
                tohost=`$HG paths "$1"` && {                                    \
			tohost=${tohost##*://};                                 \
			tohost=${tohost/\//:};                                  \
			echo "address is: ${tohost}";				\
			rsync --delete --delete-before                          \
			--exclude="*.swp" -avzP "`$HG root`/" "$tohost";	\
		}
	}

rsync-all = !$HG paths | while read line; do 					\
                name=${line%%=*};						\
                name=${name%% *}; 						\
                [[ "${name}" =~ "-rsync" ]] && { 				\
			echo "rsyncing ${name}";				\
			$HG rsync "${name}";					\
                } 								\
           done


url = showconfig paths.default