yuuji@111: #!/bin/sh yuuji@111: # This script does not support automatic "cvs add". yuuji@111: # If new file is added by "hg add", don't forget to "cvs add" in yuuji@111: # CVS working dir. yuuji@111: # yuuji@112: # This script should be called via incoming hook in .hg/hgrc as below. yuuji@112: # [hooks] yuuji@112: # incoming.cvsci = ./hg2cvsci.sh yuuji@111: yuuji@111: node=${HG_NODE:-tip} yuuji@113: hg=${HG:-hg} yuuji@111: msg=`hg log -r $node --template '{desc}\n'` yuuji@111: cd `dirname $0` yuuji@113: $hg up -r $node yuuji@111: cvs ci -m "$msg"