Changeset 426 in tailor


Ignore:
Timestamp:
07/25/05 23:40:28 (8 years ago)
Author:
lele@…
Hash name:
20050725214028-97f81-36aa171e639fa273afa4c08dc92c6b7f416b62dc
Message:

Use the last applied patch timestamp for the bootstrap date

Location:
vcpx
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • vcpx/cvsps.py

    r420 r426  
    260260        the name of the tag to get, or as a date if it starts with a number. 
    261261 
    262         Return the effective cvsps revision. 
     262        Return the last applied changeset. 
    263263        """ 
    264264 
     
    336336                                   last.revision) 
    337337             
    338         return last.revision 
     338        return last 
    339339     
    340340    def _willApplyChangeset(self, root, changeset, applyable=None): 
  • vcpx/source.py

    r380 r426  
    167167        :revision: extract that revision/branch 
    168168 
    169         Return the checked out revision. 
     169        Return the last applied changeset. 
    170170        """ 
    171171 
  • vcpx/target.py

    r393 r426  
    316316        raise "%s should override this method" % self.__class__ 
    317317 
    318     def initializeNewWorkingDir(self, root, repository, module, subdir, revision): 
     318    def initializeNewWorkingDir(self, root, repository, module, subdir, 
     319                                changeset): 
    319320        """ 
    320321        Initialize a new working directory, just extracted from 
     
    322323        """ 
    323324 
    324         from datetime import datetime 
    325  
    326         now = datetime.now() 
    327325        self._initializeWorkingDir(root, repository, module, subdir) 
    328326        patchname = BOOTSTRAP_PATCHNAME % module 
     327        revision = changeset.revision 
    329328        changelog = BOOTSTRAP_CHANGELOG % locals() 
    330         self._commit(root, now, '%s@%s' % (AUTHOR, HOST), patchname, changelog, 
    331                      entries=[subdir]) 
     329        self._commit(root, changeset.date, '%s@%s' % (AUTHOR, HOST), patchname, 
     330                     changelog, entries=[subdir]) 
    332331 
    333332    def _initializeWorkingDir(self, root, repository, module, subdir): 
  • vcpx/darcs.py

    r425 r426  
    223223                                  subdir=None, logger=None, **kwargs): 
    224224        """ 
    225         Concretely do the checkout of the upstream revision. 
     225        Concretely do the checkout of the upstream revision and return 
     226        the last applied changeset. 
    226227        """ 
    227228 
     
    283284        last = changesets_from_darcschanges(output) 
    284285         
    285         return last[0].revision 
     286        return last[0] 
    286287 
    287288     
  • vcpx/svn.py

    r424 r426  
    260260        info = self.__getSvnInfo(wdir) 
    261261         
    262         actual = info['Revision'] 
     262        cmd = [SVN_CMD, "log", "--verbose", "--xml", "--revision", revision] 
     263        svnlog = ExternalCommand(cwd=wdir, command=cmd) 
     264        output = svnlog.execute(stdout=PIPE) 
     265         
     266        if svnlog.exit_status: 
     267            raise ChangesetApplicationFailure( 
     268                "%s returned status %d saying \"%s\"" % 
     269                (str(changes), changes.exit_status, output.read())) 
     270         
     271        csets = changesets_from_svnlog(output, info['URL'], repository, module) 
     272         
     273        last = csets[0] 
    263274         
    264275        if logger: logger.info("working copy up to svn revision %s", 
    265                                actual) 
    266          
    267         return actual  
     276                               last.revision) 
     277 
     278        return last 
    268279     
    269280    ## SyncronizableTargetWorkingDir 
  • vcpx/tailor.py

    r418 r426  
    345345        self.module = module 
    346346        self.subdir = subdir 
    347         self.upstream_revision = actual 
     347        self.upstream_revision = actual.revision 
    348348 
    349349        self.__saveStatus() 
  • vcpx/cdv.py

    r393 r426  
    6363        ExternalCommand(cwd=root, command=cmd).execute(oldname, newname) 
    6464 
    65     def initializeNewWorkingDir(self, root, repository, module, subdir, revision): 
     65    def initializeNewWorkingDir(self, root, repository, module, subdir, 
     66                                changeset): 
    6667        """ 
    6768        Initialize a new working directory, just extracted from 
     
    6970        """ 
    7071 
    71         from datetime import datetime 
    7272        from target import AUTHOR, HOST, BOOTSTRAP_PATCHNAME, \ 
    7373             BOOTSTRAP_CHANGELOG 
    7474         
    75         now = datetime.now() 
    7675        self._initializeWorkingDir(root, repository, module, subdir) 
    77         self._commit(root, now, '%s@%s' % (AUTHOR, HOST), 
     76        self._commit(root, changeset.date, '%s@%s' % (AUTHOR, HOST), 
    7877                     BOOTSTRAP_PATCHNAME % module, 
    7978                     BOOTSTRAP_CHANGELOG % locals(), 
  • vcpx/bzr.py

    r393 r426  
    6161        ExternalCommand(cwd=root, command=cmd).execute(old, new) 
    6262 
    63     def initializeNewWorkingDir(self, root, repository, module, subdir, revision): 
     63    def initializeNewWorkingDir(self, root, repository, module, subdir, 
     64                                changeset): 
    6465        """ 
    6566        Initialize a new working directory, just extracted from 
     
    6768        """ 
    6869 
    69         from datetime import datetime 
    7070        from target import AUTHOR, HOST, BOOTSTRAP_PATCHNAME, \ 
    7171             BOOTSTRAP_CHANGELOG 
    7272         
    73         now = datetime.now() 
    7473        self._initializeWorkingDir(root, repository, module, subdir) 
    75         self._commit(root, now, AUTHOR, 
     74        self._commit(root, changeset.date, AUTHOR, 
    7675                     BOOTSTRAP_PATCHNAME % module, 
    7776                     BOOTSTRAP_CHANGELOG % locals(), 
  • vcpx/session.py

    r418 r426  
    499499 
    500500        try: 
    501             self.source_revision = dwd.checkoutUpstreamRevision( 
     501            actual = dwd.checkoutUpstreamRevision( 
    502502                self.current_directory, self.source_repository, 
    503503                self.source_module, revision, 
     
    506506            self.__err('Checkout failed', True) 
    507507            return 
     508 
     509        self.source_revision = actual.revision 
    508510         
    509511        self.writeStateFile() 
     
    514516                                        self.source_module, 
    515517                                        self.sub_directory, 
    516                                         self.source_revision) 
     518                                        actual) 
    517519        except: 
    518520            self.__err('Working copy initialization failed', True) 
Note: See TracChangeset for help on using the changeset viewer.