Tuesday, July 24, 2012

SVN Commands

For those who like to use svn from command line, these are the useful commands to remember.
As you use them regularly, you don't need to see this post again.. :D

1) Checkout a project:
    svn checkout url

2) Update and revert:
    -To update local files in a repository:
      svn update filename1, filename2,.
    -To update the entire repository
      svn update

3) revert to the previous version
    svn revert filename1, filename1, ...

4)Difference
   cd folder_name
   diff filename

5)How to commit files:

- Perform an svn diff to check the changes you made-  svn diff
- Then update the file- svn update . There might be conflicts. Then again perform svn diff to check   the conflicts. 

-This diff now shows up the differences between your current file and what's there now in the repository. 
-Check that only the new code you have added is the sum total of the differences. 
svn commit -m "Commit message"


svn diff filename1, filename2, ... , filenamen
svn update 
filename1, filename2, ... , filenamen
svn diff 
filename1, filename2, ... , filenamen
svn commit 
filename1, filename2, ... , filenamen


6)Adding a  new file to the repository:

    svn add filename
    svn commit -m "Commiting the new file that is added" filename



7)Deleting a file from the repository
   svn remove -m "Deleting the file which is not required" filename
 

8)Conflicts and resolving them
-If, when doing an "svn status" of a folder you find any files marked with a C, then it means such    files are in conflict with their corresponding versions in the svn repository.
 

-Doing an "svn update" may indicate files are in conflict as well. If you performed an "svn update" on some files (or on a folder) and one or more came up with the status C then you have a conflict. It means that changes to the same file on the same lines had been committed to the svn repository as what you have been working on. The update could not successfully merge the corresponding lines as it didn't know which lines to keep and which to overwrite: the lines are in conflict.
 

-If you ever encounter a file in conflict and you view it in an editor, you will see that conflicted lines will be marked with ===== and >>>>>. Both the changes you made and the conflicting changes in the repository will be embedded inside such special marks. 
(If you had done an "svn update" on files that turned out to conflict, the action would have created a couple of additional versions of the file: conflict-filename.mine and conflict-filename.. The first is your local version containing the changes you made. The second is the file as it is in the svn repository.)

To resolve conflicts in a file marked with a C
1.    Open up the file that's in conflict in an editor.
2.    Search for all occurrences of >>>> or ===. Each occurrence marks a conflicted section and needs to be resolved.
3.    Deal with marked sections as appropriate: decide which parts you want to keep, which should be removed or how to combine (the best of) both.
4.    Once you've finished editing out the conflicts in the file, you have to set the file's status to resolved for it to be up to date (and updateable with svn):

5.    svn resolved


9)To check the log
    svn log



10) SVN import
If you want to put this project folder into the repository, inside http://svn.abc/other-projects/trunk/ then you would type the following in your x-term:
 

cd my_program
svn import -m "my message" . http://svn.abc.org/other-projects/trunk/my_program



11) Blame
To get the info about which user has committed the code line by line for a particular file

svn blame filename


Happy coding,

Kaustubh



Thursday, October 27, 2011

Comparing Apples and Mangoes


On 5th OCt 2011 the Co-Founder and CEO of Apple Inc. died becasue of Pancreatic cancer.
After a few days, on Oct 12, 2011 the creator of C programming language and Co-inventor of Unix operating system died at the age of 70.
     People say Steve Jobs's death tops the news agenda and when Dennis Richtie died, nobody except only a few geeks notices. But that doesn't mean that Sir Dennis Ritchie has not done anything or he was not as great as Steve Jobs. So this speculation is completely ridiculous.
As a cricket fan I will see this comparison as comparing Sachin Tendulkar to Anil Kumble, which is totally rubbish. Dennis Ritchie was great, there is no doubt about that. He invented C language, unix OS, without this no other OS could evolved. But that doesn't mean that Steve Jobs's vision, marketing priciples are meaningless.
The fact that very less people (which is not the actual case though) noticed Dennis Ritchie's death becasue he was not a person who always be in the limelight like Jobs. Sachin is famous in cricketing world becasue in this world the batsmen always take the glory, unlike bowlers. That doesn't mean that Kumble was not a good cricketor.
The only point I want to raise is a person's credibility doesn't depend upon how famous he is in public but depends upon what work he has done. And people do different kinds of work which can't be and should be compared. That's all.

Monday, August 1, 2011

India Demolished

