[hipl-commit] [trunk] Rev 4445: Added Bazaar branch-nick to hipd version output.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Sat, 1 May 2010 16:47:22 +0300

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: 01/05/2010 at 16:47:22
Revision: 4445
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Added Bazaar branch-nick to hipd version output.

Modified:
  M  Makefile.am
  M  lib/core/util.c

=== modified file 'Makefile.am'
--- Makefile.am 2010-04-29 14:59:33 +0000
+++ Makefile.am 2010-05-01 13:46:51 +0000
@@ -478,7 +478,7 @@
 # when creating specific objects that may depend on version.h directly.
 BUILT_SOURCES = version.h
 $(srcdir)/version.h: $(wildcard $(srcdir)/.bzr/branch/last-revision)
-       echo "#define BZR_REVISION \"$$(bzr revno $(srcdir))\"" > $@
+       echo "$$(bzr version-info $(srcdir) --custom --template="#define 
BZR_REVISION \"{revno}\"\n\n#define BZR_BRANCH \"{branch_nick}\"")" > $@
 
 # The complete doc/ subdirectory is in EXTRA_DIST, so files that should
 # not be distributed need to be deleted manually from the distribution.

=== modified file 'lib/core/util.c'
--- lib/core/util.c     2010-04-13 16:51:53 +0000
+++ lib/core/util.c     2010-05-01 13:46:51 +0000
@@ -15,7 +15,8 @@
  */
 int hip_print_version(const char *name)
 {
-    printf("%s %s (Bazaar revision %s)\n", name, VERSION, BZR_REVISION);
+    printf("%s %s (Bazaar branch-nick: '%s', revision: %s)\n",
+           name, VERSION, BZR_BRANCH, BZR_REVISION);
     printf("build configuration: %s\n", HIPL_CONFIGURATION);
     exit(EXIT_SUCCESS);
 }

Other related posts:

  • » [hipl-commit] [trunk] Rev 4445: Added Bazaar branch-nick to hipd version output. - Tim Just