taapasX28's Blog

Coding Period : Week 5

taapasX28
Published: 06/30/2019

Hey everyone !  This is the update of what I did this week. This week I got my API and its extended cases committed. Also, I completed the implementation of hg abort and pushed the patches for review.

What did I do this week?

This week as stated previous blog I completed the implementation for hg abort and included shelve and merge in the plan. Also, I refined my patches and send them to Phabricator in a well-divided format.
In this period I also got my state detection API committed to the Mercurial repo. It's extended cases suggest by @martinvonz were dealt with and it was my patches were finally merged. I also updated the release notes regarding that. This marks an official end to the first sub-task that was the task of the unification of state detection APIs.

What is coming up next?

The coming week I am planning to get all of the patches for hg abort approved and update the patches according to the reviews. There might be a lot of new features that might be needed to be added to that as hg abort is still in its underdeveloped stage.
I will also work parallelly on
hg continue and see if I can prototype it.

Did you get stuck anywhere?

I faced some problem when I was trying to include merge in the hg abort plan. Though it took some time, I was able to figure out the workflow and make an appropriate patch for it.
 

View Blog Post

Coding Period : Week 4

taapasX28
Published: 06/23/2019

Hey everyone!!  This is the update for week 4 and hence the last week before the first evaluation. This week I mainly extended the state detection API to more cases which were not part of the plan but an essential for Mercurial. I also came up with the first implementation of hg abort. 

What did I do this week?

As stated in the previous blog I got my PRs regarding the first sub-task accepted.[1][2][3][4] @martinvonz suggested some extended cases for the API and I was interested to take that up and add those features. Also, I updated the release notes about the new API. 
For
hg abort, I sent the first prototype for it which included the algorithm for hg abort, the extension of state detection API to register abort functions and inclusion of graft, rebase and histedit into the plan. This leaves me with two remaining operations merge and shelve. I was able to write a prototype for shelve but since it was buggy I did not send it as a PR. I got my patch reviewed by @Pulkit on Bitbucket [5]. He suggested me some changes I will send the patch directly to Phabricator.
   

What is coming up next?

The coming week I am planning to get all of the patches for extended API approved and will send the complete hg abort patch to be reviewed. The work that is still left is cleaning up the patch and inclusion of shelve and abort as part of abort plan. 
Towards the end of this week if time permits I would like to start with
hg continue

Did you get stuck anywhere?

During the start of hg abort I did get stuck with what actually will the algorithm for it look like. Though I had a visualisation but was not quite clear with it. I discussed this with @Pulkit got my doubts cleared and went ahead with my work.

View Blog Post

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