It is India VS Eng, the second test at TrentBridge.
India outplayed in every department of the game, whether it is bowling or batting.
India won the toss and elected to field, which was the right decision on the cloudy day.
Till tea India were right on top of the game with Eng struggling at128/8.
But all of sudden, Indian bowlers started looking ordinary when Broad was hitting the ball everywhere on the ground. So was it that, we took the tail-enders casually? If it was the case then that cost India the match.
You can't afford to take things casually at any point of the game. Because of this mistake England managed to score a healthy total of 221, which was not a bad total for a side which was struggling at 124/8.
From here India never recovered.
In the first inning no one except Rahul Dravid and Yuvarj able to bat long enough.
So the questions arises- what happened to the top order batsmen?  The same top order played well here in 2007. So is it too much of cricket killing their hunger for runs? or is it the huge amount of money got from IPL, made them so casual?
I think, if you want to play any type of game, you need killer spirit. If it is in place then everything goes right.
Also the questions are raised towards Harbhajan's form. For a long time he is not bowling well. Is it that we don't have a choice other than him. There are good spinners like Amit Mishra, Pragyan Oza waiting there for a chance. And the one who gets the chance is not making it count.
Praveen Kumar is the only bowler I saw till now who is consistent. Ishant also bowled well but he is not able to deliver good spells consistently. Shreeshant looked impressive. But in the second Inning they all looked ordinary. So England managed to score 544 runs with centurion Ian Bell, Bresnan, Kevin, Morgan and Broad  played their part.
In the same inning there was a possible controversy over Ian Bell's run out. It was clearly out in the laws of the game. But Dhoni decided to withdraw the decision. I don't know about others, but I felt Dhoni's decision was not correct. If you recollect Grant Elliot's run out decision at oval, then where was the spirit of the game.
So with the grand total of 477 to chase, India never looked confident, eventually got all out for 158.
At the end, disappointing match for India. If they loose another match in the series, they will be thrown at the second place in the ICC test ranking.

Saturday, May 28, 2011

Royal Enfield Classic 500cc after 1000 kms

Hi All,

In this post I am sharing my experience, problems and positives of the bike.
I got my bike on 5th April of 2011. It took almost 2 months to complete the first 1000 kms.

First of all, the looks of the bike are killer. Everyone turns their head when the bike passes by.
Especially the blue or green whatever color looks awesome.
The reason I opted this color because it comes only with 500cc.
So only just looking at the color anyone can say it is 500cc bull.
Now when it comes to riding comfort, the rider's seat is very much comfortable.
Previously I had an Apache RTR 160cc. So it took some time for me to get adjusted to the sitting position.
Though the actual riding comfort will be evaluated when I ride the bike more than 200 kms on a day.
Till now I have ridden it only 100 kms on a day.
Now after the two week of delivery and 300 kms, all fuses were blown. The horn n electric start stopped working.
So I took it to the service center. I got to know that my starter motor was jammed.
And I have been told that I will get the new motor after a week, which was very disappointing for me.
So the bike was in the garage for a week.
But when the motor got replaced, I have not experienced any problems till now.
I can say that the bike is Mukhan (Smooth like butter).
I got the bike serviced at the time of replacement of the starter motor.
The mileage of bike before the first service was 25-26 kmpl.
But after the first service, I am getting the mileage of at least 30 kmpl.
The Royal Enfield Authorized Service center at Bhandup (Mumbai) really sucks.
They didn't even lubricate my bike properly. The joints, the clutch were making noises which clearly indicated that there is no lubricant. So I have to get the bike lubricated from the Auth Rayal Enfield Serice center at Dombivali (Mumbai).
I will never go and recommend the the bhandup (Mumbai) service center. It really sucks.
Handling is very easy, bike is very stable till 90 kmph.
I haven't crossed 90 kmph mark till now.
So far I am very much satisfied n happy with the bike.
Will share more things later with u guys.
Wear helmets, do not use high beams unless required. Have a safe ride
And last but not the least keep thumping.


Saturday, March 12, 2011


The game of words

Cricket is a game of passion. But when it comes to commentary, along with passion, the commentators show their sense of humor. 


Cricket commentary is not an easy job it seems. 
"Do not speak unless you can add to the picture" was the definition of commentary for Richie Benaud.


