Tuesday Oct 04, 2011

Tip #11 Subversion Low-Tech Safety Net

Have you ever lost a significant  amount of source code?  If you have you probably already have multiple layers of safety nets.  This stuff is just too hard to do to take a chance on hardware failures, hickups, etc.  

E.g. I remember once I thought I was in my temp directory.  I entered this command:

rm -rf *

Oops.  I was in the root directory!  I.e. stuff indeed happens. 

Today's excruciatingly simple tip:

When you are actively developing code but it is not yet ready to be checked-in.  Yet you have spent a significant chunk of time on it.  I do this:

svn status | sort | tee dome.bat

I edit the dome.bat file and change this:

?       comm-util-3.1.2.save.jar
?       d
?       diffs.txt
?       dome.bat
?       q
A       src\main\java\com\sun\enterprise\universal\process\WindowsCredentials.java
A       src\main\java\com\sun\enterprise\universal\process\WindowsException.java
A       src\main\java\com\sun\enterprise\universal\process\WindowsRemoteAsadmin.java
A       src\main\java\com\sun\enterprise\universal\process\WindowsRemotePinger.java
A       src\main\java\com\sun\enterprise\universal\process\WindowsRemoteScripter.java
A       src\main\java\com\sun\enterprise\util\io\WindowsRemoteFile.java
A       src\main\java\com\sun\enterprise\util\io\WindowsRemoteFileCopyProgress.java
A       src\main\java\com\sun\enterprise\util\io\WindowsRemoteFileSystem.java
M       pom.xml
M       src\main\java\com\sun\enterprise\universal\glassfish\TokenResolver.java

to this:

       jar cvfM comm-util-3.1.2.save.jar src\main\java\com\sun\enterprise\universal\process\WindowsCredentials.java src\main\java\com\sun\enterprise\universal\process\WindowsException.java src\main\java\com\sun\enterprise\universal\process\WindowsRemoteAsadmin.java src\main\java\com\sun\enterprise\universal\process\WindowsRemotePinger.java src\main\java\com\sun\enterprise\universal\process\WindowsRemoteScripter.java src\main\java\com\sun\enterprise\util\io\WindowsRemoteFile.java src\main\java\com\sun\enterprise\util\io\WindowsRemoteFileCopyProgress.java src\main\java\com\sun\enterprise\util\io\WindowsRemoteFileSystem.java pom.xml src\main\java\com\sun\enterprise\universal\glassfish\TokenResolver.java

Now  I simply run the script and email the jar file to my work email account.  My company will be happy to guarantee safety for my jar file. 


About

ByronNevins

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today