From 5cc265affda6a69fd4f121eab93d498777bb2cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20Silkeb=C3=A6kken?= Date: Wed, 6 Feb 2013 08:56:18 +0100 Subject: [PATCH] Fix repo.status() functions --- powerline/lib/vcs/git.py | 2 +- powerline/lib/vcs/mercurial.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/powerline/lib/vcs/git.py b/powerline/lib/vcs/git.py index ab865a4f..d44a69c9 100644 --- a/powerline/lib/vcs/git.py +++ b/powerline/lib/vcs/git.py @@ -59,7 +59,7 @@ try: wt_column = ' ' index_column = ' ' untracked_column = ' ' - for status in self._repo().status(): + for status in self._repo().status().values(): if status & (git.GIT_STATUS_WT_DELETED | git.GIT_STATUS_WT_MODIFIED): wt_column = 'D' diff --git a/powerline/lib/vcs/mercurial.py b/powerline/lib/vcs/mercurial.py index 63b18dc6..bc2f7add 100644 --- a/powerline/lib/vcs/mercurial.py +++ b/powerline/lib/vcs/mercurial.py @@ -42,7 +42,8 @@ class Repository(object): else: resulting_status = 0 for status, paths in zip(self.repo_statuses, repo.status(unknown=True)): - resulting_status |= status + if paths: + resulting_status |= status return self.repo_statuses_str[resulting_status] def branch(self):