Cricket is blessed with many great commentators -Richie Benaud, Geoffrey Boycott, Ian Botham, Tony Greig, Micheal Holding,  Ravi Shastri, Sunil Gavaskar, Navjot Siddhu, and the last but certainly not the least Harsha Bhogle.
Harsha showed the world that cricket commentary is not restricted to the former players. To talk about cricket, you need the passion about the game and not the experience of the game.


So let's start with the amazing one-liners from the great commentators. 


At the ICC champions trophy 2000 Ind Vs Aus:Harsha Bhogle
"This inning from Sachin has been like a garden, and the last shot being the most beautiful flower in it.."


After being caught at the slip off Anil Kumble, Clarke was waiting for the decision.
Harsha said, "I think, he is waiting for tomorrow's newspaper to declare him out."


During Pakistan's tour of Eng in 1962, Rex Alston came up with this beauty.
"There is a bowling change and we are going to see "Afaq" at the Nursery end"


Richie Beanud- "The slow motion replay doesn't show how fast the delivery was!!!"


After Anil Kumble scored a maiden ton Vs England, Harsha said,
"This is the most romantic moment in Indian cricket"


Blame game..
Fred Trueman tried to be honest,
"I am not the one to blame anyone, but it was definitely Viv Richard's fault" 


When we are talking about commentary how can we forget Siddhuism?
"Wickets are like wives, you never know which way they will turn..."


Once Sunil Gavaskar and Harsha were sharing the commentary box, when Sachin was at the crease,
Sachin hit an awesome straight drive very close to non-striker wickets,
Gavaskar commented, "I have seen only one man hitting straight drive so crisp and brilliant and that man is playing at the moment"
Harsha without wasting a second, "I have seen two, the second is sitting next to me at the moment"


When Sachin once got out to a lollypop offspinner (I guess it was Michael Vaughn) in '02.
He wonderfully said, " Oh what a shame. It was reminiscent of a soldier who survived the war when all the bullets were flying by his nose and then got run over by a bicycle in his native town ." 



At Perth, when Gilchrist took a blinder, Harsha said,
"Some of the sea-gulls flying here, are going to get complex"


Once India lost a test series in SA after winning the first match,
Harsha-"India lost the series because they surprise themselves by winning the first match, a win should never be a surprise"


In a match between Aus and SL, Harsha said to Ian Chappel, 
"I am sure, you will never become a lawyer, I understand everything you say"


Harsha' comment on Yuvraj's six out of the ground in Durban,
"Are there people working late in the office, we want our ball back"


These are some of the great on-liners, most of them from Harsha Bhogle.


If you also recollect some of the good ones, please put them as comments.









Friday, March 4, 2011

Camping near Malshej Ghat

Malshej ghat is always fascinating destination for me. I have been there 3-4 times.
But this time, we tried something different.Thanks to Sanjay,Kunal, KJ, Lilo and Viraj.
It was Sanjay's idea of camping there. He has been there for camping I guess.
So he invited all of us this time.
We had no prior experience of camping. In this trip also we were not at all prepared in terms of equipments.
In contrast, Sanjay was very well prepared. He had everything that needed, right from the screw-driver to towing rope.
So we started on Sat afternoon towards Malshej ghat. Around the evening we reached the village, Khireswar.


(Our camp site)

This is the base village of Harishchandra Gad. Near the village, there is a well built , beautiful lake called Saptatirtha.
We decided that we will put our tents near the lake.
The air was cool, the place was nice, the tents were placed and we were very excited.
We built a barbecue..and cooked some veg n non-veg food on that.

So after eating, chatting, boozing, we decided to go for some off-roading, in the Scorpios.

But while returning to the camp, Sanjay's Scorpio   
got stuck in the mud of the lake.

It was the towing rope, Kunal's Scorpio that came to rescue.
After almost 2-3 hours of hard work, we were able to pull Sanjay's scropio out.
And then it was celebration after that.


Meanwhile, during the car pulling episode, Viraj was very much frustrated. Because he thought we wasted a good time in that. But it was fun for us.
I just remember a funny incident.- Viraj after 2-3 pegs down, while preparing a peg for himself, poured some edible oil into his whiskey. And he drank all of that. We were just laughing like crazy after watching Viraj's expressions.


After that everybody was just singing and dancing till 4 o'clock in the morning I guess.
Overall it was a very very dhamal picnic.


I hope there will be more outings like this in the near future. :)


Btw , u guys can have a look at the pics of this fun at http://www.flickr.com/photos/shoan_kau/sets/72157625969794577/

Stansport Cabana Privacy Shelter, Green/Tan