From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5112 invoked by alias); 30 Oct 2016 17:17:21 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39778 Received: (qmail 8302 invoked from network); 30 Oct 2016 17:17:21 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f196.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.196):SA:0(0.0/5.0):. Processed in 0.498414 secs); 30 Oct 2016 17:17:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: john.reed.riley@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.196 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lWKmGlo0A5yj/x4CK3nNjbdujJ2k1YnfclSnjgA5ZxI=; b=mR1Rn2GXiADnhq9hudXZNvJtJt19j86X9a8rlK9S9ynPu2qBgIDeuBgKkTUc/GEvRZ tRaxhEi2zH9wZfVXrclZSL6Ukxqytx8IvA8ubCdr4nkS3OEJTJNuhOViF1a0K8ciPenc ncwLJ4V99c9Q90uvB8ftGE1YKbENudkfI+RnVH+6oKOBGkrFTriv+JyvqtLr8hijk2kN RdHmygBREb3IWx6ynFyQArYYR6w0wk/Agl7xXI7N5nGamcKWG05z3H8GQ/vnS+sxOf3l aAjnvkb2pCs9ci8bCFVaGtyaSUWRYO+cIod2UMT8K7jjkgxMeq4a6r50Lud1oNGtjMol rZgg== X-Gm-Message-State: ABUngvcC0/R4WROjLEp1Brqhld1bPRF7EVS37WyfCl6xx/NiUakEW8v69m4YiNf4gMaRag== X-Received: by 10.237.45.38 with SMTP id h35mr19440023qtd.83.1477846725413; Sun, 30 Oct 2016 09:58:45 -0700 (PDT) From: Reed Riley To: zsh-workers@zsh.org Cc: Reed Riley Subject: [PATCH] Fix hexdump command used for mercurial dirstate parsing Date: Sun, 30 Oct 2016 12:58:32 -0400 Message-Id: <20161030165832.48410-1-john.reed.riley@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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