Created
October 20, 2011 15:37
-
-
Save olemb/1301449 to your computer and use it in GitHub Desktop.
Remove dotencode from a Mercurial repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Remove dotencode from a Mercurial repository. | |
if [ -z $1 ]; then | |
echo "usage: dotdecode REPOSITORY" | |
echo | |
echo "A backup will be made to REPOSITORY.dotencode" | |
exit 1 | |
fi | |
if [ -z $(grep dotencode $1/.hg/requires) ]; then | |
echo "No need to convert. (Repository doesn't require dotencode.)" | |
exit 0 | |
fi | |
echo Backing up to $1.dotencode | |
mv $1 $1.dotencode | |
hg --config format.dotencode=0 clone --pull $1.dotencode $1 | |
# Fix push/pull paths | |
cp $1.dotencode/.hg/hgrc $1/.hg/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment