Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Link local repository files to website
Link local repository files to website [message #652079] Wed, 02 February 2011 15:51 Go to next message
rob  is currently offline rob Friend
Messages: 4
Registered: February 2011
Junior Member
Hi,

I have eclipse classic running with subversion to keep track of changes (eventually within a team) to various html/css/php files for websites.

I've setup the repository and I'm able to checkout local projects and commit them etc. At the moment I'm just ftp'ing files down from the website hosting, putting them into eclipse and keeping track of versions etc that way.

My goal is to cut that out and link everything directly to the live files on the website.

So, I can see the live files in my eclipse project, when I make a change it keeps track of the versions, and when I commit the files go live to the website.

How can I do this? Please bare in mind I'm a complete novice at this so it'll have to be step by step!!

Cheers.
Re: Link local repository files to website [message #652100 is a reply to message #652079] Wed, 02 February 2011 16:50 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 02-Feb-11 08:51, rob wrote:
> Hi,
>
> I have eclipse classic running with subversion to keep track of changes
> (eventually within a team) to various html/css/php files for websites.
>
> I've setup the repository and I'm able to checkout local projects and
> commit them etc. At the moment I'm just ftp'ing files down from the
> website hosting, putting them into eclipse and keeping track of versions
> etc that way.
>
> My goal is to cut that out and link everything directly to the live
> files on the website.
>
> So, I can see the live files in my eclipse project, when I make a change
> it keeps track of the versions, and when I commit the files go live to
> the website.
>
> How can I do this? Please bare in mind I'm a complete novice at this so
> it'll have to be step by step!!
>
> Cheers.

You've chosen Eclipse as an IDE for web sites?

If I understand correctly, you've got a Subversion repository that's
local to your hardware and you're accessing that from Eclipse (probably
using Subclipse)? If you've already got that set up, then have you just
not used Subversion (svn on Linux, TortoiseSVN on Windows) to check out
a copy of your sources from the remote Subversion server?

Once you check your code out to the local filesystem, it's a simple
matter to import the projects into Eclipse and everything works just as
you appear to have been doing?

Which part of what you want to learn do I not understand?

Russ Bateman
Re: Link local repository files to website [message #652103 is a reply to message #652100] Wed, 02 February 2011 17:05 Go to previous messageGo to next message
rob  is currently offline rob Friend
Messages: 4
Registered: February 2011
Junior Member
Thanks for replying Russ.

Quote:
If I understand correctly, you've got a Subversion repository that's
local to your hardware and you're accessing that from Eclipse (probably
using Subclipse)?


Yep that's correct.

Quote:
If you've already got that set up, then have you just
not used Subversion (svn on Linux, TortoiseSVN on Windows) to check out
a copy of your sources from the remote Subversion server?


I've got the svn going but I just don't know what I'm doing really!! This is where my lack of knowledge with the whole thing comes in!!

I want to be able to commit my files to the webhost so anything I change goes live straight away. I.e the project in eclipse is in sync with what's live on the website.

The previous web company I worked at had this setup and it worked well. The problem being it was setup by a developer who I can't get in touch with anymore.

It just means I won't have to ftp files up and down every time I want to change something.

Cheers.
Re: Link local repository files to website [message #652105 is a reply to message #652103] Wed, 02 February 2011 17:05 Go to previous messageGo to next message
rob  is currently offline rob Friend
Messages: 4
Registered: February 2011
Junior Member
By the way, I'm running this on a mac.
Re: Link local repository files to website [message #652109 is a reply to message #652079] Wed, 02 February 2011 17:21 Go to previous messageGo to next message
Bill Mote is currently offline Bill MoteFriend
Messages: 10
Registered: February 2011
Junior Member

It sounds like, without being mean, you're doing it backwards. What you need to do is make sure your SVN repo has the latest copy -- same as your web site.

Then you checkout the files from your repository, update them, commit them back into your repo and publish them to your website.

There's no need to pull them from the web server first since your repository should always have the latest copy.

Bill
Re: Link local repository files to website [message #652110 is a reply to message #652079] Wed, 02 February 2011 17:27 Go to previous messageGo to next message
Bill Mote is currently offline Bill MoteFriend
Messages: 10
Registered: February 2011
Junior Member

I should also note that you can use branching/tagging to your favor as well.

On the day you publish your files to the web server from the trunk of your repository you should consider doing the following:

1. Create a RB-version.number in the branches/ subdirectory of your project.

2. Create a ReleaseAs-version.number in the tags/ subdirectory of your project.

Here's why:

You continue to do new development in trunk/, but say someone finds a minor bug. Your new development isn't refined enough for primetime and the bug is easy to fix. You just checkout your brances/RB-version.number to your workspace, fix the bug, commit the changes and publish.

This kept your "new" development work from being put into production before it was ready but still got the bug fixed.

Now your branches/RB-version.number is what is in production. You keep developing on trunk/ and as a failsafe you have a tags/ReleasedAs-version.number copy of your code that NEVER gets edited. You can always fall back to that if need be.

Make sense?

Bill Mote
Re: Link local repository files to website [message #652111 is a reply to message #652103] Wed, 02 February 2011 17:25 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 02-Feb-11 10:05, rob wrote:
> Thanks for replying Russ.
>
> Quote:
>> If I understand correctly, you've got a Subversion repository that's
>> local to your hardware and you're accessing that from Eclipse
>> (probably using Subclipse)?
>
>
> Yep that's correct.
>
> Quote:
>> If you've already got that set up, then have you just not used
>> Subversion (svn on Linux, TortoiseSVN on Windows) to check out a copy
>> of your sources from the remote Subversion server?
>
>
> I've got the svn going but I just don't know what I'm doing really!!
> This is where my lack of knowledge with the whole thing comes in!!
>
> I want to be able to commit my files to the webhost so anything I change
> goes live straight away. I.e the project in eclipse is in sync with
> what's live on the website.
>
> The previous web company I worked at had this setup and it worked well.
> The problem being it was setup by a developer who I can't get in touch
> with anymore.
>
> It just means I won't have to ftp files up and down every time I want to
> change something.
>
> Cheers.

So, you need to create a repository for your web site files.

You first need such access to a repository. Do you have that? If it's
your own repository, then I can help. If you have to deal through an
administrator, then it's best to ask him or her how best to proceed.

Russ
Re: Link local repository files to website [message #652112 is a reply to message #652079] Wed, 02 February 2011 17:33 Go to previous messageGo to next message
Bill Mote is currently offline Bill MoteFriend
Messages: 10
Registered: February 2011
Junior Member

P.P.S (sorry if I'm in the way Russ),

In the scenario I outlined above you'd merge your changes in the branches/RB-version.number branch into trunk/ so you'd benefit from fixing the bug 1 time and not letting it be re-introduced when you eventually publish trunk/.

Russ asked about your repo. There are 2 descent free offerings that I'm using:

assembla.com -- unlimited projects and team members: free

beanstalkapp.com -- unlimited projects, 1 user: free

Both are secure to you (and your team where appropriate) and work perfectly with Subclipse plugin.

Bill Mote
Re: Link local repository files to website [message #652114 is a reply to message #652105] Wed, 02 February 2011 17:31 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 02-Feb-11 10:05, rob wrote:
> By the way, I'm running this on a mac.

It's okay. There, you'll be using command-line Subversion. It's a
utility named "svn".

For example, you'll see how to import sources under a project here. I
give you this link while waiting to find out more about your repository.

http://www.javahotchocolate.com/tutorials/subversion.html#st ructure
Re: Link local repository files to website [message #652116 is a reply to message #652079] Wed, 02 February 2011 17:43 Go to previous messageGo to next message
Bill Mote is currently offline Bill MoteFriend
Messages: 10
Registered: February 2011
Junior Member

That's a very nice writeup you have. I have 1 question: Should this command:
svn import project file://localhost/home/svn/project-name -m "Initial import"

actually be:
svn import project file://localhost/home/svn/project-name/trunk -m "Initial import"


Bare with me. I'm trying to be helpful and learn all at the same time ...

Kind Regards,

Bill Mote
Re: Link local repository files to website [message #652118 is a reply to message #652112] Wed, 02 February 2011 17:44 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

Rob,

Neither site is free. They're only free for a limited time.

If you have a place to do it (Linux or Mac) and are interested, you can
set this up for yourself. It's a fair amount of work, but doable.

Russ



On 02-Feb-11 10:33, Bill Mote wrote:
> P.P.S (sorry if I'm in the way Russ),
>
> In the scenario I outlined above you'd merge your changes in the
> branches/RB-version.number branch into trunk/ so you'd benefit from
> fixing the bug 1 time and not letting it be re-introduced when you
> eventually publish trunk/.
>
> Russ asked about your repo. There are 2 descent free offerings that I'm
> using:
>
> assembla.com -- unlimited projects and team members: free
>
> beanstalkapp.com -- unlimited projects, 1 user: free
>
> Both are secure to you (and your team where appropriate) and work
> perfectly with Subclipse plugin.
>
> Bill Mote
Re: Link local repository files to website [message #652123 is a reply to message #652079] Wed, 02 February 2011 17:50 Go to previous messageGo to next message
Bill Mote is currently offline Bill MoteFriend
Messages: 10
Registered: February 2011
Junior Member

It's just a twisty maze ...

This is the Direct Link to the Assembla 100% free, not a trial offering.

This plan is called a "Trial Plan," but it is not time limited.

Still, Russ has a fabulous write up on getting it up and running and running a repository locally is a perfectly good solution.

Bill Mote
Re: Link local repository files to website [message #652125 is a reply to message #652116] Wed, 02 February 2011 17:47 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 02-Feb-11 10:43, Bill Mote wrote:
> That's a very nice writeup you have. I have 1 question: Should this
> command:
> svn import project file://localhost/home/svn/project-name -m "Initial
> import"
> actually be:
> svn import project file://localhost/home/svn/project-name/trunk -m
> "Initial import"
>
> Bare with me. I'm trying to be helpful and learn all at the same time ...
>
> Kind Regards,
>
> Bill Mote

Maybe. I'm far from the brightest crayon in the box. For now, it works
fine for what I'm doing. And, yes, the result did fall under trunk, so
I'm not certain what adding trunk to the path would
accomplish/change/improve/whatever. And I'm not in a position to play
with this right now since I'm at work behind a fairly strict firewall.

Russ
Re: Link local repository files to website [message #652127 is a reply to message #652125] Wed, 02 February 2011 18:02 Go to previous messageGo to next message
Bill Mote is currently offline Bill MoteFriend
Messages: 10
Registered: February 2011
Junior Member

Me neither! Mine was a question not a statement of fact posed as a question (as the trolls would typically do). I just thought there might be a typo. I like what you have posted!

I've been working with a new developer that's many states away. He has an affinity for dumping his project source in the /projectname folder and hasn't fully grasped the benefits to using /trunk, /branches and /tags. Given Rob's opportunity to setup something new I just didn't want him constrained by not getting /trunk.

It may be that svn handles that under the covers. I have no idea Smile
Re: Link local repository files to website [message #652227 is a reply to message #652079] Thu, 03 February 2011 09:13 Go to previous messageGo to next message
rob  is currently offline rob Friend
Messages: 4
Registered: February 2011
Junior Member
Thanks for all the reply's guys.

I followed this tutorial:

http://www.rubyrobot.org/tutorial/subversion-with-mac-os-x

Down to creating a sample project.

As far as I can see, there's no link between my local repository and the web hosting files (hence the ftp'ing up and down). I just want to create that link so whatever is in the local repository is in the web hosting.

At the moment, I've found that if I just ftp down the file I need, copy it into my workspace, it keeps all the history of that file (which is the most important bit!). Then when I'm done, ftp it back to the web hosting.

Whether this is the best solution I'm not sure. This all came about from a team of 4 web designers working on the same project, someone worked on a file and messed it up completely and now there's lot's of finger pointing as to who did it! No one can remember exactly what they worked on since the project is so big. Hence, I just want to cover my back and be able to prove what I've done and when.

Cheers.
Re: Link local repository files to website [message #652910 is a reply to message #652079] Mon, 07 February 2011 15:02 Go to previous messageGo to next message
Armand Krijgsman is currently offline Armand KrijgsmanFriend
Messages: 2
Registered: February 2011
Junior Member
Sorry for highjacking this thread, but since it is close to what I am looking for I will do Wink

Currenlty I work on a remote dev server using dreamweaver.
This is my personal development envoriment, not my production enviroment.

Using Dreamweaver it is "upload on save".

Now I am investigating Eclipse and it seems a lot of what I do can be done in it. What I wish to do is the following.

1. Create a project, based on a remote FTP.
(Got this workling with a remote file system )
The auto-save part is covered by switching to the Team Synchronizing view.

2. I also created a project based on a empty SVN repository.
No problems working with this either.

But the problem I have is the following.
Either 1 or 2 comes with the loss of the other.
Is there a way to connect the remote file systemem with the Team SVN commit functionality?

As soon as I wish to commit something from my project (dev server) to my repo, it would be nice to do all this from within Eclipse.

Is this possble?

Kind regards,
Armand
Re: Link local repository files to website [message #652915 is a reply to message #652079] Mon, 07 February 2011 15:16 Go to previous messageGo to next message
Bill Mote is currently offline Bill MoteFriend
Messages: 10
Registered: February 2011
Junior Member

I understand the desire to to sync/commit/publish in 1 step, but I don't know how to accomplish it.

Once you have ProjectName/trunk open in the code perspective you would do any sync/commits from the Team Sync perspective to get the updates into your repository. Then publish your code to your web server from your code perspective. Your development environment sits in the middle as a broker of those transactions. I'm not sure why that's a big deal?

What if you are working on something and want to commit your changes but the sum of the work you must do exceeds 1 working session? If your live code were tied in some way directly to your repository you wouldn't be able to do that without breaking your production site.

I'm no expert, but I would caution against having your production environment linked directly to your project trunk in the repository. The act of deciding and the steps taken to publish your work are deliberate and worthwhile.

It's just one man's opinion ... and you know what they say about opinions: they're like bellybuttons; everyone has one, some stink more than others.

Bill Mote
Re: Link local repository files to website [message #652924 is a reply to message #652079] Mon, 07 February 2011 16:09 Go to previous message
Armand Krijgsman is currently offline Armand KrijgsmanFriend
Messages: 2
Registered: February 2011
Junior Member
Thanks for your opinion Bill.
I guess I stick with Dreamweaver for now.

I found out how to use SVN from there (pretty easy)
So switching doesn't make real sense at the moment Wink



Previous Topic:eclipse m2eclipse vaadin
Next Topic:install all parts offline I have most parts done Missing (platform tools)
Goto Forum:
  


Current Time: Fri Apr 26 05:44:17 GMT 2024

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

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

Back to the top