]> sjero.net Git - wget/commitdiff
More reliable Mercurial node ids.
authorMicah Cowan <micah@cowan.name>
Tue, 22 Sep 2009 23:55:35 +0000 (16:55 -0700)
committerMicah Cowan <micah@cowan.name>
Tue, 22 Sep 2009 23:55:35 +0000 (16:55 -0700)
src/ChangeLog
src/Makefile.am

index f37814d53d59d50145bc4c93fd8caf167bfe3173..392c24758f25a1febff701735016d472a8564c3f 100644 (file)
@@ -1,5 +1,12 @@
 2009-09-22  Micah Cowan  <micah@cowan.name>
 
+       * Makefile.am (version.c): Explicitly tell Mercurial where the
+       top-source repository should be, so it doesn't accidentally use
+       the repository for a containing directory (for instance, if the
+       user's home directory is managed by a Mercurial repo). Also
+       ensures we find the repository, even if the build directory is
+       outside the source directory.
+
        * openssl.c (ssl_check_certificate): Avoid reusing the same buffer
        space for successive quoted arguments. Thanks to Steven Schweda
        for pointing out the problem.
index 93930d14b6510d7316b620952096fc86129d959d..4f463f9016c92b425415af45429d6bd4b0d2b868 100644 (file)
@@ -73,7 +73,8 @@ version.c:  $(wget_SOURCES) $(LDADD) $(srcdir)/Makefile.am \
        echo '/* Autogenerated by Makefile - DO NOT EDIT */' >> $@
        echo '' >> $@
        echo 'const char *version_string = "@VERSION@"' >> $@
-       -hg log -r . --template='" ({node|short})"\n' 2>/dev/null >> $@
+       -hg log -R $(top_srcdir) -r . --template='" ({node|short})"\n' \
+           2>/dev/null >> $@
        echo ';' >> $@
        echo 'const char *compilation_string = "'$(COMPILE)'";' \
            | $(ESCAPEQUOTE) >> $@