Reverting to a previous version of your software in Subversion, you merge the changes from your current revision back to the revision you want to revert to.
So, for example, if you want to revert the trunk of your application from revision 682 to 680, you would do the following:
svn merge -r 682:680 http://myrepository.com/my/project/trunk
Subversion calculates the changes between revision 682 and revision 680 of the trunk and applying them to your working copy.
If you want to see exactly what changes will be applied, do a diff:
svn diff -r 682:680 http://myrepository.com/my/project/trunk
Finally, since the merge happens on your local working copy, you need to commit it to the repository.
Buzz This Post
Delicious
Digg This Post
Ping This Post
6 August 2010 at 3:43 PM
We use find command to find all .svn folders beginning from current directory:
$ find . -type d -name .svn
Now, we pass these directories to rm command, using backtick (key to left of ’1′) around find for command substitution:
$ rm -rf `find . -type d -name .svn`
Buzz This Post
Delicious
Digg This Post
Ping This Post
9 April 2010 at 3:44 PM
Subversion has the ability to substitute keywords—pieces of useful, dynamic information about a versioned file—into the contents of the file itself. The list of keywords available for substitution are:
- Date – describes the last time the file was known to have been changed in the repository.
- Revision – describes the last known revision in which this file changed in the repository.
- Author – describes the last known user to change this file in the repository.
- Id – is a compressed combination of the other keywords.
Now combine svn-keywords with JavaDoc of a Java Class. A tipically header template can be:
/**
* CLASS DESCRIPTION
*
* @author Pasquale Marcoccia
* @version $Revision$ on $Date$ by $Author$
*/
or:
/**
* CLASS DESCRIPTION
*
* @author Pasquale Marcoccia
* @version $Id$
*/
To tell Subversion whether or not to substitute keywords on a particular file, we can use propset subcommand. The svn:keywords property, when set on a versioned file, controls which keywords will be substituted on that file. The value is a space-delimited list of the keyword names.
svn propset svn:keywords "Date Revision Author Id" MyClass.java
We can set keywords on all java files in a directory:
find myProject/ -type f -name '*.java' -exec svn propset svn:keywords "Date Revision Author Id" {} \; -print
Instead, for files added later, we can automatically set keywords changing svn config file (~/.subversion/config):
[miscellany]
enable-auto-props = yes
[auto-props]
*.java = svn:keywords=Date Revision Author Id
Buzz This Post
Delicious
Digg This Post
Ping This Post
5 April 2009 at 11:10 AM
To resize a VMWare disk there is an easy way: VMWare vCenter Converter. Unfortunately a linux version is not available. Additionally, this process seems to be very slow and at the end VMWare Tools needs to be re-installed.
So here a manual procedure:
- turn off the virtual machine
- remove all snapshots (or revert to one)
- run
vmware-vdiskmanager -x {size} {disk}
where
{size} is the new size of the disk (for example 8GB) and
{disk} is the full path of the file .vmdk.
This procedure only expands the disk and not the partition. If the virtual disk is partitioned, you will need to use a third-party utility to resize the expanded partitions (Partition Magic, GParted Live CD, Paragon Partition Manager). If you are using the Windows DiskPart utility, it can only extend data volumes; if you use the DiskPart utility to extend a system or boot volume, you may get an error.
Buzz This Post
Delicious
Digg This Post
Ping This Post
21 January 2009 at 5:47 PM
Previous Posts