Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

General Discussions


You are currently viewing our General Discussions as a guest. Please register to participate.
Login



Reply
Version handling of same script?
Old 04-25-2007, 06:16 PM Version handling of same script?
Junior Talker

Posts: 2
Trades: 0
Greetings all,

I think I have a problem when it comes to version handling of same script. For example I have 1 script that is running live and an other that is secured for development doing changes and upgrades etc.
However, sometime I have modified the live version of the script to quickly fix bugs.

The problem is how do I know what files have been changed so that I can easily synchronize live with development site?
So that I have identical versions of the same script....
Hope you understand what I mean since my English is not the best.

Cheers
lummi is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-25-2007, 08:43 PM Re: Version handling of same script?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
What your looking at may be a subset of a revision control server.
If you heard of it, CVS, or Subversion are 2 of the most known of them.
A RCS program allows you to "commit" modifications of your work, and merge it with other modifications done by other peoples.

Definition and capabilities of RCS programs:
Think about multiples web dev. working on the same PHP application here.
One working on a part of the project can update his sources to incorporate what others have done, and he can commit his work, which will allows others peoples to get it too next time they will make an update.

What makes RCS programs a real killer, even when you're working alone, is that they allows you to get a snapshot of your application at any given time.
For example, you can ask the server to update your source to the state they where 3 days ago, spot a change that was done in the mean time, export a patch to be applied against the current source, revert to the actual state and re-incorporate the patch in your file.

This saved me numerous times, when I had updated the productions server with a file not ready for production.
I simply asked the server for the previous "ok" version to get it running back ok.

I even keep some important files under that. Like my SSH keys, my linux configurations scripts, my firefox bookmarks and so on.
Like that, I can always get an up to date version of those files anywhere I've got a net connectivity.

Anyway, back to your question:

If you want to compare the differences between 2 files, you could simply use a "diffing" program.
It will load the 2 versions of your file, and show you where are the differences between them.

On windows, I've used winmerge in the past:


In your case, it would surely be easier than setting up a CVS server.

But if you want to go that way, ask me, as I've implemented both CVS and subversion on my server, and I'm using them daily.

Links:
http://winmerge.org/
http://drupal.org/node/324
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 04-25-2007 at 08:44 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 04-25-2007, 10:22 PM Re: Version handling of same script?
Junior Talker

Posts: 2
Trades: 0
Greetings Tripy,

Thanks for the very extensive and informative reply!
Because of the massive script, over 600 php and smarty template files all togheter, I think comparing files with Beyond compare or other programs goes away bigtime.

I actually had my eyes on CVS but I did not install it since it wasn't straight forward to install and configure. I am running a Ubuntu box and since we are 2-3 people working with the script, CSV is the way to go.
However I can not figure out why use CSV and Subversion simultaneously or do you mean the one or the other?

Cheers!
lummi is offline
Reply With Quote
View Public Profile
 
Old 04-26-2007, 03:48 AM Re: Version handling of same script?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Just as a side note, winmerge can make directory compare too.
You give hime 2 dirs, and it'll show you the missing or added files, and which one have differences.
Quote:
However I can not figure out why use CSV and Subversion simultaneously or do you mean the one or the other?
no, CVS and subversion are 2 implementations of a revision system.
You'll don't want to work with both. I had implemented both on my server because some customers wanted CVS, but I personally use subversion.

I recommand you to go CVS rather than subversion.
It's older, and almost all dev. programs have support for it.

I have found this page:
http://www.diba.com/2007/01/21/insta...ntu-or-debian/
about the installation of the cvs server on ubuntu.
I'm on gentoo, so I cannot help much for the installation, but once it's installed, I'll be able to help you with any configuration issues you might have.

Just PM me if you have any problem after the installation, and I'll check it out.
By the way, you might want to get some infos on the CVS way of working.
the ifficial manual is full of good ideas:
http://ximbiot.com/cvs/manual/cvs-1.11.22/cvs.html

Quote:
we are 2-3 people working with the script
Just to make it clear before starting anything, you may want to change the way you work togeteher, if you all work on the same server.
Every people working on the project will need to have his own virtualHost, with his own sources.

When they start the day, they will need to do a "cvs update", to merge the last changes into their source tree.
When they are happy withthe state of what they have done, they can do a "cvs commit" to commit their work in the repository, and let other devs get it.
Whan you will need to have a stable release, you will need to do a "cvs export", to get the source tree free of any CVS control files.

You cannot use this system with everyone working on the same files.
This require a bit of being used to it, but in the long time, it's a real savior.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to Version handling of same script?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.43869 seconds with 12 queries