changeset 5138d1e453f1 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=5138d1e453f1
description:
        SCons: Stop embedding the mercurial revision into the binary.

        This causes a lot of rebuilds that could have otherwise possibly been
        avoided, and, more annoyingly, a lot of unnecessary rerunning of the
        regressions. The benefits of having the revision in the output haven't
        materialized, so this change removes it.

diffstat:

 SConstruct            |  12 +-----------
 src/SConscript        |   5 ++---
 src/python/m5/main.py |   2 --
 3 files changed, 3 insertions(+), 16 deletions(-)

diffs (78 lines):

diff -r 05d2937bacbf -r 5138d1e453f1 SConstruct
--- a/SConstruct        Fri Mar 11 11:27:26 2011 -0800
+++ b/SConstruct        Fri Mar 11 11:27:36 2011 -0800
@@ -227,16 +227,8 @@
 run the style hook. It is important.
 """
 
-hg_info = "Unknown"
 if hgdir.exists():
-    # 1) Grab repository revision if we know it.
-    cmd = "hg id -n -i -t -b"
-    try:
-        hg_info = readCommand(cmd, cwd=main.root.abspath).strip()
-    except OSError:
-        print mercurial_bin_not_found
-
-    # 2) Ensure that the style hook is in place.
+    # Ensure that the style hook is in place.
     try:
         ui = None
         if not GetOption('ignore_style'):
@@ -255,8 +247,6 @@
 else:
     print ".hg directory not found"
 
-main['HG_INFO'] = hg_info
-
 ###################################################
 #
 # Figure out which configurations to set up based on the path(s) of
diff -r 05d2937bacbf -r 5138d1e453f1 src/SConscript
--- a/src/SConscript    Fri Mar 11 11:27:26 2011 -0800
+++ b/src/SConscript    Fri Mar 11 11:27:36 2011 -0800
@@ -410,7 +410,7 @@
 # Generate Python file containing a dict specifying the current
 # buildEnv flags.
 def makeDefinesPyFile(target, source, env):
-    build_env, hg_info = [ x.get_contents() for x in source ]
+    build_env = source[0].get_contents()
 
     code = code_formatter()
     code("""
@@ -418,7 +418,6 @@
 import m5.util
 
 buildEnv = m5.util.SmartDict($build_env)
-hgRev = '$hg_info'
 
 compileDate = m5.internal.core.compileDate
 _globals = globals()
@@ -430,7 +429,7 @@
 """)
     code.write(target[0].abspath)
 
-defines_info = [ Value(build_env), Value(env['HG_INFO']) ]
+defines_info = Value(build_env)
 # Generate a file with all of the compile options in it
 env.Command('python/m5/defines.py', defines_info,
             MakeAction(makeDefinesPyFile, Transform("DEFINES", 0)))
diff -r 05d2937bacbf -r 5138d1e453f1 src/python/m5/main.py
--- a/src/python/m5/main.py     Fri Mar 11 11:27:26 2011 -0800
+++ b/src/python/m5/main.py     Fri Mar 11 11:27:36 2011 -0800
@@ -177,7 +177,6 @@
         print 'Build information:'
         print
         print 'compiled %s' % defines.compileDate;
-        print "revision %s" % defines.hgRev
         print 'build options:'
         keys = defines.buildEnv.keys()
         keys.sort()
@@ -245,7 +244,6 @@
         print
 
         print "M5 compiled %s" % defines.compileDate;
-        print "M5 revision %s" % defines.hgRev
 
         print "M5 started %s" % datetime.datetime.now().strftime("%b %e %Y %X")
         print "M5 executing on %s" % socket.gethostname()
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to