Code

Add bzr revision in the About screen
authorJazzyNico <nicoduf@yahoo.fr>
Mon, 28 Dec 2009 13:53:22 +0000 (14:53 +0100)
committerTed Gould <ted@gould.cx>
Mon, 28 Dec 2009 13:53:22 +0000 (14:53 +0100)
src/Makefile.am

index 30d1e5f42d9ad1829d40fc69d7b441b7dbe00525..cbd22144d2130a0f1c2fb9205c0abfbca8497db1 100644 (file)
@@ -226,20 +226,18 @@ inkview_LDADD = $(all_libs)
 libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h
 
 if USE_SVN_VERSION
-inkscape_version_deps = $(top_srcdir)/.svn/entries
+inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision
 endif
 
-# If this is an SVN snapshot build, regenerate this file every time
-# someone updates the SVN working directory.
+# If this is an BZR snapshot build, regenerate this file every time
+# someone updates the BZR working directory.
 inkscape-version.cpp: $(inkscape_version_deps)
-       VER_PREFIX="$(VERSION)"; \
-       if test -x "$(srcdir)/.svn" -a ! -z `which svn`; then \
-           VER_SVNREV=" r`LANG=en svn info $(srcdir) | sed -n -e '/^Revision:/s/Revision: \(.*\)/\1/p'`"; \
-           if test ! -z "`svn status -q $(srcdir)`"; then \
-                VER_CUSTOM=" custom"; \
-           fi; \
+       VER_PREFIX="$(VERSION)";\
+       VER_BZRREV=" r`bzr log -r '-1..' | sed -n -e '/^revno:/s/revno: \(.*\)/\1/p'`"; \
+       if test ! -z "`bzr status -S -V $(srcdir)`"; then \
+           VER_CUSTOM=" custom"; \
        fi; \
-       VERSION="$$VER_PREFIX$$VER_SVNREV$$VER_CUSTOM"; \
+       VERSION="$$VER_PREFIX$$VER_BZRREV$$VER_CUSTOM"; \
        echo "namespace Inkscape { " \
             "char const *version_string = \"$$VERSION\"; " \
             "}" > inkscape-version.new.cpp; \