version control basics? [message #250318] |
Wed, 27 February 2008 12:03  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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 #250403 is a reply to message #250391] |
Thu, 28 February 2008 16:25   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.10708 seconds