Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Commit

Permalink
Fixed '%m' token always being displayed in Python 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
djl committed Dec 28, 2012
1 parent f1cf541 commit a3c2da6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -2,6 +2,7 @@
------------------

* Fixed: '%m' token in Bazaar when working dir has modified and untracked files
* Fixed: '%u' token always being shown in Python 3.
* Changed: Better handling of '%a' and '%m' token in Subversion


Expand Down
20 changes: 10 additions & 10 deletions bin/vcprompt
Expand Up @@ -269,16 +269,16 @@ def bzr(options):
output, returncode = popen('bzr status --short')

if returncode == 0:
if output == '':
modified = ''
untracked = ''
else:
if output:
for line in output.splitlines():
line = line.strip()
if line.startswith('M'):
modified = options.modified
elif line.startswith('?'):
untracked = options.untracked
else:
modified = ''
untracked = ''

# formatting
return {
Expand Down Expand Up @@ -509,10 +509,10 @@ def git(options):
output, returncode = popen('git ls-files --other --exclude-standard')

if returncode == 0:
if output == '':
untracked = ''
else:
if output:
untracked = options.untracked
else:
untracked = ''

# staged files
if '%a' in options.format:
Expand Down Expand Up @@ -567,10 +567,10 @@ def hg(options):
output, returncode = popen('hg status --modified')

if returncode == 0:
if output == '':
modified = ''
else:
if output:
modified = options.modified
else:
modified = ''

# untracked
if '%u' in options.format:
Expand Down

0 comments on commit a3c2da6

Please sign in to comment.