コード例 #1
0
    def __notifyCallback(self, event):
        " Called by pysvn. event is a dictionary "
        if 'path' not in event:
            return
        if not event['path']:
            return

        message = None
        path = event['path']
        if os.path.isdir(path) and not path.endswith(os.path.sep):
            path += os.path.sep
        if event['action'] == pysvn.wc_notify_action.update_completed:
            message = path + " updated to revision " + str(
                event['revision'].number)
        elif event['action'] == pysvn.wc_notify_action.update_started:
            message = "updating " + path + ":"
        else:
            self.__updatedPaths.append(path)
            action = notifyActionToString(event['action'])
            if action is not None and action != "unknown":
                message = "  " + action + " " + path
                if event['mime_type'] == "application/octet-stream":
                    message += " (binary)"

        if message:
            self.__infoLabel.setText(message.strip())
            logging.info(message)
        QApplication.processEvents()
        return
コード例 #2
0
 def notifyCallback(event):
     if event['path']:
         action = notifyActionToString(event['action'])
         if action:
             logging.info("Commit: " + action + " " + event['path'])
             QApplication.processEvents()
     return
コード例 #3
0
ファイル: svnupdate.py プロジェクト: eaglexmw/codimension
    def __notifyCallback( self, event ):
        " Called by pysvn. event is a dictionary "
        if 'path' not in event:
            return
        if not event[ 'path' ]:
            return

        message = None
        path = event[ 'path' ]
        if os.path.isdir( path ) and not path.endswith( os.path.sep ):
            path += os.path.sep
        if event[ 'action' ] == pysvn.wc_notify_action.update_completed:
            message = path + " updated to revision " + str( event[ 'revision' ].number )
        elif event[ 'action' ] == pysvn.wc_notify_action.update_started:
            message = "updating " + path + ":"
        else:
            self.__updatedPaths.append( path )
            action = notifyActionToString( event[ 'action' ] )
            if action is not None and action != "unknown":
                message = "  " + action + " " + path
                if event[ 'mime_type' ] == "application/octet-stream":
                    message += " (binary)"

        if message:
            self.__infoLabel.setText( message.strip() )
            logging.info( message )
        QApplication.processEvents()
        return
コード例 #4
0
ファイル: svncommit.py プロジェクト: eaglexmw/codimension
 def notifyCallback( event ):
     if event[ 'path' ]:
         action = notifyActionToString( event[ 'action' ] )
         if action:
             logging.info( "Commit: " + action + " " + event[ 'path' ] )
             QApplication.processEvents()
     return
コード例 #5
0
 def notifyCallback( event, paths = pathList ):
     if event[ 'path' ]:
         path = event[ 'path' ]
         if os.path.isdir( path ) and not path.endswith( os.path.sep ):
             path += os.path.sep
         action = notifyActionToString( event[ 'action' ] )
         if action:
             logging.info( action + " " + path )
             paths.append( path )
     return
コード例 #6
0
    def __notifyCallback(self, event):
        " Called by pysvn. event is a dictionary "
        message = None
        if event['path']:
            action = notifyActionToString(event['action'])
            if action is not None and action != "unknown":
                message = action + " " + event['path']
                if event['mime_type'] == "application/octet-stream":
                    message += " (binary)"

        if message:
            self.__infoLabel.setText(message)
        QApplication.processEvents()
        return
コード例 #7
0
ファイル: svnannotate.py プロジェクト: eaglexmw/codimension
    def __notifyCallback( self, event ):
        " Called by pysvn. event is a dictionary "
        message = None
        if event[ 'path' ]:
            action = notifyActionToString( event[ 'action' ] )
            if action is not None and action != "unknown":
                message = action + " " + event[ 'path' ]
                if event[ 'mime_type' ] == "application/octet-stream":
                    message += " (binary)"

        if message:
            self.__infoLabel.setText( message )
        QApplication.processEvents()
        return