]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix the output of the deprecation script. 4394/head
authorDavid Wells <wellsd2@rpi.edu>
Sun, 14 May 2017 16:55:46 +0000 (12:55 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Tue, 16 May 2017 12:36:25 +0000 (08:36 -0400)
Some tags (e.g., 'rebase_here') may not be version numbers so we should not drop
the first letter.

contrib/utilities/print_deprecated.py

index 642173c13551bf646545a7a9e93b5a7fe749aad4..5e679379bb24def854ad463a5beb24b55a1dcecd 100644 (file)
@@ -81,11 +81,12 @@ class DeprecatedDeclaration(object):
         self.output_time = datetime.datetime.utcfromtimestamp(self.epoch_time)
 
         git_tag_output = subprocess.check_output(["git", "tag", "--contains",
-                                                  self.commit_hash])
+                                                  self.commit_hash,
+                                                  "-l", "v[0-9].[0-9].[0-9]"])
         git_tag_output = decode_and_split(git_tag_output)
-        relevant_tags = [tag for tag in git_tag_output if "rc" not in tag]
-        if relevant_tags:
-            self.release = relevant_tags[0][1:] # skip the prepended 'v'
+        if git_tag_output:
+            # matched tags must start with 'v[0-9]': skip the v
+            self.release = git_tag_output[0][1:]
         else:
             self.release = ""
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.