]> granicus.if.org Git - sudo/commitdiff
Don't overwrite ChangeLog if we can't run hg
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 12 Oct 2010 13:36:19 +0000 (09:36 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 12 Oct 2010 13:36:19 +0000 (09:36 -0400)
--HG--
branch : 1.7

Makefile.in

index 406b88c384be62c2bfe5a5042b4a7e48f7275d41..0da8fa7dbeb56d079f94eeb495e3a1e587f0ba49 100644 (file)
@@ -470,9 +470,12 @@ sudoers: $(srcdir)/sudoers.in
 
 # The 1.7 branch started Jan 18, 2010
 ChangeLog:
-       if test -d $(srcdir)/.hg; then \
-           hg log --style=changelog -b 1.7 > $@; \
-           hg log --style=changelog -b default --date '<2010-01-18 00:00:00' >> $@; \
+       if test -d $(srcdir)/.hg && cd $(srcdir); then \
+           if hg log --style=changelog -b 1.7 > $@.tmp && hg log --style=changelog -b default --date '<2010-01-18 00:00:00' >> $@.tmp; then \
+               mv $@.tmp $@; \
+           else \
+               rm -f $@.tmp; \
+           fi; \
        fi
 
 install: install-dirs install-binaries @INSTALL_NOEXEC@ install-sudoers install-doc