Changeset 431 in tailor
- Timestamp:
- 07/26/05 02:16:25 (8 years ago)
- Hash name:
- 20050726001625-97f81-b51941608932253b428c9298c142c1b69f363a63
- Location:
- vcpx
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
vcpx/target.py
r426 r431 317 317 318 318 def initializeNewWorkingDir(self, root, repository, module, subdir, 319 changeset ):319 changeset, initial): 320 320 """ 321 321 Initialize a new working directory, just extracted from … … 324 324 325 325 self._initializeWorkingDir(root, repository, module, subdir) 326 patchname = BOOTSTRAP_PATCHNAME % module327 326 revision = changeset.revision 328 changelog = BOOTSTRAP_CHANGELOG % locals() 329 self._commit(root, changeset.date, '%s@%s' % (AUTHOR, HOST), patchname, 330 changelog, entries=[subdir]) 327 if initial: 328 author = changeset.author 329 remark = changeset.log 330 log = None 331 else: 332 author = "%s@%s" % (AUTHOR, HOST) 333 remark = BOOTSTRAP_PATCHNAME % module 334 log = BOOTSTRAP_CHANGELOG % locals() 335 self._commit(root, changeset.date, author, remark, log, 336 entries=[subdir]) 331 337 332 338 def _initializeWorkingDir(self, root, repository, module, subdir): -
vcpx/darcs.py
r428 r431 197 197 """ 198 198 199 from re import escape 200 199 201 if changeset.revision.startswith('tagged '): 200 202 selector = '--tags' … … 202 204 else: 203 205 selector = '--patches' 204 revtag = changeset.revision206 revtag = escape(changeset.revision) 205 207 206 208 cmd = [DARCS_CMD, "pull", "--all", selector, revtag] … … 229 231 from os.path import join, exists 230 232 from os import mkdir 231 233 from re import escape 234 235 if revision == 'INITIAL': 236 initial = True 237 cmd = [DARCS_CMD, "changes", "--xml-output", "--repo", repository] 238 changes = ExternalCommand(command=cmd) 239 output = changes.execute(stdout=PIPE, stderr=STDOUT) 240 241 if changes.exit_status: 242 raise ChangesetApplicationFailure( 243 "%s returned status %d saying \"%s\"" % 244 (str(changes), changes.exit_status, output.read())) 245 246 csets = changesets_from_darcschanges(output) 247 revision = escape(csets[0].revision) 248 else: 249 initial = False 250 251 wdir = join(basedir, subdir) 232 252 if subdir == '.': 233 253 # This is currently *very* slow, compared to the darcs get 234 254 # below! 235 wdir = basedir236 255 if not exists(join(wdir, '_darcs')): 237 256 if not exists(wdir): … … 249 268 cmd = [DARCS_CMD, "pull", "--all", "--verbose"] 250 269 if revision and revision<>'HEAD': 251 cmd.extend([ "--tag", revision])270 cmd.extend([initial and "--patches" or "--tags", revision]) 252 271 dpull = ExternalCommand(cwd=wdir, command=cmd) 253 272 output = dpull.execute(repository, stdout=PIPE, stderr=STDOUT) … … 259 278 else: 260 279 # Use much faster 'darcs get' 261 262 wdir = join(basedir, subdir)263 280 cmd = [DARCS_CMD, "get", "--partial", "--verbose"] 264 281 if revision and revision<>'HEAD': 265 cmd.extend([ "--tag", revision])282 cmd.extend([initial and "--to-patch" or "--tag", revision]) 266 283 dget = ExternalCommand(cwd=basedir, command=cmd) 267 284 output = dget.execute(repository, subdir, -
vcpx/tailor.py
r429 r431 336 336 337 337 try: 338 dwd.initializeNewWorkingDir(self.root, repository, module, subdir, actual) 338 dwd.initializeNewWorkingDir(self.root, repository, module, subdir, 339 actual, revision=='INITIAL') 339 340 except: 340 341 self.logger.exception('Working copy initialization failed!') … … 525 526 "name, a timestamp or both separated by a space, and " 526 527 "timestamp may be 'INITIAL' to denote the beginning of " 527 "time for the given branch. " 528 "time for the given branch. Under Darcs, INITIAL is a " 529 "shortcut for the name of the first patch in the upstream " 530 "repository, otherwise it is interpreted as the name of " 531 "a tag. " 528 532 "'HEAD', the default, means the latest version in all " 529 533 "backends.", -
vcpx/cdv.py
r430 r431 64 64 65 65 def initializeNewWorkingDir(self, root, repository, module, subdir, 66 changeset ):66 changeset, initial): 67 67 """ 68 68 Initialize a new working directory, just extracted from … … 75 75 self._initializeWorkingDir(root, repository, module, subdir) 76 76 revision = changeset.revision 77 self._commit(root, changeset.date, '%s@%s' % (AUTHOR, HOST), 78 BOOTSTRAP_PATCHNAME % module, 79 BOOTSTRAP_CHANGELOG % locals(), 77 if initial: 78 author = changeset.author 79 remark = changeset.log 80 log = None 81 else: 82 author = "%s@%s" % (AUTHOR, HOST) 83 remark = BOOTSTRAP_PATCHNAME % module 84 log = BOOTSTRAP_CHANGELOG % locals() 85 self._commit(root, changeset.date, author, remark, log, 80 86 entries=[subdir, '%s/...' % subdir]) 81 87 -
vcpx/bzr.py
r430 r431 62 62 63 63 def initializeNewWorkingDir(self, root, repository, module, subdir, 64 changeset ):64 changeset, initial): 65 65 """ 66 66 Initialize a new working directory, just extracted from … … 70 70 from target import AUTHOR, HOST, BOOTSTRAP_PATCHNAME, \ 71 71 BOOTSTRAP_CHANGELOG 72 72 73 73 self._initializeWorkingDir(root, repository, module, subdir) 74 74 revision = changeset.revision 75 self._commit(root, changeset.date, AUTHOR, 76 BOOTSTRAP_PATCHNAME % module, 77 BOOTSTRAP_CHANGELOG % locals(), 75 if initial: 76 author = changeset.author 77 remark = changeset.log 78 log = None 79 else: 80 author = "%s@%s" % (AUTHOR, HOST) 81 remark = BOOTSTRAP_PATCHNAME % module 82 log = BOOTSTRAP_CHANGELOG % locals() 83 self._commit(root, changeset.date, author, remark, log, 78 84 entries=[subdir, '%s/...' % subdir]) 79 85 -
vcpx/session.py
r426 r431 516 516 self.source_module, 517 517 self.sub_directory, 518 actual )518 actual, revision=='INITIAL') 519 519 except: 520 520 self.__err('Working copy initialization failed', True)
Note: See TracChangeset
for help on using the changeset viewer.
