Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Fix hexdump command used for mercurial dirstate parsing
- X-seq: zsh-workers 39778
- From: Reed Riley <john.reed.riley@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Fix hexdump command used for mercurial dirstate parsing
- Date: Sun, 30 Oct 2016 12:58:32 -0400
- Cc: Reed Riley <john.reed.riley@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lWKmGlo0A5yj/x4CK3nNjbdujJ2k1YnfclSnjgA5ZxI=; b=JFp7Xrk/8C/0Q2AsH+qU4HpDFB+JzxinDlrTt90ICGfvLYqal0pgTwaPzlJPSmB/V8 aiPOKGrY0Fc5TqkqdQbbrp4Fec49aXMj6iuR5ycDsxAyC52yJvM3SWBQbFohDy02Q5ln RQr5/KZ4ttT+wRlZk7Vp9e0C0nXK5L7Z/6gAY8r3aRkWJ+mmg9ll32wJJilI8jERVSo1 p/kgjAlMaoQxC7wV3JqXTL8mhKJui/9tCXDxT8itntXi4ONyAeWBL4ageYeLp1U1kGX4 IIVn6SToJdXWkvBuCzl8XebxYB1s3XcA0KUVrasW1K52z8vUTpNX7RcYSrNQk2zEKO60 Xg6g==
- In-reply-to: <CALWG+TrQbU4VANDk4Mv_OminjSgoqvags7Wtd4hf6VV=-e4Hww@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CALWG+TrQbU4VANDk4Mv_OminjSgoqvags7Wtd4hf6VV=-e4Hww@mail.gmail.com>
Normally, the old command works. But very rarely, it outputs a string
like the following instead:
❯ hexdump -n20 -e '1/1 "%02x"' .hg/dirstate
77bba665e970146bd2be0b2da40092e340*
8804
Changing the command resolves the problem:
❯ hexdump -n20 -v -e '1/1 "%02x"' .hg/dirstate
77bba665e970146bd2be0b2da40092e340408804
---
Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index f35ad59..cd714ab 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -42,7 +42,7 @@ if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" use-simple \
&& ( VCS_INFO_check_com hexdump ) && [[ -r ${dirstatefile} ]] ; then
# Calling hexdump is (much) faster than hg but doesn't get the local rev
- r_csetid=$(hexdump -n 20 -e '1/1 "%02x"' ${dirstatefile})
+ r_csetid=$(hexdump -n 20 -v -e '1/1 "%02x"' ${dirstatefile})
else
# Settling for a short (but unique!) hash because getting the full
# 40-char hash in addition to all the other info we want isn't
--
2.10.2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author