Monday, December 9, 2013

Pulling and updating of bunch of Mercurial projects in the same folder

A Useful bash script allows pulling and updating of bunch of Mercurial (Hg) projects placed in the same folder. These project repositories should desire the same credentials for authentication.

 #!/bin/bash  
 set -e  
 echo  
 echo "The Script allows to make bunch pulling and updating of all Hg projects found in the current folder"  
 echo "Author: Igor Maznitsa (http://www.igormaznitsa.com)"  
 echo  
 echo -n "Enter name, followed by [ENTER]: "  
 read hgUserName  
 echo -n "Enter password, followed by [ENTER]:"  
 read -s hgUserPassword  
 echo  
 folderCounter=0  
 for dir in $(ls -d */)  
      do  
           echo ----------------------------------  
           echo "Detected directory $dir"  
           if [ -d "./$dir/.hg" ]; then  
             echo "Making pull and update"  
             defaultPath=$(grep "default" "./$dir.hg/hgrc")  
             extractedPath=${defaultPath#*default*=}  
             extractedPath="${extractedPath#"${extractedPath%%[![:space:]]*}"}"  
             extractedPath="${extractedPath%"${extractedPath##*[![:space:]]}"}"  
             echo "Path $extractedPath"  
             hg --config auth.rc.prefix="$extractedPath" --config auth.rc.username="$hgUserName" --config auth.rc.password="$hgUserPassword" -R "./$dir" pull -u  
             echo  
             folderCounter=$[$folderCounter+1]  
           else  
             echo "WARNING: Directory $dir is not Hg repository"  
             echo  
           fi  
      done  
 echo "The Script work has been completed"  
 echo "Updated $folderCounter folder(s)"  
 exit 0  

Monday, July 15, 2013

Java performance Mind Map is published on GitHub

I have published my Java performance mind map on GitHub as an OSS project, the link is  https://github.com/raydac/Java-performance-mind-map . The Map can be edited in a great tool called XMind (http://www.xmind.net).

Sunday, February 17, 2013

Java Comment Preprocessor 5.3

I am glad to notify all that the new 5.3 version of my Java Comment Preprocessor is out. It is the most powerful preprocessor for Java with support of Ant, Maven and CLI and I guess that it is the one of the oldest Java preprocessors. In the new version I have added the feature to keep preprocessed non-active strings as commented ones in the output to give the possibility to save the line numeration in the resulting sources. The Mode is turned on through the /k directive for CLI, or through the keepLines parameter for Maven and ANT.