Skip to content

Instantly share code, notes, and snippets.

@jtkorb
Created August 3, 2015 14:12
Show Gist options
  • Save jtkorb/be34c686e09c89aa918b to your computer and use it in GitHub Desktop.
Save jtkorb/be34c686e09c89aa918b to your computer and use it in GitHub Desktop.
Shell script to remove bin files from a Mercurial repository.
#!/bin/sh
if [ -d .hg ]
then
echo "Current directory contains a hg repository; try up a level."
exit 1
fi
if [ "$1" == "" ]
then
echo "Usage: $0 hg-repository-directory"
exit 1
fi
echo exclude bin > /tmp/cvt
hg convert --config convert.hg.saverev=false --filemap /tmp/cvt $1
rm /tmp/cvt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment