From 7f95ccf12aa02db60f560a66fc43d8bae1e1175c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 4 Jan 2008 18:34:54 -0500 Subject: tricky stuff to do with storing metadata etc in pre-commit git needs to git add the files to stage them as part of the current commit, but hg does not, and hg add doesn't do that. Create the files as part of init, this will cause them to be added, pre-commit, which hg needs. --- init.d/10restore-etckeeper | 2 ++ init.d/20restore-metadata | 2 ++ 2 files changed, 4 insertions(+) (limited to 'init.d') diff --git a/init.d/10restore-etckeeper b/init.d/10restore-etckeeper index 376524c..f49e70c 100755 --- a/init.d/10restore-etckeeper +++ b/init.d/10restore-etckeeper @@ -5,4 +5,6 @@ set -e # should only be run on repositories you trust. if [ -e .etckeeper ]; then . ./.etckeeper +else + touch .etckeeper fi diff --git a/init.d/20restore-metadata b/init.d/20restore-metadata index 01c45e4..5d76b1b 100755 --- a/init.d/20restore-metadata +++ b/init.d/20restore-metadata @@ -7,4 +7,6 @@ set -e # should only be run on repositories you trust. if [ -e .metadata ]; then metastore --apply --mtime +else + metastore --save fi -- cgit v1.2.3