From e830c8b06a0058b317a8dedfbc51a83de274ad5a Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 18 Feb 2014 12:17:38 +0100 Subject: Deal with changed git-log behavior in version 1.9.x. The latest version of git-log tracks the origin of a given file through sub-module commits. The macro AX_ABSOLUTE_HEADER, for instance, used to have 6 commits attributed to it, but now it has 26: $ git log --oneline -- m4/ax_absolute_header.m4 27948f4 ALL: update web site URL to http://www.gnu.org/software/autoconf-archive/MACRO-NAME.html c6b6f51 Assigned all macros a unique serial number. 89b80e0 Augmented the text of the all-permissive license by an express warranty disclaimer. d722dcd Add AU_ALIAS calls to new files for all recently renamed macros. 6fc99d3 Center the URL at the top of every file and use consistent word-wrapping. acffb06 Rename gl_TRILINOS_ABSOLUTE_HEADER to AX_ABSOLUTE_HEADER. 054e8ad remove m4 submodule fa1b1bb m4: update reference to macro branch 548839e m4: update reference to macro branch d9afb8a m4: update reference to macro branch 8968e9d m4: update reference to macro branch 862b513 Avoid non-ASCII characters in m4 files. d7160b6 m4: update reference to macro branch 9062013 m4: update reference to macro branch 3cf85b5 m4: update reference to macro branch 49af2e9 m4: update reference to macro branch 950f2a7 m4: update reference to macro branch c610f41 m4: update reference to macro branch 78d7777 m4: update reference to macro branch ddd0b53 m4: update reference to macro branch fcb87e1 m4: update reference to macro branch 702ea3c m4: update reference to macro branch cee9eea m4: update reference to macro branch e3df236 m4: update reference to macro branch 3c89e38 m4: update reference to macro branch 3b30002 maint: added initial version of the toolchain This new behavior means that most of our macros suddenly experience large bumps in their #serial number for no apparent reason. To prevent this situation, we limit the version history git-log may consider to 054e8ad..HEAD, i.e. all commits prior to the sub-module merge don't count. This gives us the old behavior of git-log back. --- macro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'macro.py') diff --git a/macro.py b/macro.py index f2f8533..1803c19 100755 --- a/macro.py +++ b/macro.py @@ -106,7 +106,7 @@ class Macro: self.__dict__[key] = body # determine the macro's serial number if computeSerialNumber: # compute the number from git - logMessages = subprocess.check_output(["git", "log", "--oneline", "--", filePath], bufsize=1) + logMessages = subprocess.check_output(["git", "log", "--oneline", "054e8ad8c766afa7059d8cd4a81bbfa99133ef5e..HEAD", "--", filePath], bufsize=1) logLines = logMessages.rstrip(b'\n').split(b"\n") self.serial = len(logLines) modified = subprocess.call(["git", "diff", "--quiet", "--exit-code", "HEAD", "--", filePath]) -- cgit v1.2.1