Changeset 452 in tailor for vcpx/tailor.py


Ignore:
Timestamp:
07/30/05 02:55:40 (8 years ago)
Author:
lele@…
Hash name:
20050730005540-97f81-edbbc8a775d04189061a4ecb509351c9d2f915ae
Message:

Added the infrastructure to allow easier bootstraps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/tailor.py

    r446 r452  
    114114                                       self.options.source_module, 
    115115                                       self.options.revision, 
     116                                       self.options.target_repository, 
     117                                       self.options.target_module, 
    116118                                       self.options.subdir) 
    117119                elif self.options.migrate: 
     
    289291 
    290292    def bootstrap(self, source_kind, target_kind, 
    291                   source_repository, source_module, revision, subdir): 
     293                  source_repository, source_module, revision, 
     294                  target_repository, target_module, subdir): 
    292295        """ 
    293296        Bootstrap a new tailorized module. 
     297 
     298        First of all prepare the target system working directory such that 
     299        it can host the upstream source tree. This is backend specific. 
    294300 
    295301        Extract a copy of the ``repository`` at given ``revision`` in the 
     
    320326        self.logger.info("getting %s revision '%s' of '%s' from '%s'" % ( 
    321327            source_kind, revision, source_module, source_repository)) 
     328 
     329        try: 
     330            dwd.prepareWorkingDirectory(self.root, 
     331                                        target_repository, target_module) 
     332        except: 
     333            self.logger.exception('Cannot prepare working directory!') 
     334            raise 
    322335 
    323336        try: 
     
    543556                     "backends.", 
    544557                default="HEAD"), 
     558    make_option("-T", "--target-repository", 
     559                dest="target_repository", metavar="REPOS", default=None, 
     560                help="Specify the target repository, the one that will " 
     561                     "receive the patches coming from the source one."), 
     562    make_option("-M", "--target-module", dest="target_module", 
     563                metavar="MODULE", 
     564                help="Specify the module on the target repository that will " 
     565                     "actually contain the upstream source tree."), 
    545566    make_option("--subdir", metavar="DIR", 
    546567                help="Force the subdirectory where the checkout will happen, " 
     
    663684                                   options.source_module, 
    664685                                   options.revision, 
     686                                   options.target_repository, 
     687                                   options.target_module, 
    665688                                   options.subdir) 
    666689            elif options.update: 
Note: See TracChangeset for help on using the changeset viewer.