Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit b7415cf4c6d20cc6d7164caafc201933fe8ffd29 1 parent bf4a93c
Joey Hess authored
Showing with 17 additions and 10 deletions.
  1. +6 −5 commit.d/50vcs-commit
  2. +6 −0 debian/changelog
  3. +5 −5 etckeeper.conf
View
11 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
View
6 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
View
10 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.
Please sign in to comment.
Something went wrong with that request. Please try again.