comparison prompt.py @ 68:38843a80f378

Local cludge fix for bug 39 - incoming/outgoing showing content anyway https://bitbucket.org/sjl/hg-prompt/issues/39/outgoing-incoming-always-show-the-extra
author IBBoard <dev@ibboard.co.uk>
date Tue, 25 Apr 2017 13:13:36 +0100
parents 39b07c5f8785
children 298fa524406a
comparison
equal deleted inserted replaced
67:2cc6556f8903 68:38843a80f378
311 subprocess.Popen(['hg', 'prompt', '--cache-%s' % kind]) 311 subprocess.Popen(['hg', 'prompt', '--cache-%s' % kind])
312 312
313 if cache_exists: 313 if cache_exists:
314 with open(cache) as c: 314 with open(cache) as c:
315 count = len(c.readlines()) 315 count = len(c.readlines())
316 if g[1] and count > 0: 316 if g[1]:
317 return _with_groups(g, str(count)) 317 return _with_groups(g, str(count)) if count else ''
318 elif g[2]: 318 elif g[2]:
319 return _with_groups(g, '0') if not count else '' 319 return _with_groups(g, '0') if not count else ''
320 else: 320 else:
321 return _with_groups(g, '') 321 return _with_groups(g, '')
322 else: 322 else: