# HG changeset patch # User Augie Fackler # Date 1273704481 18000 # Node ID 50244cf921fb77361f895579abeaafa6c103c2da # Parent c965d5dbd8685164de164aee6d1edd1555f2198d# Parent 226d1ac6acb6cda6ee3ae6ff74541eb8a77a9e94 Merge diff --git a/.hgrc b/.hgrc --- a/.hgrc +++ b/.hgrc @@ -44,6 +44,9 @@ diff = -p [diff] git=1 +[bookmarks] +track.current = 1 + [web] style = gitweb port=7000 diff --git a/.shell.d/50.vcs_functions.sh b/.shell.d/50.vcs_functions.sh --- a/.shell.d/50.vcs_functions.sh +++ b/.shell.d/50.vcs_functions.sh @@ -88,6 +88,14 @@ function hgamend() { } alias hg-amend=hgamend +function hg_verify_all() { + for x in $(find . -name '.hg') ; do + y=$(dirname $x) + echo $y + hg verify -R $y + done +} + function hgsvnmkbranch() { local upstream upstream=$(hg paths default | sed 's%/*$%%') @@ -212,6 +220,29 @@ function git_next_unmerged_file() { } alias git-next-unmerged-file=git_next_unmerged_file +function git_repack_all() { + for repo in $(find . | \ + grep '/objects/pack/' | \ + sed -e 's%\.git/objects/pack/.*%%' | \ + sed -e 's%git/objects/pack/.*%git%' | sort | uniq) ; do + pushd $repo + git repack -ad --window 100 + git gc --prune="`date`" + popd + done +} + +function git_fsck_all() { + for repo in $(find . | \ + grep '/objects/pack/' | \ + sed -e 's%\.git/objects/pack/.*%%' | \ + sed -e 's%git/objects/pack/.*%git%' | sort | uniq) ; do + pushd $repo + git fsck + popd + done +} + # change to the root dir of the current wc function wcroot() { local root=`hg root 2> /dev/null`