Cross Column

Showing posts with label Subversion. Show all posts
Showing posts with label Subversion. Show all posts

Monday, February 23, 2009

How to Fix SVN Issue "Attempted to lock an already-locked dir"

Using FlexBuilder 3 and attempting to commit a file to SVN Repository, I bumped into the following error:
commit -m "Updated fr_FR version" D:/Adobe/.../fr_FR/search.properties
Attempted to lock an already-locked dir
svn: Working copy 'D:\Adobe\...\fr_FR' locked

Based on SVN help, it says that "svn cleanup" can do the following:
Recursively clean up the working copy, removing locks, resumingunfinished operations, etc.

When cleanup command was issued, I bumped into another issue:
svn: Error replacing text-base of 'search.properties'svn: Can't move 'src\assets\search\locale\fr_FR\.svn\tmp\text-base\search.properties.svn-base' to 'src\assets\search\locale\fr_FR\.svn\text-base\search.properties.svn-base': The system cannot find the path specified.

To fix this issue, I manually added a new folder named "text-base" in ...\fr_FR\.svn subfolder. Finally, I was able to commit my file to the SVN repository.

Learn More
  1. Eclipse IDE Tutorial

Thursday, January 15, 2009

Importing Foreign Projects from SVN in Flex Builder

How does one go about opening someone else's project in Flex Builder using Subversion? You can directly import a project without creating a dummy one first and there are two ways of achieving this:

(1) From File menu...

  1. File > Import > Other
  2. Select Checkout Projects from SVN
  3. Check Use existing repository location: and select svn://rws...
  4. Select a project folder
  5. Use the default setting in Checkout from SVN dialog.

(2) From SVN Respository Exploring perspective...

  1. Browse in the SVN navigator to the project folder that you want to include into your existing workspace.
  2. Right click and bring up context menu.
  3. Choose Checkout...
  4. Checkout from SVN dialog will pop up and offer to check out the project in the current workspace.



To install Subversion in Flex Builder, you can get the the Subclipse plugin and follow the instructions as shown here.

Thursday, December 4, 2008

Enabing Keyword Substitution with SVN in Flex Builder

Similar to CVS, Subversion supports keyword substitution (i.e., substitute keywords--pieces of useful, dynamic information about a versioned file-- into the contents of the file itself).

Subversion defines the list of keywords available for substitution. That list contains the following five keywords, some of which have aliases that you can also use:






























KeywordAliases
DateLastChangedDate
RevisionLastChangedRevision or Rev
AuthorLastChangedBy
HeadURLURL
Idn/a


Simply adding keyword anchor text to your file does nothing special. Subversion will never attempt to perform textual substitutions on your file contents unless explicitly asked to do so. To tell Subversion whether or not to substitute keywords on a particular file, we again turn to the property-related subcommands. 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 or aliases found in the previous table.

In FlexBuilder, say, you want to add svn:keywords property to multiple files located in the same folder. Right click that folder, select Team > Set Property and fill in information like this:

Then click OK button to set it. To view the property settings on a specific file, you right click that file and select Team > Show Properties. A SVN Properties view will be displayed with name/value pairs. However, before you can view the SVN properties, you need to enable the view by selecting Window (Menu) > Other Views. A Show View dialog will pop up and you can select SVN Properties to enable it.

For example, say you have a versioned file named AbstractHeader.as with a file header like this:
/* Copyright (c) 2007, 2008, Oracle. All rights reserved.  */
/* $HeadURL$ */
/* $Id$ */

With no svn:keywords property set on that file, Subversion will do nothing special. Now, let's enable substitution of the Id and HeadURL keyword by following above-described steps. Immediately after you commit this property change, Subversion will update your working file with the new substitute text as follows:
/* Copyright (c) 2007, 2008, Oracle. All rights reserved.  */
/* $HeadURL: svn://rws65122fwks.us.oracle.com/AirGadgets/src/com/oracle/apps/search/AbstractHeader.as $ */
/* $Id: AbstractHeader.as 26 2008-12-04 00:58:26Z sguan $ */

© Travel for Life Guide. All Rights Reserved.

Analytical Insights on Health, Culture, and Security.