Wednesday, July 20, 2011

Quick Tip: subversion “what will be updated?”

Sometimes I’m working with out of sync repositories, especially when I’ve submitted code and it overlaps with a release and I don’t necessarily want to push everything at once.

I’m a freak about maintaining a list of changed files on paper – I’m a paper nerd, I still love my black felt-tip papermate flair pens and moleskine notepads – but sometimes it’s nice knowing what is out of sync with a live checkout of a branch versus the repository.

Rather than blindly issuing update statements to files or directories, you can use the following command:

svn status -u

What you’ll get in return will be a status check of your current folder as it compares to your master repository. As an example:

[root@cancun application]# svn status -u
? controllers/ProfileController.php.bak
? views/scripts/sidebar2.phtml.bak
? views/emails/recommend/user.phtml.bak
* 1972 Bootstrap.php
Status against revision: 2391

I can tell from this report that I’ve got three files that the repository doesn’t know about (?) and one file that needs to be updated to version 1972 (Bootstrap.php)

No more blind wildcard updating!

posted by Dustin Vannatter at 10:14 am  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.