SConstruct (8122:159c07f22c8e) | SConstruct (8126:5138d1e453f1) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2011 Advanced Micro Devices, Inc. 4# Copyright (c) 2009 The Hewlett-Packard Development Company 5# Copyright (c) 2004-2005 The Regents of The University of Michigan 6# All rights reserved. 7# 8# Redistribution and use in source and binary forms, with or without --- 213 unchanged lines hidden (view full) --- 222""" 223 224mercurial_lib_not_found = """ 225Mercurial libraries cannot be found, ignoring style hook 226If you are actually a M5 developer, please fix this and 227run the style hook. It is important. 228""" 229 | 1# -*- mode:python -*- 2 3# Copyright (c) 2011 Advanced Micro Devices, Inc. 4# Copyright (c) 2009 The Hewlett-Packard Development Company 5# Copyright (c) 2004-2005 The Regents of The University of Michigan 6# All rights reserved. 7# 8# Redistribution and use in source and binary forms, with or without --- 213 unchanged lines hidden (view full) --- 222""" 223 224mercurial_lib_not_found = """ 225Mercurial libraries cannot be found, ignoring style hook 226If you are actually a M5 developer, please fix this and 227run the style hook. It is important. 228""" 229 |
230hg_info = "Unknown" | |
231if hgdir.exists(): | 230if hgdir.exists(): |
232 # 1) Grab repository revision if we know it. 233 cmd = "hg id -n -i -t -b" | 231 # Ensure that the style hook is in place. |
234 try: | 232 try: |
235 hg_info = readCommand(cmd, cwd=main.root.abspath).strip() 236 except OSError: 237 print mercurial_bin_not_found 238 239 # 2) Ensure that the style hook is in place. 240 try: | |
241 ui = None 242 if not GetOption('ignore_style'): 243 from mercurial import ui 244 ui = ui.ui() 245 except ImportError: 246 print mercurial_lib_not_found 247 248 if ui is not None: 249 ui.readconfig(hgdir.File('hgrc').abspath) 250 style_hook = ui.config('hooks', 'pretxncommit.style', None) 251 252 if not style_hook: 253 print mercurial_style_message 254 sys.exit(1) 255else: 256 print ".hg directory not found" 257 | 233 ui = None 234 if not GetOption('ignore_style'): 235 from mercurial import ui 236 ui = ui.ui() 237 except ImportError: 238 print mercurial_lib_not_found 239 240 if ui is not None: 241 ui.readconfig(hgdir.File('hgrc').abspath) 242 style_hook = ui.config('hooks', 'pretxncommit.style', None) 243 244 if not style_hook: 245 print mercurial_style_message 246 sys.exit(1) 247else: 248 print ".hg directory not found" 249 |
258main['HG_INFO'] = hg_info 259 | |
260################################################### 261# 262# Figure out which configurations to set up based on the path(s) of 263# the target(s). 264# 265################################################### 266 267# Find default configuration & binary. --- 787 unchanged lines hidden --- | 250################################################### 251# 252# Figure out which configurations to set up based on the path(s) of 253# the target(s). 254# 255################################################### 256 257# Find default configuration & binary. --- 787 unchanged lines hidden --- |