Changeset 274 in tailor


Ignore:
Timestamp:
05/03/05 23:09:22 (8 years ago)
Author:
lele@…
Hash name:
20050503210922-97f81-3418e6994738ef9497e078cfe8394266b8d944dc
Message:

Allow also a timestamp as initial CVS revision to bootstrap from

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vcpx/cvsps.py

    r268 r274  
    6464 
    6565class CvsCheckout(SystemCommand): 
    66     COMMAND = "cvs -q -d%(repository)s checkout -r%(revision)s -d%(workingdir)s %(module)s" 
     66    COMMAND = "cvs -q -d%(repository)s checkout %(revision)s -d%(workingdir)s %(module)s" 
     67 
     68    def __call__(self, output=None, dry_run=False, **kwargs): 
     69        revision = kwargs['revision'] 
     70        if revision is None: 
     71            revision = '' 
     72        else: 
     73            # If the revision contains a space, assume it really 
     74            # specify a branch and a timestamp. If it starts with 
     75            # a digit, assume it's a timestamp. Otherwise, it must 
     76            # be a branch name 
     77            if revision[0] in '0123456789': 
     78                revision = "-D'%s'" % revision 
     79            elif ' ' in revision: 
     80                branch, timestamp =revision.split(' ', 1) 
     81                revision = "-r%s -D'%s'" % (branch, timestamp) 
     82            else: 
     83                revision = '-r%s' % revision 
     84        kwargs['revision'] = revision 
     85         
     86        return SystemCommand.__call__(self, output=output, 
     87                                      dry_run=False, **kwargs) 
    6788 
    6889 
     
    291312        """ 
    292313        Concretely do the checkout of the upstream sources. Use `revision` as 
    293         the name of the tag to get. 
     314        the name of the tag to get, or as a date if it starts with a number. 
    294315 
    295316        Return the effective cvsps revision. 
  • vcpx/tailor.py

    r255 r274  
    503503                help="Specify the revision bootstrap should checkout.  REV " 
    504504                     "must be a valid 'name' for a revision in the upstream " 
    505                      "version control kind.  For CVS it may be a tag/branch. " 
     505                     "version control kind. For CVS it may be either a branch " 
     506                     "name, a timestamp or both separated by a space. " 
    506507                     "'HEAD', the default, means the latest version in all " 
    507508                     "backends.", 
  • README

    r261 r274  
    8585             revision, otherwise svn will exit with an error. 
    8686 
     876. Bootstrap from a CVS branch, starting from a given point in time:: 
     88 
     89  $ tailor.py -b -s cvs -R :pserver:anonymous@server.org:/cvsroot/ \ 
     90              --revision 'unstable-branch 2001-12-25 23:26:48 UTC' \ 
     91              --module something new-darcs-repository 
     92 
    8793 
    8894Resolving conflicts 
Note: See TracChangeset for help on using the changeset viewer.