[meld] Fix darcs traceback in a repository with no
- From: Vincent Legoll <vincele src gnome org>
- To: svn-commits-list gnome org
- Subject: [meld] Fix darcs traceback in a repository with no
- Date: Fri, 1 May 2009 06:18:06 -0400 (EDT)
commit fec3db7e63513e025680b796207bed7a1650a0e2
Author: Vincent Legoll <vincent legoll gmail com>
Date: Fri May 1 12:16:16 2009 +0200
Fix darcs traceback in a repository with no
changes, for example like an empty repository.
Reproduce with:
- cd /tmp
- mkdir darcsempty
- cd darcsempty
- meld .
Traceback (most recent call last):
File "/home/vince/dev/git/meld/task.py", line 130, in iteration
ret = task()
File "/home/vince/dev/git/meld/vcview.py", line 290, in _search_recursively_iter
self.vc.cache_inventory(rootname)
File "/home/vince/dev/git/meld/vc/_vc.py", line 177, in cache_inventory
self._tree_cache = self._lookup_tree_cache(directory)
File "/home/vince/dev/git/meld/vc/darcs.py", line 83, in _lookup_tree_cache
non_boring = self._get_whatsnew()
File "/home/vince/dev/git/meld/vc/darcs.py", line 110, in _get_whatsnew
status = self.state_map[elements.pop(0)]
KeyError: 'No'
---
vc/darcs.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/vc/darcs.py b/vc/darcs.py
index f480000..9d22cb1 100644
--- a/vc/darcs.py
+++ b/vc/darcs.py
@@ -101,6 +101,8 @@ class Vc(_vc.CachedVc):
if e.errno != errno.EAGAIN:
raise
for line in p:
+ if line.startswith('No changes!'):
+ continue
elements = line.split()
if len(elements) > 1:
if elements[1] == '->':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]