Friday, 22 April 2016

What is eliding mergeinfo in SVN?

Read the section "Subtree Merges and Subtree Mergeinfo" under Basic Merging. It is basically removing the redundant subtree mergeinfo as the needed mergeinfo information is already present in parent's mergeinfo.

That is, for example, if parent X mergeinfo has values x,y and z, the child of X doesn't need to maintain the x,y and z mergeinfo values.

Thursday, 31 March 2016

Script to do svn merge




1st argument is the URL you want to merge from.
2nd argument is the svn log's begin date.
3rd argument is the svn log's end date.

Tuesday, 16 February 2016

Need for IP addresses

Problem Statement:


Why do we need IP addresses in the first place as we already have ample amount of unique Ethernet addresses.


Reason:


Ethernet addresses are unique physical address whereas IP addresses are unique logical address across the world. So, grouping of machines under a single sub-net is very easy compared to Ethernet addresses. Machines can be added/removed easily in sub-net consisting of machines having logical IP addresses.

Also, for each group of IP addresses, it is easy to enforce restrictions. ISPs know which set of IP addresses is allocated for which country and so, it becomes easy for them to block certain contents.

Also, as mentioned in https://www.quora.com/When-a-MAC-address-itself-is-unique-why-do-we-still-need-an-IP-address-to-uniquely-identify-a-system-on-a-network, it is easy to build routing table based on IP addresses as MAC address contains no information about machine's location.

Tuesday, 15 December 2015

Babun shell

Babun is linux kind of shell to work in windows platform. I first came to know about babun from zeroturnaround article. You can read about babun more here. Here are the list of features which

a) scp causes some trouble when working with cygwin. scp works well with babun. The experience is the same as if the machine is Linux. Babun also helps auto completing the hostname (pressing tab enables this) for the 2nd and subsequent times when doing ssh/scp.

b) To run the previous command which started with, for example, xyz, we run !xyz in linux. The drawback is that we don't know what command will run till the command gets executed (at least this happens in sles machines). But in babun after we type !xy and pressing tab it displays what was the command that was last repeated which started with xy. Very much helpful.

c) Babun also displays the working directory at the right hand side of the place where we type commands. It helps us to know in which is our current working directory without typing pwd.

d) Babun shell, by default, has huge amount of buffer size (99000 lines) which helps us to know all the commands that got executed from the time the shell got launched. This is not by default enabled in windows cmd. Max height size of windows cmd's screen buffer size is 9999 lines.

e) history command is also supported.

As babun is built on top of cygwin, it supports vi editor, find, cd -, grep, ls, pwd and other linux commands. 

There are some linux commands like ifconfig, which are not supported.

Thursday, 26 November 2015

mvn install -pl with -am/-amd usage

mvn install -pl with -am/-amd is very powerful. I first came to know about this usage in this article.

One use case that I can think of is this. Assume we are making changes in project D. It depends on projects E, F, G, & H. Now assume we have done update of our local codebase from repo and it caused changes in all of the projects in our local codebase (to keep our scenario simple). Now to build project D, we can run "mvn install -pl <groupId:artifactId of project D> -am" which will make sure maven runs the E, F, G & H first before running our target project D.

-amd option is useful in the following scenario. Assume project X is where we are making changes and project A, B, C depend on X. Now we are making changes in project X, and we want to check whether project A, B, C are still compiling fine. Now we can run "mvn install -pl <groupId:artifactId of project X> -amd" which will do the job. 

These commands has to be run from the root of the code repo (or ... which I leave it as an exercise. It has something to do with lowest common denominator).