Skip to content

crashes without mercurial installed #7

Description

@matkoniecz

On encoutering folder with .hg subfolder this script attempts to call mercurial. If mercurial is not installed (may be typical today as git seems to won version control wars) this script crashes.

I would expect error message or even better - complaint ans skipping over such repository.

To reproduce - uninstall mercurial (if any is available), create folder, create subfolder named .hg, call this script to check location where test folder were created.

I gues that it is caused by folder with unsufficient rights. I would expect it to handle it gracefully and skip folder

Traceback (most recent call last):
  File "/usr/local/bin/uncommitted", line 9, in <module>
    load_entry_point('uncommitted==1.2', 'console_scripts', 'uncommitted')()
  File "build/bdist.linux-x86_64/egg/uncommitted/command.py", line 134, in main
  File "build/bdist.linux-x86_64/egg/uncommitted/command.py", line 92, in scan
  File "build/bdist.linux-x86_64/egg/uncommitted/command.py", line 51, in status_mercurial
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions