Mercurial > hg > config
comparison .bashrc @ 742:e12ca24fd7c6
remove cruft
| author | Jeff Hammel <k0scist@gmail.com> | 
|---|---|
| date | Sun, 28 Jun 2015 12:35:06 -0700 | 
| parents | 0dd3144d3bdc | 
| children | b68cd77be145 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 741:9681a0bd74d6 | 742:e12ca24fd7c6 | 
|---|---|
| 461 done | 461 done | 
| 462 } | 462 } | 
| 463 | 463 | 
| 464 ### functions for version control systems | 464 ### functions for version control systems | 
| 465 | 465 | 
| 466 svndance(){ | |
| 467 # do the svn import dance! | |
| 468 if (( $# )) | |
| 469 then | |
| 470 svn import $1 | |
| 471 cd .. | |
| 472 rm -rf $OLDPWD | |
| 473 svn co $1 $OLDPWD | |
| 474 cd $OLDPWD | |
| 475 else | |
| 476 return 1 | |
| 477 fi | |
| 478 } | |
| 479 | |
| 480 difffiles() { | 466 difffiles() { | 
| 481 # which files are diffed; could use `lsdiff` | 467 # which files are diffed; could use `lsdiff` | 
| 482 grep '^+++ ' $@ | sed 's/+++ b\///' | 468 grep '^+++ ' $@ | sed 's/+++ b\///' | 
| 483 } | 469 } | 
| 484 | 470 | 
| 488 } | 474 } | 
| 489 | 475 | 
| 490 git-diff-total() { | 476 git-diff-total() { | 
| 491 # diff of both added + modified files | 477 # diff of both added + modified files | 
| 492 combinediff <(git diff) <(git diff --cached) | 478 combinediff <(git diff) <(git diff --cached) | 
| 493 } | |
| 494 | |
| 495 hg-add-commit() { | |
| 496 # add a file + commit | |
| 497 MESSAGE=$(hg add $@) | |
| 498 hg commit -m "${MESSAGE}" | |
| 499 } | 479 } | 
| 500 | 480 | 
| 501 hg-update-all() { | 481 hg-update-all() { | 
| 502 # update all hg repositories in the current directory | 482 # update all hg repositories in the current directory | 
| 503 for i in *; | 483 for i in *; | 
| 605 } | 585 } | 
| 606 | 586 | 
| 607 ### include overrides for commands | 587 ### include overrides for commands | 
| 608 source ~/.bash_overrides | 588 source ~/.bash_overrides | 
| 609 | 589 | 
| 610 ### cognet customizations | 590 ### deactivate any virtualenvs | 
| 611 export BASTION_SERVER=bastion-east-1c.cognet.tv | |
| 612 export BASTION_USER=jhammel | |
| 613 export KEYS_DIR=/home/jhammel/.ssh | |
| 614 COGNET_BASHRC=~/cognet/bin/.bashrc | |
| 615 if [ -e "${COGNET_BASHRC}" ] | |
| 616 then | |
| 617 . ${COGNET_BASHRC} | |
| 618 fi | |
| 619 | |
| 620 if type deactivate &> /dev/null | 591 if type deactivate &> /dev/null | 
| 621 then | 592 then | 
| 622 deactivate | 593 deactivate | 
| 623 fi | 594 fi | 
| 624 | 595 | 
