Blog Some posts...

Requested changes and comments

2013-08-12T22:28:11Z mercurialgsoc

In this post, and may be other such posts in the future, I will list important comments received in response to my sent patches, not to forget something. As for now, they are:

  • search mode indication: wrap “Assuming …” in <p>...</p>
  • search mode indication: make mode descriptions localisable
  • revset tree depth: clearer commit message
  • revset search: blacklist regexps usage
  • makeRequest (js): get rid of all the ActiveXObject IE-related magic
  • ajax infinite scroll: don’t strip one entry in the backend explicitly
  • ajax infinite scroll: indicate when there are no more items
  • ajax infinite scroll: get rid of shortlogajax template

Infinite scrolling

2013-07-23T20:23:05Z mercurialgsoc

I’ve started implementing ‘infinite scrolling’ feature, and now it’s already available in action for shortlog view at my running hgweb instance.

Upcoming plan

2013-07-23T20:02:17Z mercurialgsoc

Some things I’m going to implement/extend in hgweb soon as part of the GSoC project:

  • search field looks also for file names (not sure if it’s wanted through)
  • ‘infinite scrolling’ with AJAX for {short,change}log, graph, search
  • dynamic search results (without page reload)

Hgweb search - extended

2013-07-23T09:42:22Z mercurialgsoc

Currently hgweb supports only simple keyword search and matching exact revisions by number or hash, and you can’t control it: i.e. there is no ability to search for string ‘1234’ in commit descriptions, if revision #1234 is in the repo, or to search for ‘abc’ if a changeset hash starts with ‘abc’ (and if there are multiple such changesets, you will just see an error).

My patches extend the search in several ways:

  • no matter what you type, you get only the matching revisions (querying for an exact revision in current hg works like a goto to the place in log, which is less intuitive)
  • full revset expressions syntax is supported (with a configurable restriction of certain functions, e.g. heavyweight ‘contains()’)
  • the current search mode (exact revision, keyword, or revset) is shown along with the results, and you can always force using literal keyword matching, which is useful to search literally for strings like ‘abc’, ‘1234’, or ‘keyword(a)’

As usual, all the patches can be found at, and they are actually enabled there so you can see all the new features in action.

My commits list

2013-07-12T12:47:09Z mercurialgsoc

From now you can see all my commits to Mercurial (both accepted and not yet) grouped by repo they are currently in at

Revset search syntax in hgweb

2013-07-09T10:36:50Z mercurialgsoc

Another part of my summer project is improving hgweb search by adding revset syntax to it, which is extensively used in Mercurial CLI commands. According to the feedback at ML, I’m going to change the search behaviour to use revset syntax, if the query string can be parsed as a revset tree.

Another obligatory thing here is to deny usage of some heavy revset functions. The whitelist of them, used at BitBucket seems reasonable here too.

Hgweb source views

2013-07-06T12:05:01Z mercurialgsoc

First part of my plan is improving source display and code cut&paste all over the hgweb, and it is going to be finished. The implementation strategy is accepted by the community, and I’ve patchbombed versions of several patches, which modify single file, diff and changeset views.

Start of development

2013-05-31T20:49:57Z mercurialgsoc

I’ve started implementing proposed features from the beginning and the first item is improving the way hgweb display file content. By this I mean allowing to select code without line numbers and with consistent indents, and highlighting the lines which were linked at (as the hash part of the URL). Actually, these things are already partly implemented, and I’m going to tidy up, organize them and patchbomb to Mercurial.

You can always see how the code performs at (it usually runs the version of code which is in the last patchbombed patch), and of course at the official Mercurial repo after corresponding patches are accepted into upstream.

GSoC has started

2013-05-29T13:05:10Z mercurialgsoc

As I’m selected for Google Summer of Code 2013 at Mercurial project, I’m going to publish short posts here related to my coding. Now there is community bonding period on the timeline, until the June 17.

My latest development (even what is not yet accepted to upstream) will hopefully be always available as a Mercurial repo The whole is running the last code from this repository.