Changeset 341 in tailor for vcpx/session.py
- Timestamp:
- 06/01/05 14:29:42 (8 years ago)
- Hash name:
- 20050601122942-97f81-550963d95558d1c1020c33c91949029da81f6423
- File:
-
- 1 edited
-
vcpx/session.py (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/session.py
r340 r341 91 91 if self.options.verbose: 92 92 self.stdout.write(what) 93 self.stdout.write('\n') 93 94 94 95 def __err(self, what): … … 98 99 self.stdout.write('Error: ') 99 100 self.stdout.write(what) 100 101 101 self.stdout.write('\n') 102 102 103 def emptyline(self): 103 104 """Override the default impl of reexecuting last command.""" … … 124 125 """ 125 126 126 self.__log('Exiting... \n')127 self.__log('Exiting...') 127 128 return True 128 129 … … 142 143 143 144 readline.write_history_file(arg) 144 self.__log('History saved in: %s \n' % arg)145 self.__log('History saved in: %s' % arg) 145 146 146 147 def do_cd(self, arg): … … 183 184 self.sub_directory = arg 184 185 185 self.__log('Sub directory: %s \n' % self.sub_directory)186 self.__log('Sub directory: %s' % self.sub_directory) 186 187 187 188 def do_logfile(self, arg): … … 203 204 self.logger.setLevel(logging.INFO) 204 205 205 self.__log('Logging to: %s \n' % self.logfile)206 self.__log('Logging to: %s' % self.logfile) 206 207 207 208 def do_print_executed_commands(self, arg): … … 217 218 SystemCommand.VERBOSE = yesno(arg) 218 219 219 self.__log('Print executed commands: %s \n' % SystemCommand.VERBOSE)220 self.__log('Print executed commands: %s' % SystemCommand.VERBOSE) 220 221 221 222 def do_patch_name_format(self, arg): … … 237 238 SyncronizableTargetWorkingDir.PATCH_NAME_FORMAT = arg 238 239 239 self.__log('Patch name format: %s \n' %240 self.__log('Patch name format: %s' % 240 241 SyncronizableTargetWorkingDir.PATCH_NAME_FORMAT) 241 242 … … 257 258 SyncronizableTargetWorkingDir.REMOVE_FIRST_LOG_LINE = yesno(arg) 258 259 259 self.__log('Remove first log line: %s \n' %260 self.__log('Remove first log line: %s' % 260 261 SyncronizableTargetWorkingDir.REMOVE_FIRST_LOG_LINE) 261 262 … … 273 274 Changeset.REFILL_MESSAGE = yesno(arg) 274 275 275 self.__log('Refill changelogs: %s \n' % Changeset.REFILL_MESSAGE)276 self.__log('Refill changelogs: %s' % Changeset.REFILL_MESSAGE) 276 277 277 278 def do_source_kind(self, arg): … … 285 286 self.source_kind = arg 286 287 287 self.__log('Current source kind: %s \n' % self.source_kind)288 self.__log('Current source kind: %s' % self.source_kind) 288 289 289 290 def do_target_kind(self, arg): … … 297 298 self.target_kind = arg 298 299 299 self.__log('Current target kind: %s \n' % self.target_kind)300 self.__log('Current target kind: %s' % self.target_kind) 300 301 301 302 def do_source_repository(self, arg): … … 313 314 self.source_repository = arg 314 315 315 self.__log('Current source repository: %s \n' % self.source_repository)316 self.__log('Current source repository: %s' % self.source_repository) 316 317 317 318 def do_target_repository(self, arg): … … 329 330 self.target_repository = arg 330 331 331 self.__log('Current target repository: %s \n' % self.target_repository)332 self.__log('Current target repository: %s' % self.target_repository) 332 333 333 334 def do_source_module(self, arg): … … 345 346 self.source_module = arg 346 347 347 self.__log('Current source module: %s \n' % self.source_module)348 self.__log('Current source module: %s' % self.source_module) 348 349 349 350 def do_target_module(self, arg): … … 361 362 self.target_module = arg 362 363 363 self.__log('Current target module: %s \n' % self.target_module)364 self.__log('Current target module: %s' % self.target_module) 364 365 365 366 def loadStateFile(self): … … 375 376 sf.close() 376 377 377 self.__log('Source revision: %s \n' % self.source_revision)378 self.__log('Source revision: %s' % self.source_revision) 378 379 if self.changesets: 379 self.__log('Pending changesets: %d \n' % len(self.changesets))380 self.__log('Pending changesets: %d' % len(self.changesets)) 380 381 except IOError: 381 382 self.source_revision = None … … 415 416 self.state_file = arg 416 417 417 self.__log('Current state file: %s \n' % self.state_file)418 self.__log('Current state file: %s' % self.state_file) 418 419 419 420 self.loadStateFile() … … 432 433 433 434 if not self.state_file: 434 self.__err('Need a state_file to proceed! \n')435 self.__err('Need a state_file to proceed!') 435 436 return 436 437 … … 448 449 449 450 dwd = DualWorkingDir(self.source_kind, self.target_kind) 450 self.__log("Getting %s revision '%s' of '%s' from '%s' \n" % (451 self.__log("Getting %s revision '%s' of '%s' from '%s'" % ( 451 452 self.source_kind, revision, 452 453 self.source_module, self.source_repository)) … … 481 482 """ 482 483 483 self.__log("Changeset %s:\n%s \n" % (changeset.revision,484 self.__log("Changeset %s:\n%s" % (changeset.revision, 484 485 changeset.log)) 485 486 return True … … 490 491 """ 491 492 492 self.stdout.write("\nChangeset %s:\n%s \n" % (changeset.revision,493 self.stdout.write("\nChangeset %s:\n%s" % (changeset.revision, 493 494 changeset.log)) 494 495 … … 538 539 539 540 if not self.state_file: 540 self.__err('Need a state_file to proceed! \n')541 self.__err('Need a state_file to proceed!') 541 542 return 542 543 … … 587 588 applyable = self.shouldApply 588 589 589 self.__log('Applying %d changesets (out of %d) \n' %590 self.__log('Applying %d changesets (out of %d)' % 590 591 (len(changesets), nchanges)) 591 592 … … 613 614 if self.changesets: 614 615 self.__log("There are still %d pending changesets, " 615 "now at revision '%s' \n" %616 "now at revision '%s'" % 616 617 (len(self.changesets), self.source_revision)) 617 618 else: 618 self.__log("Update completed, now at revision '%s' \n" %619 self.__log("Update completed, now at revision '%s'" % 619 620 self.source_revision) 620 621 else:
Note: See TracChangeset
for help on using the changeset viewer.
