SVN Cleanup fails – how to resume

Today I was  trying to cleanup a project, I got error.

I tried deleting the log file in the .svn directory and I also deleted the offending file in .svn/props-base

then did the cleanup. It works and I resumed my updates.

In some cases you need to apply the same in parent folder as well.

HowTo Get RID of Just-In-Time debugger

I installed Visual Studio, and with this it installed a Just-In-time script debugger .This Just-In-Time seems to come up all the time when I run Internet Explore and on each page of IE.

 Solution

Open Start>Control Panels>Internet Options: Advanced and activate (check box)

* Disable Script Debugging (Internet Explorer)
* Disable Script Debuggung (Other)

Open the registry (use regedit, Click Start, Run, Regedit).

Go to this key:

HKEY_CURRENT_USER\Software\Microsoft\Windows Script\Settings\JITDebug

And set it to 0.

Rename log4j.properties

Some time the need arises to have our log4j.properties with different name. By default, if no other configuration is given, log4j will search your classpath for a 'log4j.properties' file.

Now to use your own named log4j property add the following line in your main program:

  PropertyConfigurator.configure("File  name with path")

exmaple:

 PropertyConfigurator.configure("c:\\logs\\my-log4j.properties")   this will set this as a default property name and all done =)

How To: Read web/META-INF/MANIFEST.MF in Web Application

Hi All, 

As you all know In web application inside web directory there is a META-INF directory. Inside which we have MANIFEST.MF that holds version information. I have to read the MANIFEST.MF from this directrory. Need the manifest info for the purpose of build info and have to show in footer of each page. It's easy to read it in case of JAR file and while searching on net I got mostly examples on jar,classpath related Manifest. But my requirement was to read web/META-INF/MANIFEST.MF file.

So I am posting here what I done:

Inside web application then using the ServletContext.getResourceAsStream
method should work and same I used.

// for a Servlet, you can get the ServletContext like this
 ServletContext aContext = getServletConfig().getServletContext();
 InputStream inputStream = aContext.getResourceAsStream("/META-INF/MANIFEST.MF");

In Spring application do following inside controller:

//Build Info
ServletContext aContext= getServletContext();
InputStream fis =aContext.getResourceAsStream("/META-INF/MANIFEST.MF");

Hope this helps you 🙂 . Do post your comments

How to Delete .SVN folders in Linux and Windows

Hi all,

Yesterday I got a code for study that was actually maintained inside Subversion. The code I get was not a exported copy of subversion, because of this I get a deep hierarchy of code included ".svn" folder in each folder. Now before start working with the code in eclipse it was mandatory for me to remove the .svn folders.

Below I am providing solution for both OS (windows/Linux) to remove these recursive ".svn" folders. Hope you will find helpful.

Do post your comments 🙂

Solution under Windows: 

Right click on the folder and click Search..

Enter .svn as the filename to search for.

Click “More advanced options” and select:

– Search hidden files and folders

– Search subfolders

Press search button and delete the folders you find appropriate. 

Solution under Linux/Unix: 

find ./ -name ".svn" | xargs rm -Rf 

or

find . -type d -name ‘.svn’ -print0 | xargs -0 rm -rdf