Merge pull request #1658 from oliverralbertini/stop-hexdump-squeezing

hg SCM_CHANGE: prevent hexdump squeezing
pull/1641/head
Nils Winkler 2020-09-21 08:34:04 +02:00 committed by GitHub
commit 7dd5b3a67f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -344,7 +344,7 @@ function hg_prompt_vars {
if [ -f "$HG_ROOT/dirstate" ]; then if [ -f "$HG_ROOT/dirstate" ]; then
# Mercurial holds various information about the working directory in .hg/dirstate file. More on http://mercurial.selenic.com/wiki/DirState # Mercurial holds various information about the working directory in .hg/dirstate file. More on http://mercurial.selenic.com/wiki/DirState
SCM_CHANGE=$(hexdump -n 10 -e '1/1 "%02x"' "$HG_ROOT/dirstate" | cut -c-12) SCM_CHANGE=$(hexdump -vn 10 -e '1/1 "%02x"' "$HG_ROOT/dirstate" | cut -c-12)
else else
SCM_CHANGE=$(hg summary 2> /dev/null | grep parent: | awk '{print $2}') SCM_CHANGE=$(hg summary 2> /dev/null | grep parent: | awk '{print $2}')
fi fi