From cde31f34d6f8a8f961d69decb7660268c697b25b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Jul 2009 20:06:59 +0200 Subject: bzr: Set author to root when committing via sudo. Committer will be the sudo user, as it is in git. --- commit.d/50vcs-commit | 5 +++-- debian/changelog | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/commit.d/50vcs-commit b/commit.d/50vcs-commit index 687a2ed..e7e0eaf 100755 --- a/commit.d/50vcs-commit +++ b/commit.d/50vcs-commit @@ -26,11 +26,12 @@ elif [ "$VCS" = hg ] && [ -d .hg ]; then elif [ "$VCS" = bzr ] && [ -d .bzr ]; then if [ -n "$SUDO_USER" ]; then export EMAIL="$SUDO_USER <$SUDO_USER@$hostname>" + BZR_AUTHOR='--author="root "' fi if [ -n "$message" ]; then - bzr commit $BZR_COMMIT_OPTIONS -m "$message" + bzr commit "$BZR_AUTHOR" $BZR_COMMIT_OPTIONS -m "$message" else - bzr commit $BZR_COMMIT_OPTIONS + bzr commit "$BZR_AUTHOR" $BZR_COMMIT_OPTIONS fi elif [ "$VCS" = darcs ] && [ -d _darcs ]; then logfile="$( mktemp -t etckeeper-$VCS.XXXXXXXXXX )" diff --git a/debian/changelog b/debian/changelog index d60abb7..eb9f7d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ etckeeper (0.39) UNRELEASED; urgency=low * Document ETCKEEPER_CONF_DIR in man page. * Typo. Closes: #536799 + * bzr: Set author to root when committing via sudo. Committer + will be the sudo user, as it is in git. -- Joey Hess Thu, 09 Jul 2009 14:35:55 -0400 -- cgit v1.2.3