* Re: vcs_info on a hg repository with a git subrepository; actionformats works ok, formats does not [not found] ` <CABsXarGXg_m1i4tjPbUS5Fz+_BOGqbKKoG5-wKF01rOKgsKvhA@mail.gmail.com> @ 2012-09-17 21:28 ` Frank Terbeck 2012-09-19 7:34 ` Frank Terbeck 0 siblings, 1 reply; 3+ messages in thread From: Frank Terbeck @ 2012-09-17 21:28 UTC (permalink / raw) To: Seth House; +Cc: Ioannis Koutras, zsh-workers [moving thread to -workers] Seth House wrote: > On Mon, Sep 17, 2012 at 9:57 AM, Seth House <seth@eseth.com> wrote: [...] >> 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.) Indeed. :-/ > 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? Hm. Ideally, I'd like there to be the least possible impact on existing setups. But then and again having `--debug' in there was always bothering me a little. I'm undecided. I know, however, that I don't want to introduce another style again to make this optional. I'll think about it until tomorrow. If a user of the hg backend has a strong opinion on this, speak up. Regards, Frank -- In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: vcs_info on a hg repository with a git subrepository; actionformats works ok, formats does not 2012-09-17 21:28 ` vcs_info on a hg repository with a git subrepository; actionformats works ok, formats does not Frank Terbeck @ 2012-09-19 7:34 ` Frank Terbeck 2012-09-19 15:14 ` Seth House 0 siblings, 1 reply; 3+ messages in thread From: Frank Terbeck @ 2012-09-19 7:34 UTC (permalink / raw) To: Seth House; +Cc: Ioannis Koutras, zsh-workers Frank Terbeck wrote: [...] >> 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. [...] >> FWIW, my personal preference is the first option as I feel the 40-char >> hash is rarely desired or useful in a shell prompt. After some thought, I agree. Relying on debugging features to remain stable is not a good idea. Seth: Are you willing to send a patch? Regards, Frank ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: vcs_info on a hg repository with a git subrepository; actionformats works ok, formats does not 2012-09-19 7:34 ` Frank Terbeck @ 2012-09-19 15:14 ` Seth House 0 siblings, 0 replies; 3+ messages in thread From: Seth House @ 2012-09-19 15:14 UTC (permalink / raw) To: Frank Terbeck; +Cc: Ioannis Koutras, zsh-workers On Wed, Sep 19, 2012 at 12:34 AM, Frank Terbeck <ft@bewatermyfriend.org> wrote: > After some thought, I agree. Relying on debugging features to remain > stable is not a good idea. Seth: Are you willing to send a patch? Can do. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-19 15:15 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CAPeCK2MsfJJxq0v1_eKA1uo9aJ1Mn-8+B-_YAPit-V_A4MFY6A@mail.gmail.com> [not found] ` <87boh4bt5l.fsf@ft.bewatermyfriend.org> [not found] ` <CAPeCK2MRukgGxx=nGhRs8oPMz=zPfj+XDcmf4Vaz+YJ+JZUEXw@mail.gmail.com> [not found] ` <877grsbrz7.fsf@ft.bewatermyfriend.org> [not found] ` <CAPeCK2PwM=GNAhxqmn-bMiDfKhpXJpOGgCqs05KJvMg1RsqkNg@mail.gmail.com> [not found] ` <87zk4oabam.fsf@ft.bewatermyfriend.org> [not found] ` <CABsXarH6MMNEsnUG=8O-VirH6biFKR9gMKQ7RcNgtKmQVw_Ltg@mail.gmail.com> [not found] ` <87vcfca9sa.fsf@ft.bewatermyfriend.org> [not found] ` <CABsXarF5CM=CjhrrCsPBdY0es2SpY=dQC2116grsq4rYDPsE=g@mail.gmail.com> [not found] ` <CABsXarGXg_m1i4tjPbUS5Fz+_BOGqbKKoG5-wKF01rOKgsKvhA@mail.gmail.com> 2012-09-17 21:28 ` vcs_info on a hg repository with a git subrepository; actionformats works ok, formats does not Frank Terbeck 2012-09-19 7:34 ` Frank Terbeck 2012-09-19 15:14 ` Seth House
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).