GSoC Blog post #6

At the beginning of this week, my previous commit was revert and set to config = False, meaning that it is hidden behind that config option. That’s because it was a period of code freeze in mercurial as the next release is due in some days, so unless a feature is completely tested it can’t be released.

Link to the revision: https://phab.mercurial-scm.org/D3919

Next Yuya told me to work on passing multiple revisions with –all-files mode.

I have had some code developments related to it posted on BitBucket.

The work is currently in progress at https://bitbucket.org/sangeet259/mercurial-scm/commits/e0c1548a16e1b47effdbab14a1856122ad39cd57

This patch needs to handle some edge cases which I am trying to figure out like making it compatible with –diff flag, also this needed to be backed up some testing, which I am writing as of now. This is the final leg of my proposal. Rest remaining is documentation and writing more steps.

 

GSOC Blog Post #5

This time I was working on changing the default of the grep command to a new behaviour.

With this patch grep searches on the working directory by default
and looks for all files tracked by the working directory and greps on them

==========================Demonstration================

OLD BEHAVIOUR

$ hg init a
$ cd a
$ echo "some text">>file1
$ hg add file1
$ hg commit -m "adds file1"
$ hg mv file1 file2
$ hg grep "some"
file2:1:some text
file1:0:some text

This behaviour is undesirable since file1 is not in the current history and was
renamed as file2, so the second result was redundant and confusing

NEW BEHAVIOUR

$ hg init a
$ cd a
$ echo "some text">>file1
$ hg add file1
$ hg commit -m "adds file1"
$ hg mv file1 file2
$ hg grep "some"

file2:2147483647:some text

======================================================

The change can be seen in the line of the respective snippets, in the second case file1 is no more present in the repo and so is not searched again.

 

Link to the Differential Revision:: https://phab.mercurial-scm.org/D3826

I then wrote the test demonstrating the same, next I plan to enable passing revs and multiple revisions to grep.