Exemplo n.º 1
0
    def init(self, local, remote):
        self.prepare_for_init_or_clone(local, remote)

        working_copy = WorkingCopy(self, local, remote)
        working_copy.init()

        return working_copy
Exemplo n.º 2
0
    def init(self, local, remote):
        self.prepare_for_init_or_clone(local, remote)

        working_copy = WorkingCopy(self, local, remote)
        working_copy.init()

        return working_copy
Exemplo n.º 3
0
    def clone(self, local, remote):
        """Creates the appropriate directories, ensures the target folder is empty, and initiates a clone operaiton."""

        self.prepare_for_init_or_clone(local, remote)

        # except TypeError: # if local is not a string
        working_copy = WorkingCopy(self, local, remote)
        try:
            working_copy.clone()
            return working_copy
        except InvalidWorkingCopyError as e:
            try:
                working_copy.destroy()
                os.rmdir(local)
            except OSError:
                pass
            raise e
Exemplo n.º 4
0
    def clone(self, local, remote):
        """Creates the appropriate directories, ensures the target folder is empty, and initiates a clone operaiton."""

        self.prepare_for_init_or_clone(local, remote)

        # except TypeError: # if local is not a string
        working_copy = WorkingCopy(self, local, remote)
        try:
            working_copy.clone()
            return working_copy
        except InvalidWorkingCopyError as e:
            try:
                working_copy.destroy()
                os.rmdir(local)
            except OSError:
                pass
            raise e
Exemplo n.º 5
0
 def working_copy(self, local):
     working_copy = WorkingCopy(self, local)
     return working_copy