Changeset 1056 in tailor


Ignore:
Timestamp:
01/24/06 18:15:36 (7 years ago)
Author:
lele@…
Hash name:
20060124171536-7a6fb-e5ebf1620bbe10ef3b16c3b7198bee0806dd7191
Message:

Allow 'look-for-adds' for darcs repositories
I'm little bit worried that this may hide real bugs, but here it is.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • README

    r1052 r1056  
    623623%%%%% 
    624624 
    625 .. 
     625look-for-adds : bool 
     626  By default tailor commits only the entries explicitly mentioned by 
     627  the upstream changeset. Sometimes this is not desiderable, maybe 
     628  even as a quick workaround to a tailor bug. This option allows a 
     629  more relaxed view of life using ``record --look-for-adds``. 
    626630 
    627631git 
  • vcpx/tests/config.py

    r944 r1056  
    8383        logger = getLogger() 
    8484        self.assertEqual(logger.handlers[0].formatter._fmt, 'DUMMY') 
     85 
     86    def testLookForAdds(self): 
     87        """Verify the darcs Repository knows about --look-for-adds""" 
     88 
     89        config = Config(self.getTestConfiguration("config-basic_test"), 
     90                        {'tailor_repo': self.tailor_repo}) 
     91 
     92        project4 = Project('project4', config) 
     93        self.assertEqual(project4.target.command('record', '-a'), 
     94                         ['darcs', 'record', '-a', '--look-for-adds']) 
     95         
  • vcpx/repository.py

    r1045 r1056  
    265265    def _load(self, project): 
    266266        Repository._load(self, project) 
    267         self.EXECUTABLE = project.config.get(self.name, 'darcs-command', 'darcs') 
     267        cget = project.config.get 
     268        self.EXECUTABLE = cget(self.name, 'darcs-command', 'darcs') 
     269        self.use_look_for_adds = cget(self.name, 'look-for-adds', 'False') 
     270 
     271    def command(self, *args, **kwargs): 
     272        if args[0] == 'record' and self.use_look_for_adds: 
     273            args = args + ('--look-for-adds',) 
     274        return Repository.command(self, *args, **kwargs) 
    268275 
    269276 
  • vcpx/tests/data/config-basic_test.py

    r937 r1056  
    5555[darcs:project4repo] 
    5656subdir = darcs 
     57look-for-adds = True 
    5758''' 
    5859 
Note: See TracChangeset for help on using the changeset viewer.