summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-03-12 17:16:42 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-03-12 17:17:07 -0500
commitb7415cf4c6d20cc6d7164caafc201933fe8ffd29 (patch)
treeb0d8a99779d4f31ceee238c32a231ddb77f9ce0e
parentbf4a93ca53cb2bd463ad553d13f4e988e26fe35f (diff)
darcs cleanup
* Changed darcs to specify --author instead of noting the committing user inside the commit log. * Add -a to DARCS_COMMIT_OPTIONS so commits are noninteractive by default, but users who want darcs prompting can disable it. * Use darcs record -m to specify commit message, instead of using a logfile.
-rwxr-xr-xcommit.d/50vcs-commit11
-rw-r--r--debian/changelog6
-rw-r--r--etckeeper.conf10
3 files changed, 17 insertions, 10 deletions
diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit
index 6cc0307..c726167 100755
--- a/commit.d/50vcs-commit
+++ b/commit.d/50vcs-commit
@@ -45,12 +45,13 @@ elif [ "$VCS" = bzr ] && [ -d .bzr ]; then
bzr commit "$BZR_AUTHOR" $BZR_COMMIT_OPTIONS
fi
elif [ "$VCS" = darcs ] && [ -d _darcs ]; then
- logfile="$(mktemp -t etckeeper-$VCS.XXXXXXXXXX)"
- printf "%b" "$message" > "$logfile"
if [ -n "$USER" ]; then
- echo "(committed by $USER)" >> "$logfile"
+ USER=root
+ fi
+ if [ -n "$message" ]; then
+ darcs record --author="$USER" $DARCS_COMMIT_OPTIONS -m "$message"
+ else
+ darcs record --author="$USER" $DARCS_COMMIT_OPTIONS
fi
- darcs record $DARCS_COMMIT_OPTIONS --logfile="$logfile"
- rm -f "$logfile"
unset logfile
fi
diff --git a/debian/changelog b/debian/changelog
index 2253307..9c0002f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,12 @@ etckeeper (0.44) UNRELEASED; urgency=low
* Add example to README of how to automatically push changes to a backup
repository.
* Add fuse lock file to ignore list.
+ * Changed darcs to specify --author instead of noting the committing
+ user inside the commit log.
+ * Add -a to DARCS_COMMIT_OPTIONS so commits are noninteractive by default,
+ but users who want darcs prompting can disable it.
+ * Use darcs record -m to specify commit message, instead of using a logfile.
+ * Closes: #519228
-- Joey Hess <joeyh@debian.org> Sun, 21 Feb 2010 13:30:33 -0500
diff --git a/etckeeper.conf b/etckeeper.conf
index ef8309c..be8934d 100644
--- a/etckeeper.conf
+++ b/etckeeper.conf
@@ -5,16 +5,16 @@ VCS="git"
#VCS="darcs"
# Options passed to git commit when run by etckeeper.
-#GIT_COMMIT_OPTIONS=""
+GIT_COMMIT_OPTIONS=""
# Options passed to hg commit when run by etckeeper.
-#HG_COMMIT_OPTIONS=""
+HG_COMMIT_OPTIONS=""
# Options passed to bzr commit when run by etckeeper.
-#BZR_COMMIT_OPTIONS=""
+BZR_COMMIT_OPTIONS=""
-# Options passed to darcs commit when run by etckeeper.
-#DARCS_COMMIT_OPTIONS=""
+# Options passed to darcs record when run by etckeeper.
+DARCS_COMMIT_OPTIONS="-a"
# Uncomment to avoid etckeeper committing existing changes
# to /etc automatically once per day.