Coding Period : Week 3

taapasX28
Published: 06/15/2019

Hey everyone !  This is the update of what I did this week. This week I tried to perfect my implementation of things and learned how to write code in a minimalistic way instead of long complex hunks. 

What did I do this week?

This week was mostly spent on perfecting the unification code whose PRs I sent last week. I improved them and added a couple of new features. The prominent one being writing a method to register to unfinishedstates. I also worked on the unification of merge to checkunfinishedstate() method which would be a large change to the whole codebase as previously separate method per command were used to track down a merge in progress while the command was under execution. 
I parallelly also tried to register abort methods for various commands in the core into the
unfinishedstates list and develop a miniature hg abort command. Its support needs to be extended to extensions and then it would be ready for review.

What is coming up next?

The coming week I am planning to get all of the patches for API unification approved and also will try to send some patches regarding hg abort
I will also work parallelly on the unification of
mergestate to checkunfinished() because the unification of that would require addition of certain functionalities one of them being providing custom hints as per the command.

Did you get stuck anywhere?

While unifying the merge with other unfinishedstates I found the tests for hg strip were failing and the changes in them seemed quite illogical. I talked to my mentor about it and to much of a surprise he too found out that it was a bug in strip that it was allowed even when a merge was in progress. I prepared a patch for that and fixed that.[6]
I also got stuck at the initial reviews of the patch which demanded merge and bisect to be registered at the end of the list. However, my mentor's suggestion on developing a registering mechanism came handy and that issue too was solved.
 

View Blog Post

Coding Period : Week 2

taapasX28
Published: 06/09/2019

 

Hello everyone !! This is the update of what I did this week. This week was full of new learning experiences and a lot more productive than the last one.

What did I do this week?

This week completed the implementation of unification of APIs subtask and uploaded my patches on Phabricator[1] [2] [3] [4] [5] for final review. As I stated in the last blog, most of my doubts were resolved last week which gave me a headstart to proceed further. I was able to complete the subtask but I also needed to clean up the code and make it presentable on Phabricator. Initially, I uploaded the whole code at once which was quite untidy and difficult to review. Martin suggested me to break it down into simpler patches which was a little frustrating at first but later gave me a really important thing to learn that one should not only code from the perspective on an author but also from the perspective of a reviewer. Because in later times too if someone needs to check out changes that the code made, he or she may do so with ease. 
 

What is coming up next?

The coming week I will move according to the timeline in my proposal and start my work on hg abort and make it compatible with core commands like hg graft.
Also, I will be modifying my patches on the unification of APIs and get the patches merged. One of them has already been accepted.

Did you get stuck anywhere?Did you get stuck anywhere?

During the starting of the week I was doubtful regarding some issues like
does
checkunfinishedstates() be the part of the new class I created or not and so on. But my mentor Pulkit cleared most of them.
Later while splitting up my patch into smaller patches I was stuck in a condition where I needed to make an amend to a commit that was not the very recent one. I could not figure out the workflow and asked my mentor about it. He gave me manual of
hg evolve to go through saying that would make my workflow more powerful. After going through it I realised how awesome Mercurial is and hg evolve is one of the coolest feature that I have seen in any VCS. It provides with a whole new level of flexibility and also I was able to learn how things work at changeset level when hg amend or for that matter and history editing function is used 

View Blog Post

Coding Period : Week 1

taapasX28
Published: 06/02/2019

Hello everyone !! This is the weekly update of what I did this week. This week was full of ups and downs but in the end, was quite fruitful.

What did I do this week?

This week as stated in my previous blog I tried to make a rough implementation of the code. I unified the state determining APIs and merged their functionalities w.r.t state determination. I pushed the code to my clone at bitbucket[1] [2]. However as stated by my mentor, though the unification was alright it required to be a more generic implementation and a few more functionalities must be added to it which would help me in the implementation of hg abort and hg continue. I had a video call with my mentor Pulkit today and he helped me clear my doubts and gave me an approach on how I could improvise my code. He asked me to proceed in steps and check for different implementations and then decide what was suitable for the task. He also advised me not to stay stuck with something for very long and ask questions if stuck.

 What is coming up next?

The coming week I am planning to make my API more generic and finish it off as soon as possible so my mentor can review it and I can make the necessary modifications. Towards the end of the week, I also plan to start with the implementation of hg abort given this task is complete.

Did you get stuck anywhere?

During the starting of the coding period, I was a little unconfident about my implementation part but eventually, it did work out. Also, I got stuck with the values of allowcommit flag for different commands in hg but my mentor Pulkit was there to help me out of the problem and pointed out the part of the code I should read to get the appropriate values. Most of my doubts were cleared this week and though the implementation was partially correct it gave me hint how to proceed. This week I plan to correct my wrongs and proceed forward with greater speed.

View Blog Post

Introductory Blog

taapasX28
Published: 05/28/2019

Hey everyone! I am Taapas Agrawal, a sophomore at Indian Institute of Technology, Kharagpur. I am working under Sub-Org Mercurial, a distributed version control system. My project is about implementing hg abort and hg abort commands which are currently absent in Mercurial. This is what I will be working on for the next 12 weeks as my GSoC project.
My project is basically divided into three major tasks each having a variety of subtasks. The three major tasks are as follows:

  •  Unification of the state determining APIs.

  •  Implementation of hg abort in core as well as extensions.

  • Implementation of hg continue in core as well as extensions.

Completing these 3 tasks timely would lead to the completion of my project.
What did I do in the community bonding period?
During the first week of the Community bonding period, I had a 45 minutes video conference with my mentors which was basically to give a kick-start to the project. Many of my initial doubts were dealt with in the meeting and I was given a very good starting point from which I could start determining the solution of the first major task of Unification of APIs which in my view is toughest among the three. I was asked to send a mail in the Mercurial mailing list in case I have a major doubt or ping on IRC. 
During the period I analysed the hint given and was able to understand the code better. I read through the code of the two APIs and tried to make a list what all the features and functionalities individually each of them has and how a combined API could be made to perform those tasks.
I asked any kind of doubts on IRC and the mentors were really helpful and gave me suitable hints. Towards the end, I was able to write a rough pseudo-code of what the new API will look like and started writing code for that.
During this period I also planned out how I will implement the other 2 major tasks of implementation of
hg abort and hg continue.

What is coming up next?  
The coming weeks I am planning to complete the code for the new API and get it reviewed by my mentor before actually merging it with the rest of the code. The patch will be buggy so I plan to remove these bugs as soon as possible with the help of my mentor.
Did you get stuck anywhere?
There were instances where I could not figure out what some pieces of code do and I came across functionalities which the two APIs had and that could not be combined as it is but require a totally new method and a new way of implementation. 

View Blog Post