Skip to main content



      Home
Home » Newcomers » Newcomers » version control basics?
version control basics? [message #250318] Wed, 27 February 2008 12:03 Go to next message
Eclipse UserFriend
Originally posted by: chundle.hotmail.com

Hello

I have been using Eclipse for several months now to build java libraries
but one thing I have never got straight is how to version control my code.
I don't mean something as sophisticated as CVS since presumably that would
require me to install a CVS server, I'm talking about just a normal "Save
As..."; or even "Backup project to...".

For example, say I have a project called MyProject, which contains a
package called MyProject; which contains several (even many) java class
files -- I would like to do something like "Save Project As..." so that I
can save a new version leaving the previous one untouched -- this would
save everything that is contained within a project include references to
other jars, etc..

At the moment, when I try to do "Save as" that is only allowed for each of
the individual java files, which takes a long time to do (and which, when
I need to revert to a previous version means making a new project, adding
all the relevant classes, jars, etc. again a tedious process). Either that
or just manually finding my workspace on my hard drive and copying it to a
new location -- but then it doesn't get recognised as a "project".

I may be going about this in completely the wrong way; I would appreciate
some suggestions.

Thanks

CH
Re: version control basics? [message #250327 is a reply to message #250318] Wed, 27 February 2008 12:19 Go to previous messageGo to next message
Eclipse UserFriend
Hey Charles,

I am not a 100% sure but as long as you stay local, you don't need a
running cvs server.

My setup is actually based on subversion, I am a single user, with my
repository on a small USB stick (how often do these actually fail???),
working copy on disk. Here too, no need for running a server, the
appropriate processes only get invoked when needed. If you use windows,
try tortoise svn or for directly rockin from eclipse: subversive.

As for your other ideas, you can do "File->Export->..." is that what you
need? But then you'd always need to enter filenames or so.

Another solution is to use Ant for such things, which could decorate
filenames with timestamps and automate more stuff.

I'd go for subversion, because it works great also in single-user
environments and is definitely better than a hundred zip-files that have
90% in common. Honestly I worked once with a guy who had more than 10
workspaces just for backing up / branching / merging...

Hope I could help.
Felix
Re: version control basics? [message #250331 is a reply to message #250327] Wed, 27 February 2008 12:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chundle.hotmail.com

Thanks for the quick reply.

I can see how SVN would be the way to go in the long run; but Eclipse's
"Local History" feature deals with a lot of that since you can browse
through "versions" of the same file.

I'm looking for something where I can basically say ok, Save As: Version
1.0, for public release; now let me start working on a fresh set of
documents as Version 1.1, which isn't yet ready for public release.

I see that I might just have to bite the bullet and get going on SVN.....

Thanks again.
Re: version control basics? [message #250335 is a reply to message #250331] Wed, 27 February 2008 12:33 Go to previous messageGo to next message
Eclipse UserFriend
Charles wrote:
> Eclipse's
> "Local History" feature deals with a lot of that since you can browse
> through "versions" of the same file.

Cool, I didn't ever see that...

> I see that I might just have to bite the bullet and get going on SVN.....

My little brother just started to use svn and was quite pissed after a
while, but as he's my brother I know why :-P. I'm sure he didnt rtfm.
Take yourself a few hours to read a few chapters from the svn redbook to
enjoy working with it.

Felix
Re: version control basics? [message #250353 is a reply to message #250331] Wed, 27 February 2008 13:24 Go to previous messageGo to next message
Eclipse UserFriend
Charles wrote:
> Thanks for the quick reply.
>
> I can see how SVN would be the way to go in the long run; but Eclipse's
> "Local History" feature deals with a lot of that since you can browse
> through "versions" of the same file.
> I'm looking for something where I can basically say ok, Save As: Version
> 1.0, for public release; now let me start working on a fresh set of
> documents as Version 1.1, which isn't yet ready for public release.
> I see that I might just have to bite the bullet and get going on SVN.....

Yes, that or CVS. It's not terribly difficult to set up a local CVS
server and that (or using SVN) is really the direction you want to
head in. https://bugs.eclipse.org/bugs/show_bug.cgi?id=6892 has
comments and suggestions for connecting to a local server on your
machine.

---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational
Re: version control basics? [message #250385 is a reply to message #250318] Thu, 28 February 2008 08:20 Go to previous messageGo to next message
Eclipse UserFriend
On Wed, 27 Feb 2008 17:03:57 +0000 (UTC), chundle@hotmail.com
(Charles) wrote:


>
>For example, say I have a project called MyProject, which contains a
>package called MyProject; which contains several (even many) java class
>files -- I would like to do something like "Save Project As..." so that I
>can save a new version leaving the previous one untouched -- this would
>save everything that is contained within a project include references to
>other jars, etc..

As long as you don't mind doing a little typing or clicking every time
you need a new version, there is nothing wrong with copying your
project directory to some other location (and renaming it to identify
the version). If you want this version to show up in a workspace you
would have to import it (using "Import from existing project").

Achim
Re: version control basics? [message #250391 is a reply to message #250385] Thu, 28 February 2008 12:36 Go to previous messageGo to next message
Eclipse UserFriend
Achim Lörke wrote:
> On Wed, 27 Feb 2008 17:03:57 +0000 (UTC), chundle@hotmail.com
> (Charles) wrote:
>
>
>> For example, say I have a project called MyProject, which contains a
>> package called MyProject; which contains several (even many) java class
>> files -- I would like to do something like "Save Project As..." so that I
>> can save a new version leaving the previous one untouched -- this would
>> save everything that is contained within a project include references to
>> other jars, etc..
>
> As long as you don't mind doing a little typing or clicking every time
> you need a new version, there is nothing wrong with copying your
> project directory to some other location (and renaming it to identify
> the version). If you want this version to show up in a workspace you
> would have to import it (using "Import from existing project").
>
> Achim
You can also export the project to a zip file instead of a directory.
This is an easy way to take snapshots and get poor-man's version
control. If you are going to use Eclipse's history feature for this, you
might want to increase the default values for Local History in
Window/Preferences/Workspace/Local History. Mark
Re: version control basics? [message #250403 is a reply to message #250391] Thu, 28 February 2008 16:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Mark Dexter wrote:
> Achim Lörke wrote:
>> On Wed, 27 Feb 2008 17:03:57 +0000 (UTC), chundle@hotmail.com
>> (Charles) wrote:
>>
>>
>>> For example, say I have a project called MyProject, which contains a
>>> package called MyProject; which contains several (even many) java
>>> class files -- I would like to do something like "Save Project As..."
>>> so that I can save a new version leaving the previous one untouched
>>> -- this would save everything that is contained within a project
>>> include references to other jars, etc..
>>
>> As long as you don't mind doing a little typing or clicking every time
>> you need a new version, there is nothing wrong with copying your
>> project directory to some other location (and renaming it to identify
>> the version). If you want this version to show up in a workspace you
>> would have to import it (using "Import from existing project").
>>
>> Achim
> You can also export the project to a zip file instead of a directory.
> This is an easy way to take snapshots and get poor-man's version
> control. If you are going to use Eclipse's history feature for this, you
> might want to increase the default values for Local History in
> Window/Preferences/Workspace/Local History. Mark


Warning: DO NOT reply on Local History as a version control system. It
is very limited in both features and durability. It is NOT an archival
system, only a convenience mechanism for easily backing out or comparing
recent changes.
Really, CVS and Subversion are not very difficult to set up. Do you have
a web hosting account? Many of them include CVS or SVN support. There
are also a lot of really cheap or free CVS hosting services out there.
For example:
http://www.google.com/search?q=cvs+hosting

And there's always sourceforge and java.net

Seriously, you want real source control, not Local History.

Eric
Re: version control basics? [message #250463 is a reply to message #250403] Fri, 29 February 2008 08:24 Go to previous message
Eclipse UserFriend
Originally posted by: chundle.hotmail.com

Many thanks for all the replies and suggestions. CVS here I come!
Previous Topic:deploying with ssh
Next Topic:Example project as new plugin
Goto Forum:
  


Current Time: Wed May 07 15:20:03 EDT 2025

Powered by FUDForum. Page generated in 0.10708 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top