Changeset 493 in tailor
- Timestamp:
- 08/05/05 02:36:45 (8 years ago)
- Hash name:
- 20050805003645-97f81-2c18ff5d46336f01867a82700a059c8bd72722c7
- File:
-
- 1 edited
-
vcpx/tailor.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/tailor.py
r492 r493 79 79 80 80 def __call__(self, options): 81 from shwrap import ExternalCommand 82 from target import SyncronizableTargetWorkingDir 83 from changes import Changeset 84 85 def pconfig(option): 86 return self.project.config(self.project.name, option) 87 88 ExternalCommand.VERBOSE = pconfig('debug') 89 encoding = pconfig('encoding') 90 if encoding: 91 ExternalCommand.FORCE_ENCODING = encoding 92 93 # Make printouts be encoded as well. A better solution would be 94 # using the replace mechanism of the encoder, and keep printing 95 # in the user LC_CTYPE/LANG setting. 96 97 import codecs, sys 98 sys.stdout = codecs.getwriter(encoding)(sys.stdout) 99 100 pname_format = pconfig('patch-name-format') 101 if pname_format is not None: 102 SyncronizableTargetWorkingDir.PATCH_NAME_FORMAT = pname_format 103 SyncronizableTargetWorkingDir.REMOVE_FIRST_LOG_LINE = pconfig('remove-first-log-line') 104 Changeset.REFILL_MESSAGE = not pconfig('dont-refill-changelogs') 105 81 106 if options.bootstrap: 82 107 self.bootstrap() … … 225 250 """ 226 251 227 from os import getcwd, chdir 228 from os.path import abspath, exists, join 229 from shwrap import ExternalCommand 230 from target import SyncronizableTargetWorkingDir 231 from changes import Changeset 252 from os import getcwd 232 253 233 254 parser = OptionParser(usage='%prog [options] [project ...]', … … 249 270 250 271 options, args = parser.parse_args() 251 252 ExternalCommand.VERBOSE = options.debug253 if options.encoding:254 ExternalCommand.FORCE_ENCODING = options.encoding255 256 # Make printouts be encoded as well. A better solution would be257 # using the replace mechanism of the encoder, and keep printing258 # in the user LC_CTYPE/LANG setting.259 260 import codecs, sys261 sys.stdout = codecs.getwriter(options.encoding)(sys.stdout)262 263 if options.patch_name_format is not None:264 SyncronizableTargetWorkingDir.PATCH_NAME_FORMAT = options.patch_name_format265 SyncronizableTargetWorkingDir.REMOVE_FIRST_LOG_LINE = options.remove_first_log_line266 Changeset.REFILL_MESSAGE = not options.dont_refill_changelogs267 272 268 273 if options.interactive:
Note: See TracChangeset
for help on using the changeset viewer.
