bzr segment: Handle repos with shelves correctly

Return None instead of a string with spaces for a clean repo with
shelves.
This commit is contained in:
Kovid Goyal 2013-03-17 00:42:46 +05:30 committed by Kim Silkebækken
parent f0f1f3f85e
commit c92aaef0e5
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ class Repository(object):
dirtied = 'D' dirtied = 'D'
elif line and line[0] == '?': elif line and line[0] == '?':
untracked = 'U' untracked = 'U'
return dirtied + untracked ans = dirtied + untracked
return ans if ans.strip() else None
def branch(self): def branch(self):
try: try: