New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inotify is not updated when switching repo from bookmarks widget #256

Closed
char101 opened this Issue May 9, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@char101

char101 commented May 9, 2014

Hi,

As the title said.

I found that restarting inotify on cmds.OpenRepo do the tricks

class OpenRepo(Command):
    def __init__(self, repo_path):
        Command.__init__(self)
        self.repo_path = repo_path

    def do(self):
        git = self.model.git
        old_worktree = git.worktree()
        if not self.model.set_worktree(self.repo_path):
            self.model.set_worktree(old_worktree)
            return
        new_worktree = git.worktree()
        core.chdir(new_worktree)
        self.model.set_directory(self.repo_path)
        _config.reset()
        self.model.update_status()

        from cola import inotify
        inotify.stop()
        inotify.start()

@davvid davvid closed this in 2cd3f8f May 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment