예제 #1
0
파일: __init__.py 프로젝트: DarioGT/Zim-QDA
    def __init__(self, dir, vcs_specific_app):
        """Initialize the instance in normal or test mode
        - in case of TEST_MODE off, it checks the file system
          for creation, move or delete of files
        - in case of TEST_MODE on, it does not check anything
          in order to avoid to interfer with dev environment

        @param dir: a L{Dir} object representing the repository working directory path
        @param vcs_specific_app: a backend object
        """
        self._root = dir
        self._lock = FS.get_async_lock(self._root)
        self._app  = vcs_specific_app
        if not TEST_MODE:
            # Avoid touching the bazaar repository with zim sources
            # when we write to tests/tmp etc.
            FS.connect('path-created', self.on_path_created)
            FS.connect('path-moved', self.on_path_moved)
            FS.connect('path-deleted', self.on_path_deleted)
예제 #2
0
	def __init__(self, dir):
		self.root = dir
		FS.connect('path-created', self.on_path_created)
		FS.connect('path-moved', self.on_path_moved)