So it is two weeks into the coding period and I thankfully haven’t fallen much behind my own set timeline.
The tasks that I had set this week were fixing the
--all flag and fix the working directory grep. Thankfully I had done major of this work during/after submission. The fix of the
--all was tested and merged and is a part of the stable version of hg now.
Here is the issue it fixed with grep : https://bz.mercurial-scm.org/show_bug.cgi?id=3885
Here is the link to my revision that is merged : https://www.mercurial-scm.org/repo/hg/rev/a2a6755a3def
The best part of the issue was that fixing it took just changing two lines. The point is that it’s not the number of lines you that matter, it’s the impact that the code has. I must admit that I might have just got this accidentally. And this is the beauty of open source, that issue was open for five years and was one of the bottlenecks of my GSoC project. This reminds me of a quote (Linus Law) “Given enough eyeballs, all bugs are shallow”.
I wrote a detailed blog on this subject you can read more about it :
I had a video chat with my mentors Jordi and Pulkit. We discussed how to go ahead and work on the remaining of the Grep Plan. Jordi pointed out that making grep accept revision ranges and work on the working directory might be challenging. He assigned me this task till the first evaluations.
I already have a patch in the working directory, but there is a lot of scope for improvement on that, I am working currently on making it support the argument
wdir() in the -r flag.
The way I plan to do is catch it as an exception and handle it separately. This was concluded by a discussion with Yuya Nishihara. There are still other problems that I think may lay ahead. I am also having some doubts lately which I had been asking on the #mercurial, and have got suggestions from the community.
In short, the first two weeks as Google Summer of Code student has been great. Looking forward to the upcoming weeks and more commits.
Edit: Here is the link to the patch that I have sent and is currently working on :
Yuya has reviewed and given this comments :
This patch appears to do 3 separate things by adding a big “if” branch.
- * fix grep -r 'wdir()'
- * add mode to include unmodified files
- * change the default
- It’s probably better to write one (or more) patches for each change, in a way not duplicating code for each combination of possible options.
So I am currently working on breaking into separate patches handling the three things separately!