Open Bug 958149 Opened 10 years ago Updated 7 years ago

Provide ability for user to browse an hg branch in the web interface.

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

REOPENED

People

(Reporter: KaiE, Unassigned)

References

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1021] [workaround in comment 10])

The web interface of HG is very limited when working with named branches, like we do in the NSS project. It would be helpful to get a web view that limits the displayed changes to the one that actually were applied to a particular named branch.

When I asked on Mercurial's IRC channel, I was told:
  "with 2.8 you can use revset on hggraph"

Therefore I'd like to suggest that hg.mozilla.org gets upgraded to use software version 2.8 or later.
Assignee: server-ops-devservices → server-ops-webops
Blocks: 945383
Component: Server Operations: Developer Services → WebOps: Source Control
Product: mozilla.org → Infrastructure & Operations
(In reply to Kai Engert (:kaie) from comment #0)
> The web interface of HG is very limited when working with named branches,
> like we do in the NSS project. It would be helpful to get a web view that
> limits the displayed changes to the one that actually were applied to a
> particular named branch.
> 
> When I asked on Mercurial's IRC channel, I was told:
>   "with 2.8 you can use revset on hggraph"
> 
> Therefore I'd like to suggest that hg.mozilla.org gets upgraded to use
> software version 2.8 or later.

Can you give an example of what isn't working, please? Upgrading the server software would not let you use hggraph in the webview.

A quick run of 2.8.2 shows nothing different in the webview, nor the presence of a 'hggraph' option/command.
Maybe I'm confused and we're talking about different things.

I had assumed that "hggraph" refers to the web interface, like this one:
  https://hg.mozilla.org/projects/nss/graph

Are you talking about something else?

Since this is the only place where I was able to find anything named "graph" in the hg web interface, I had assumed that's the place where new features had been added in 2.8
By the way, I notice that the Mozilla HG web interface looks quite differently from other HG web interfaces offered by other open source projects, e.g. comparing https://hg.mozilla.org/projects/nss/ and http://selenic.com/hg

Does Mozilla use a non-standard HG web interface?
Summary: Please upgrade the hg.server.org to use mercurial software v2.8.x → Please upgrade the hg.server.org to use mercurial software v2.8.x (want to view commits by named branch)
Summary: Please upgrade the hg.server.org to use mercurial software v2.8.x (want to view commits by named branch) → Please upgrade the hg.server.org to use mercurial software v2.8.x (want to view commits by named branch on the web interface)
I've asked on Mercurial's IRC server again.

It seems there was a misunderstanding, no such new feature has been added in 2.8.

I'm closing this bug as INCOMPLETE, as I no longer have a need for this upgrade.

(For reference purposes, I was pointed to the "hgview" software, which could do what I want.)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INCOMPLETE
I'd actually like this in the future depending on how my experiments with Facebook's hgwatchman/memcache extensions work out. Their extension depends on mercurial > 2.7.0, and improving operation time by a significant amount could be a huge win for build time.

We still have the hg staging server for testing these changes to make sure they do not affect expected behavior.

My experiments should indicate whether or not we can benefit from this. I plan on posting a blog post to the planet with my results, so I'll update here when done.
Assignee: server-ops-webops → bkero
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Ok, I'm changing the bug summary back to something more generic, asking for a server upgrade in general.
Summary: Please upgrade the hg.server.org to use mercurial software v2.8.x (want to view commits by named branch on the web interface) → Upgrade mercurial software on hg.mozilla.org to use a more recent version like v2.8.x
(In reply to Kai Engert (:kaie) from comment #3)
> By the way, I notice that the Mozilla HG web interface looks quite
> differently from other HG web interfaces offered by other open source
> projects, e.g. comparing https://hg.mozilla.org/projects/nss/ and
> http://selenic.com/hg
> 
> Does Mozilla use a non-standard HG web interface?

Yes, which is why understanding exactly what problem you have is important. Ours is "tuned" for our needs (e.g. no bookmarks, added pushlog, etc.), but based on the distributed version.

Let's decouple the hg server version from your need. Changing summary.
Summary: Upgrade mercurial software on hg.mozilla.org to use a more recent version like v2.8.x → Provide ability for user to browse an hg branch in the web interface.
There is some truth to the initial comment. The little search box in the top right of hgweb allows you to plug in queries. Mercurial 2.6 (or 2.7) added the ability to use "revset" queries in that box. Run `hg help revset` to see what all you can do there. It's quite a powerful feature of Mercurial. Git has nothing on it.

You can also deploy custom revset queries using extensions. See http://gregoryszorc.com/blog/2013/11/08/using-mercurial-to-query-mozilla-metadata/ for some cool stuff I've done.

For developers spending a lot of time doing forensics through hgweb, revset queries would be an amazing utility. Of course, anyone can run an hgweb server by running `hg serve`, so I'm not sure if this is strictly required on hg.mozilla.org.
Thanks, Greg.

To sum up solutions to date:
 - use client 2.8.x & run "hg serve" locally
 - use Greg's extension and run locally
 - wait for next hg.mozilla.org upgrade, and it comes "for free" 

Kai -- how much of your immediate needs does this address?
Flags: needinfo?(kaie)
Gregory, thanks a lot, helpful information, I didn't think of running "hg serve" locally. I was able to confirm that it does what I need.

So, as a result, I have two workarounds that *I* can use. I wish those mechanisms were more easily discoverable, because other users are likely to go through the same user experience.

It would be really nice if the web interface were tweaked to offer that behaviour by default.

In my opinion, if a user clicked on "branch name -> changelog", only changes on that branch should be shown, without requiring the user to discover these workarounds. That's an enhancement suggestion, either for mercurial's stock web interface, or for Mozilla's particular adjusted web interface.

To answer your question, *my* immediate need is solved, in the future I will know how to get the information I require. Thank you.

For the record, for other readers, 
in order to see changes on a branch named NSS_3_15_3_RELEASE_BRANCH:
- hg clone nss
- cd nss
- hg serve
- in the web browser, open http://127.0.0.1:8000
- in the upper right search bar, enter:
    branch(NSS_3_15_3_RELEASE_BRANCH)
Flags: needinfo?(kaie)
Agreed on need to eventually get this into production, and glad you are unblocked for now. We're leaving open for the production solution.
Whiteboard: [workaround in comment 10]
Assignee: bkero → server-ops-webops
Component: WebOps: Source Control → Mercurial: hg.mozilla.org
Product: Infrastructure & Operations → Developer Services
Whiteboard: [workaround in comment 10] → [kanban:engops:https://kanbanize.com/ctrl_board/6/65] [workaround in comment 10]
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/65] [workaround in comment 10] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1011] [kanban:engops:https://kanbanize.com/ctrl_board/6/65] [workaround in comment 10]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1011] [kanban:engops:https://kanbanize.com/ctrl_board/6/65] [workaround in comment 10] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1020] [kanban:engops:https://kanbanize.com/ctrl_board/6/65] [workaround in comment 10]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1020] [kanban:engops:https://kanbanize.com/ctrl_board/6/65] [workaround in comment 10] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1021] [kanban:engops:https://kanbanize.com/ctrl_board/6/65] [workaround in comment 10]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1021] [kanban:engops:https://kanbanize.com/ctrl_board/6/65] [workaround in comment 10] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1021] [workaround in comment 10]
Assignee: server-ops-webops → nobody
QA Contact: nmaul → hwine
QA Contact: hwine → klibby
You need to log in before you can comment on or make changes to this bug.