summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rwxr-xr-xpre-commit.d/30store-metadata8
2 files changed, 14 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 5af1274..214296e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+etckeeper (0.14) unstable; urgency=low
+
+ * When deleting the .metadata, only $VCS rm it if using git. hg write
+ locks the repo when the pre-commit hook is running, so it would lock.
+
+ -- Joey Hess <joeyh@debian.org> Sat, 29 Mar 2008 13:43:20 -0400
+
etckeeper (0.13) unstable; urgency=low
* Drop the debconf prompt before committing in pre-install.
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index ec0c691..bed2d89 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -56,7 +56,13 @@ generate_metadata() {
if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then
if [ -f .metadata ]; then
# remove obsolete .metadata file
- $VCS rm .metadata
+ # git allows fully deleting it at this point, other VCS
+ # may not (the repo is locked for hg).
+ if [ "$VCS" = git ]; then
+ $VCS rm .metadata
+ else
+ rm -f .metadata
+ fi
fi
echo "# Generated by etckeeper. Do not edit." > .etckeeper