Exemplo n.º 1
0
 def _commit_adds(self, cstate, package_filenames, comment):
     cinfo = cstate.info
     tl = self.notifier.listener
     for package in cinfo.added:
         if cstate.state == CommitStateMixin.STATE_TRANSFER:
             # check if package was created in the meantime
             exists = RemotePackage.exists(self.name, package,
                                           apiurl=self.apiurl)
             if not exists:
                 pkg = RemotePackage(self.name, package)
                 pkg.store(apiurl=self.apiurl)
             pkg = self.package(package, transaction_listener=tl)
             filenames = package_filenames.get(package, [])
             pkg.commit(*filenames, comment=comment)
             cstate.state = CommitStateMixin.STATE_COMMITTING
         cstate.processed(package, ' ')
         self.notifier.processed(package, ' ', 'A')
Exemplo n.º 2
0
 def _commit_adds(self, cstate, package_filenames, comment):
     cinfo = cstate.info
     tl = self.notifier.listener
     for package in cinfo.added:
         if cstate.state == CommitStateMixin.STATE_TRANSFER:
             # check if package was created in the meantime
             exists = RemotePackage.exists(self.name, package,
                                           apiurl=self.apiurl)
             if not exists:
                 pkg = RemotePackage(self.name, package)
                 pkg.store(apiurl=self.apiurl)
             pkg = self.package(package, transaction_listener=tl)
             filenames = package_filenames.get(package, [])
             pkg.commit(*filenames, comment=comment)
             cstate.state = CommitStateMixin.STATE_COMMITTING
         cstate.processed(package, ' ')
         self.notifier.processed(package, ' ', 'A')
Exemplo n.º 3
0
 def test_package10(self):
     """test exists method"""
     self.assertFalse(RemotePackage.exists('newprj', 'foo'))
Exemplo n.º 4
0
 def test_package9(self):
     """test exists method"""
     self.assertTrue(RemotePackage.exists('newprj', 'bar'))
Exemplo n.º 5
0
 def test_package10(self):
     """test exists method"""
     self.assertFalse(RemotePackage.exists('newprj', 'foo'))
Exemplo n.º 6
0
 def test_package9(self):
     """test exists method"""
     self.assertTrue(RemotePackage.exists('newprj', 'bar'))