def publishMedia(self, session):
     self.archiveFile(session)
     comment = str(self.commentBox.toPlainText())
     from utils import subversion_utils
     subversion_utils.commit(self.filename, comment)
     metadata = {
         'filename':self.filename,
         'revision':subversion_utils.getVersionNumber(self.filename)
     }
     mediaItems = self.getAllMediaItems()
     for media in mediaItems:
         name = media.text()
         filepath, ext = os.path.splitext(name)
         if ext == '.mov':
             self.uploadMovie(session, name, metadata)
         elif self.isImgExt(ext):
             self.uploadImage(session, name, metadata)
     else:
         self.updateMetadata(session, metadata)
     self.close()
Exemplo n.º 2
0
 def commitTosvn(self):
     filename = self.itemClicked()
     comment, ok = QtGui.QInputDialog.getText(self, 'Commit Message', 'Comment:')
     subversion_utils.commit(filename, comment)