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

vcprompt explodes in newly-inited git repository #5

Closed
bjeanes opened this issue Jun 27, 2010 · 2 comments
Closed

vcprompt explodes in newly-inited git repository #5

bjeanes opened this issue Jun 27, 2010 · 2 comments

Comments

@bjeanes
Copy link

bjeanes commented Jun 27, 2010

To see this problem simply do the following:

  1. mkdir vctest
  2. cd vctest
  3. git init
  4. If vcprompt is in your prompt you will already see the problem, else just run vcprompt

Here's the error:

~/S/P/test ♪ vcprompt
Traceback (most recent call last):
  File "/Users/bjeanes/.config/misc/vcprompt.py", line 676, in <module>
    print main()
  File "/Users/bjeanes/.config/misc/vcprompt.py", line 298, in main
    systems=options.systems, unknown=options.unknown)
  File "/Users/bjeanes/.config/misc/vcprompt.py", line 234, in vcprompt
    prompt = vcs(path, format, unknown)
  File "/Users/bjeanes/.config/misc/vcprompt.py", line 524, in git
    with open(hash_file, 'r') as f:
IOError: [Errno 2] No such file or directory: '/Users/bjeanes/Sites/Personal/test/.git/refs/heads/master'
@djl
Copy link
Owner

djl commented Jun 27, 2010

Oh, nice catch!

Fixed in 4e9d61e. The problem was limited to only %h and %r format args.

@bjeanes
Copy link
Author

bjeanes commented Jun 27, 2010

Yup, that did the trick!

mnsanghvi pushed a commit to mnsanghvi/vcprompt that referenced this issue Feb 14, 2018
Allow python format strings in format
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants