[PATCH] D56459: gn build: Fix a Python2ism in write_vcsrevision.py.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 8 20:08:56 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL350686: gn build: Fix a Python2ism in write_vcsrevision.py. (authored by pcc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D56459?vs=180761&id=180784#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56459/new/

https://reviews.llvm.org/D56459

Files:
  llvm/trunk/utils/gn/build/write_vcsrevision.py


Index: llvm/trunk/utils/gn/build/write_vcsrevision.py
===================================================================
--- llvm/trunk/utils/gn/build/write_vcsrevision.py
+++ llvm/trunk/utils/gn/build/write_vcsrevision.py
@@ -52,9 +52,9 @@
         git = which('git.bat')
         use_shell = True
     rev = subprocess.check_output([git, 'rev-parse', '--short', 'HEAD'],
-                                  cwd=git_dir, shell=use_shell)
+                                  cwd=git_dir, shell=use_shell).decode().strip()
     # FIXME: add pizzas such as the svn revision read off a git note?
-    vcsrevision_contents = '#define LLVM_REVISION "git-%s"\n' % rev.strip()
+    vcsrevision_contents = '#define LLVM_REVISION "git-%s"\n' % rev
 
     # If the output already exists and is identical to what we'd write,
     # return to not perturb the existing file's timestamp.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56459.180784.patch
Type: text/x-patch
Size: 873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190109/f1e41248/attachment.bin>


More information about the llvm-commits mailing list