From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17217 invoked by alias); 17 Sep 2012 19:58:40 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17280 Received: (qmail 24866 invoked from network); 17 Sep 2012 19:58:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.82.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Z7/aFV5DUhqrNu2h9S1YO0zMQ0mON1+tOeHzGPWo12s=; b=PT6RUyA+HkMg4LuI91ZszDz08AinPnLRJyqsvsg4PqYUStgQArkfK0boIw+7jImKrL tSHvN0esKUnBSZQvxeskwvMQTNn8q7UyT8UJ7ofdJhHGdPjUuK9XjcW+5lhisGA1OQpC heOyHOIzEtF41o/MttaaFdc077A0JeZc9hhRJ67YMdxxNFR+7bvUyq0UKEFWEZJF0Oyi UwE3dqCXyqYEHrbsEmXcFK2TwfuNf+CQRcqYYHswurUlV+QNMniNWzvS0g6CMeMlU0i4 TtoObP/eSQM+1d09ipdhHUhLnNvT7m4rfaS1vun2fyL2F4DgcUQu6I+wUhHo1Ei3gM94 V70Q== MIME-Version: 1.0 Sender: whiteinge@gmail.com In-Reply-To: References: <87boh4bt5l.fsf@ft.bewatermyfriend.org> <877grsbrz7.fsf@ft.bewatermyfriend.org> <87zk4oabam.fsf@ft.bewatermyfriend.org> <87vcfca9sa.fsf@ft.bewatermyfriend.org> Date: Mon, 17 Sep 2012 12:53:29 -0700 X-Google-Sender-Auth: PDzqrxXwlkIBQN18mgTJhvOXxug Message-ID: Subject: Re: vcs_info on a hg repository with a git subrepository; actionformats works ok, formats does not From: Seth House To: Frank Terbeck Cc: Ioannis Koutras , zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 On Mon, Sep 17, 2012 at 9:57 AM, Seth House wrote: > That said, their addition of git commands to the debug output isn't > outputting terribly useful info. I wonder if that is intentional. It is, indeed, intentional: http://selenic.com/hg/diff/58a6f3f4d553/mercurial/subrepo.py > The --debug flag is used to get hg to output the full sha. Relying on --debug here is not ideal. Something like this was bound to happen eventually. Unfortunately, I don't believe there's a way to retrieve all info of interest to VCS_Info with a single call to Mercurial. (Invoking the Python interpreter is too slow to do more than once while drawing the shell prompt.) I have done quite a bit of experimenting, searching, and asking on this. I propose one of the following: 1) Alter the hg backend to work without the full 40-char hash. The ``hg id`` command will always return a unique hash. The only thing the full hash is being used for in the hg backend is comparisons with MQ patches and that can be changed to be a left-match instead. We can document why the full hash isn't available and if users are expecting 40-chars we can give an example of how to pad the value with spaces. This changes existing behavior. 2) Continue using --debug and add a workaround for this issue. It's plausible that the output of interest will always appear at the bottom of the debug output. Mercurial does have a backward-compatibility policy for its output formats but this does not extend to debug output (obviously). FWIW, my personal preference is the first option as I feel the 40-char hash is rarely desired or useful in a shell prompt. Thoughts?