aspose file tools*
The moose likes General Computing and the fly likes Application maintenance (source control) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Application maintenance (source control)" Watch "Application maintenance (source control)" New topic
Author

Application maintenance (source control)

kumar thokkala
Greenhorn

Joined: Apr 12, 2004
Posts: 24
I am developing an application using JSP's/servlets on tomcat and i want to know how do you maintain backup copies of the application.
Someone suggest me on this. OS is windows, webserver is tomcat/iPlanet, DB is Oracle.
PS: If this is not the right forum for this post, please let me know where can I get the answer.
Thanks guys.
[ April 15, 2004: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

What do you mean by "backup copies". Do you mean source control?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
kumar thokkala
Greenhorn

Joined: Apr 12, 2004
Posts: 24
I want to maintain copies of old versions of the application.
Whenever major changes are made to the application I want to store the old version of the application. I mean a source code control system, where Ican keep track of versions, change history, etc.?
kumar thokkala
Greenhorn

Joined: Apr 12, 2004
Posts: 24
I have window NT workstation and no UNIX/LINUX box, so please suggest how should I go from here to get some free software that helps me maintain my application. I mean if made a major change in application and felt that it is not good, I should be able to go back to old version. Right now I do the dumb way i make copies of application on regular dates, which is alright as my application is small, but I want to know how you professionals do it.
thanks for your help and direction.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
there's many version control systems out there, cost ranging from nothing to thousands of Euros a pop.
Functionality also differs greatly, as does philosophy.
http://www.pragmaticprogrammer.com/starter_kit/vc/index.html is a good book to start learning about version control using free tools which are available for Windows as well.


42
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

Not much to do with JSP per se, so I'm moving this off to the General Computing forum. I also augmented the subject to hopefully get you more hits.
[ April 15, 2004: Message edited by: Bear Bibeault ]
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Perforce is a great version control system.
http://www.perforce.com/
I am pretty sure you can download a free version of it that supports like 1 workstation or similar.
Also, check out the documentation on their site too, they have some informative whitepapers regarding version control theory, best practices etc.
kumar thokkala
Greenhorn

Joined: Apr 12, 2004
Posts: 24
Guys, I could able to set up CVSNT version control server on my machine and using command prompt to run commands. I will try to use tortoise CVS/WinCVS.
I have a quick question, I have three backup copies of my application which were made in last two months, now I want to use CVSNT and combine them. I mean first I want to import the oldest backup copy into repository and then update it with the next backup copy etc..
so that finally I want to delete all backup copies and checkout the copy from repository. If I am not wrong, from CVS I should be able to get older versions of my appplication( here I should be able to get two version am I right?)....
Now can someone tell how to achieve above task.
Thanks for your time and help
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Well the "pseudo process" for achieving that would be to:
1> import your oldest changes into cvs first
2> tag those files (eg. "origin" or some other meaningful name)
3> open the files for edit
4> copy your next oldest changes over the top
5> commit the changes and make a new tag
6> repeat steps 3-5 for the next oldest changes
Ok, so you are probably going to have to read up on:
"cvs import"
"cvs edit"
"cvs commit"
"cvs tag"
"cvs checkout"
kumar thokkala
Greenhorn

Joined: Apr 12, 2004
Posts: 24
Thanks James.
Yes after posting my query, I tried in the same lines and could able to do that.
I have 2 questions,
- I couldn't able to use tag's. Could you please throw some light on how to use tags?
- How can I check versiions of a module? Right I checkout the with date criteria (-D date), but its messy to use, so I was wondering if I can checkout files with revision or tag options.
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Hi Kumar,
this is pretty much the definitive resource for cvs.
http://www.cvshome.org/
There's a good section on revisions:
http://www.cvshome.org/docs/manual/cvs-1.11.15/cvs_4.html#SEC44
The basics would be to:
- assume you have checked out a working version of your module
eg. cvs checkout "module1"
- within your working directory of your module, issue the tag command
eg. cvs tag "release1" .
- then you can use the tag "release1" to check out your module at some later point
eg. cvs checkout -r "release1" "module1"

James.
kumar thokkala
Greenhorn

Joined: Apr 12, 2004
Posts: 24
Guys I got it....
I am posting the steps I followed here..
--------------------------------------------------------------
Working directory Root = WRoot
1. change directory to Oldest (say Old1), then run step1
[First time import, with no module on repository [with Oldest copy]]
cvs import -m "Message to log" ModuleName TagName
2. change directory to next Oldest (Say Old2) running the following
[To update the module with next oldest copy [not from checkedout copy, from next oldest copy]]
cvs import -m "Message to log" ModuleName NewTagName
repeat step 2 for all backup copies....

Now if you want to checkout any release you imported/updated, use the following commands
after changing directory to WRoot
To checkout:
cvs checkout -P -r TagName -d NewDirectoryName ModuleName
To export: [You will get a copy of module iwth no CVS stuff in it]
cvs export -r TagName -d NewDirectoryName ModuleName

Note:
TagName=releaseName

The one thing this won't do is remove files that were removed between versions. You need to do this yourself using cvs remove. It's not enough just to delete them from the local folders.
Can someone suggest me a better solution to handle this situation.
 
 
subject: Application maintenance (source control)