Submitter | Gregory Szorc |
---|---|
Date | Jan. 6, 2015, 2:23 a.m. |
Message ID | <846a7a9b24f31f8ef2ce.1420510998@3.1.168.192.in-addr.arpa> |
Download | mbox | patch |
Permalink | /patch/7322/ |
State | Changes Requested |
Headers | show |
Comments
On Mon, 2015-01-05 at 18:23 -0800, Gregory Szorc wrote: > # HG changeset patch > # User Gregory Szorc <gregory.szorc@gmail.com> > # Date 1420510895 28800 > # Mon Jan 05 18:21:35 2015 -0800 > # Node ID 846a7a9b24f31f8ef2ceb4b77d995a340e596260 > # Parent 0df221dbc14bcac4aed51917672b3a261e5922bd > webcommands.changeset: add manifest to template call > > This is needed for parity with CLI JSON output. Huh? Are you aiming for parity with log --debug? Who needs the manifest hash?
On 1/6/15 3:33 PM, Matt Mackall wrote: > On Mon, 2015-01-05 at 18:23 -0800, Gregory Szorc wrote: >> # HG changeset patch >> # User Gregory Szorc <gregory.szorc@gmail.com> >> # Date 1420510895 28800 >> # Mon Jan 05 18:21:35 2015 -0800 >> # Node ID 846a7a9b24f31f8ef2ceb4b77d995a340e596260 >> # Parent 0df221dbc14bcac4aed51917672b3a261e5922bd >> webcommands.changeset: add manifest to template call >> >> This is needed for parity with CLI JSON output. > > Huh? Are you aiming for parity with log --debug? Who needs the manifest > hash? Yes, I was aiming for log --debug parity. I can probably drop the manifest hash. I don't think there's a way to ask the web API for data for a particular manifest hash anyway.
On Tue, 2015-01-06 at 15:38 -0800, Gregory Szorc wrote: > On 1/6/15 3:33 PM, Matt Mackall wrote: > > On Mon, 2015-01-05 at 18:23 -0800, Gregory Szorc wrote: > >> # HG changeset patch > >> # User Gregory Szorc <gregory.szorc@gmail.com> > >> # Date 1420510895 28800 > >> # Mon Jan 05 18:21:35 2015 -0800 > >> # Node ID 846a7a9b24f31f8ef2ceb4b77d995a340e596260 > >> # Parent 0df221dbc14bcac4aed51917672b3a261e5922bd > >> webcommands.changeset: add manifest to template call > >> > >> This is needed for parity with CLI JSON output. > > > > Huh? Are you aiming for parity with log --debug? Who needs the manifest > > hash? > > Yes, I was aiming for log --debug parity. > > I can probably drop the manifest hash. I don't think there's a way to > ask the web API for data for a particular manifest hash anyway. There is. Originally we exposed all three levels of object hashes to users like Git still does. Fortunately we got smarter about that early on. Now there's legacy code in hgweb to accept such hashes but not display them.
Patch
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -383,8 +383,9 @@ def changeset(web, req, tmpl): node=ctx.hex(), parent=webutil.parents(ctx), child=webutil.children(ctx), basenode=basectx.hex(), + manifest=hex(ctx.changeset()[0]), changesettag=showtags, changesetbookmark=showbookmarks, changesetbranch=showbranch, author=ctx.user(),