diff options
author | Mathieu Clabaut <mathieu.clabaut@gmail.com> | 2007-12-21 15:47:30 -0600 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-03 19:53:46 -0500 |
commit | 73188e18a0967551f5d502793717a981fb27a688 (patch) | |
tree | e1ae80dbcbcc014b9fa7f7f8ff2083a33ed681ba | |
parent | ee9cbb397107f216db196b2a7717f278a51b578d (diff) |
pre-apt.d : Translation into mercurial idiom
-rw-r--r-- | hg/pre-apt.d/50uncommitted-changes | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hg/pre-apt.d/50uncommitted-changes b/hg/pre-apt.d/50uncommitted-changes index d39401c..62d62c3 100644 --- a/hg/pre-apt.d/50uncommitted-changes +++ b/hg/pre-apt.d/50uncommitted-changes @@ -1,18 +1,18 @@ #!/bin/sh set -e -if [ -d .git ] && ! LANG=C git-status 2>&1 | grep -q "working directory clean"; then +if [ -d .hg ] && ! hg status 2>&1 | wc -l | grep -q "^0$"; then . /usr/share/debconf/confmodule db_capb escape db_title etckeeper db_reset etckeeper/unclean || true - db_subst etckeeper/unclean STATUS $(git-status | debconf-escape -e) || true + db_subst etckeeper/unclean STATUS $(hg status | debconf-escape -e) || true db_input critical etckeeper/unclean || true db_go || true db_get etckeeper/unclean if [ "$RET" = true ]; then - git add . - if ! git commit $GIT_COMMIT_OPTIONS -m "saving uncommitted changes in /etc prior to apt run"; then + hg addremove . + if ! hg commit $GIT_COMMIT_OPTIONS -m "saving uncommitted changes in /etc prior to apt run"; then db_input critical etckeeper/commit_failed || true db_go || true db_reset etckeeper/commit_failed || true |