Changeset 189 in tailor


Ignore:
Timestamp:
12/27/04 22:06:16 (8 years ago)
Author:
lele@…
Hash name:
20041227210616-97f81-a214bf0dfa20faba590b8d4ae217adaf6b64018a
Message:

Tailorized projects do not need to be in a subdirectory anymore
Now, by specifying for example --subdir=., a tailorized project
can be extracted from the source and rewrapped into the target
system without adding a "spurious" subdirectory.

Location:
vcpx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vcpx/cvsps.py

    r171 r189  
    292292             
    293293        wdir = join(basedir, subdir) 
    294         if not exists(wdir): 
     294        if not exists(join(wdir, 'CVS')): 
    295295            c = CvsCheckout(working_dir=basedir) 
    296296            c(output=True, 
  • vcpx/darcs.py

    r181 r189  
    187187 
    188188    def _checkoutUpstreamRevision(self, basedir, repository, module, revision, 
    189                                   logger=None): 
     189                                  subdir=None, logger=None): 
    190190        """ 
    191191        Concretely do the checkout of the upstream revision. 
    192192        """ 
    193193 
    194         from os.path import join, exists 
    195          
    196         wdir = join(basedir, module) 
    197  
    198         if not exists(wdir): 
     194        from os.path import join, exists, split 
     195         
     196        if not subdir: 
     197            subdir = split(module)[1] 
     198             
     199        wdir = join(basedir, subdir) 
     200        if not exists(join(wdir, '_darcs')): 
    199201            dget = SystemCommand(working_dir=basedir, 
    200202                                 command="darcs get --partial --verbose" 
    201                                          " %(tag)s '%(repository)s'") 
     203                                         " %(tag)s '%(repository)s' %(subdir)s") 
    202204             
    203205            dget(output=True, repository=repository, 
    204                  tag=revision<>'HEAD' and '--tag=%s' % repr(revision) or '') 
     206                 tag=revision<>'HEAD' and '--tag=%s' % repr(revision) or '', 
     207                 subdir=subdir) 
    205208            if dget.exit_status: 
    206209                raise TargetInitializationFailure( 
  • vcpx/svn.py

    r188 r189  
    282282        wdir = join(basedir, subdir) 
    283283 
    284         if not exists(wdir): 
     284        if not exists(join(wdir, '.svn')): 
     285            if logger: logger.info("checking out a working copy") 
    285286            svnco = SvnCheckout(working_dir=basedir) 
    286287            svnco(output=True, repository=repository, module=module, 
     
    289290                raise TargetInitializationFailure( 
    290291                    "'svn checkout' returned status %s" % svnco.exit_status) 
     292        else: 
     293            if logger: logger.info("%s already exists, assuming it's a svn working dir" % wdir) 
    291294 
    292295        svninfo = SvnInfo(working_dir=wdir) 
Note: See TracChangeset for help on using the changeset viewer.