Using codelite + subversion + sftp + PHP coding environment

General questions regarding the usage of CodeLite
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by eranif »

Kanes wrote:Is there a step by step how-to for setting up a coding environment even just for a basic PHP project with version control using Subversion?
Simply checkout your sources (using any svn client), setup a workspace from an existing sources and it will work... (the svn view will adjust itself once the workspace is loaded to the workspace folder)
and from there, the svn view is _always_ updated (e.g. when saving a file, you will it as modified in the svn view)

Try the latest weekly, it should contain more functionalities
See this answer (which I answered for C++ and Svn, but the concept remains)
http://stackoverflow.com/questions/1841 ... subversion

And checkout the Subversion plugin docs here:
http://codelite.org/LiteEditor/Subversion

Notice that the Subversion plugin in the docs is a bit outdated (e.g. the 'Svn' tab is now part of the "Output View" and not of the "Workspace View")
but the concept is the same

Eran
Make sure you have read the HOW TO POST thread
Kanes
CodeLite Enthusiast
Posts: 30
Joined: Tue Jun 09, 2015 12:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by Kanes »

Well, now I did find the context menu.

I'm still having hard time trying to set up the project in such a way that I could easily check out files, commit changes to them (possibly in different projects) and have my changes uploaded to the testing server without having to click a bit here and there to change the folders etc each time. Perhaps I should just have one big tree in one SVN repository and a matching structure under one project within the workspace?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by eranif »

Kanes wrote:Perhaps I should just have one big tree in one SVN repository and a matching structure under one project within the workspace?
This is how I am working: everything is under a single tree.

Maybe if you could illustrate your use case in a more "graphical" way, it will be easier to understand the problem

Eran
Make sure you have read the HOW TO POST thread
Kanes
CodeLite Enthusiast
Posts: 30
Joined: Tue Jun 09, 2015 12:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by Kanes »

Yeah, I'll try that, at the moment I'm trying another approach to the setup

The software consists of system components and different sites using the components.

The layout I'm committing to SVN now is, into one repository

system/ -folder, which would be imported into the workspace as the System project, I suppose
and

sites/ as System project
which has multiple sites, each of these could be used as a separate project, if possible, say

sites/sitea.tld as Site Project A
sites/siteb.tld as Site Project B

so in the CodeLite workspace I'll end up having 1 ..n different projects, between which I'll have to switch regularly.
Now that they are all in the same repository, I suppose this might actually work if I manage to check them out initially into the correct folder. (The workspace and project folder structure + "use separate folder" - checkbox in Codelite aren't quite obvious to me yet)

Hopefully in my local filesystem I would end up having something line
Documents/Codelite Workspace Folder
under which I'd have a folder for System, Site Project A and Site Project B.

I'll see where I get with this approach.
Kanes
CodeLite Enthusiast
Posts: 30
Joined: Tue Jun 09, 2015 12:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by Kanes »

Ok, now this approach works well enough within Codelite / local filesystem + SVN; apparently I'll have to click on the project Subversion context menu and choose Watch this project when I wish to commit my changes; fair enough.
Now for the FTP part: can I define different FTP locations / directories per project? If not, this approach won't work for the FTP / testing server setup, as the Sites and System -projects may not be located under the same directory on the server.

Then again, I might be able to circumvent this on the server side with a symlink/directory mount/whatnot, in which case: how are the local projects mapped to directory names for FTP?
Or how is this supposed to work?
Kanes
CodeLite Enthusiast
Posts: 30
Joined: Tue Jun 09, 2015 12:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by Kanes »

Hi again,
was a bit hasty here, I actually figured this out myself. I revamped the local directory structure to match that of the server (after setting up the common root folder) and the automatic upload does in fact seem to work.

Thanks for your help, I'll try getting my hands on this setup to see how it performs for actual development now :)

Altough now that I just moved the directories around manually which messed up the SVN, I suppose. And trying to check out again crashed Codelite entirely.
Perhaps I'll just try setting everything up once again from the beginning and see if it works.
Last edited by Kanes on Tue Jun 16, 2015 3:06 pm, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by eranif »

The SFTP mirroring is assuming that you have the same directory structure on the remote and local machine, if this is not the case, then it won't work.
Tweaking are needed, but I guess that a better way is to file a feature request: per-project SFTP settings (should be pretty straight forward to implement)

Eran
Make sure you have read the HOW TO POST thread
Kanes
CodeLite Enthusiast
Posts: 30
Joined: Tue Jun 09, 2015 12:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by Kanes »

Yes,
I got things structured into a working order.

Now, is it possible to detach the output pane (to move it to another display)?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by eranif »

Did you try to "pull" it by capturing it from its caption bar?

Eran
Make sure you have read the HOW TO POST thread
Kanes
CodeLite Enthusiast
Posts: 30
Joined: Tue Jun 09, 2015 12:21 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using codelite + subversion + sftp + PHP coding environm

Post by Kanes »

eranif wrote:Did you try to "pull" it by capturing it from its caption bar?

Eran
Yes.
The whole pane doesn't move at all, and pulling tabs create .textClipping -files on my desktop.
But I suppose you knew this already?
Post Reply