From a01ff4c82f0171e78af7b033affd719988f11577 Mon Sep 17 00:00:00 2001 From: laerus Date: Wed, 16 Nov 2016 14:18:19 +0200 Subject: [PATCH] strip hg root value, news --- news/vc.rst | 13 +++++++++++++ xonsh/prompt/vc_branch.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 news/vc.rst diff --git a/news/vc.rst b/news/vc.rst new file mode 100644 index 000000000..b9cceaba3 --- /dev/null +++ b/news/vc.rst @@ -0,0 +1,13 @@ +**Added:** None + +**Changed:** None + +**Deprecated:** None + +**Removed:** None + +**Fixed:** + +* git/hg won't run unless we locate the binary + +**Security:** None diff --git a/xonsh/prompt/vc_branch.py b/xonsh/prompt/vc_branch.py index 3a4bf13e8..664e61aae 100644 --- a/xonsh/prompt/vc_branch.py +++ b/xonsh/prompt/vc_branch.py @@ -69,7 +69,7 @@ def get_hg_branch(root=None): # not in repo return None else: - root = xt.decode_bytes(root) + root = xt.decode_bytes(root).strip() if env.get('VC_HG_SHOW_BRANCH'): # get branch name branch_path = os.path.sep.join([root, '.hg', 'branch'])