[Cialug] Subversion

Carl Olsen carl-olsen at mchsi.com
Mon May 21 17:11:47 CDT 2007


The error I got was related to "htdocs" and that one is created during the
apache install.  I have a feeling it's related to permissions.  I probably
need to play with it more before asking too many questions.  I should have
thought of that.  I really don't have any of my own files in that folder.
All of my stuff in subfolders under it or in folders outside the web root.
My problem is most likely related to including the web root in my project.
I'll give it another try tomorrow.

I think I almost have it.  I've been using CVS and it works differently.
CVS versions individual files and it doesn't care where they are located.
Subversion wants to control the entire folder and I'm sure that's why I'm
having this problem.

Thank you!

Carl

-----Original Message-----
From: cialug-bounces at cialug.org [mailto:cialug-bounces at cialug.org] On Behalf
Of Nathan Stien
Sent: Monday, May 21, 2007 2:44 PM
To: Central Iowa Linux Users Group
Subject: Re: [Cialug] Subversion

On 5/21/07, carl-olsen at mchsi.com <carl-olsen at mchsi.com> wrote:
> I'm trying to figure out how to use Subversion.  I have version 1.4.3
installed on Windows XP Professional and I have Tortoisesvn installed.  I
created a repository at "C:\svn\apache2" and I imported the "C:\apache2"
folder into it.  I'm sure that was mistake because that is where I have
Apache 2.2.x installed.  The reason I tried to do it that way is because I
have two folders where I keep my working files "htdocs" and "phpinclude" and
I want to be able to have them both open in Zend Studio 5.5 at the same
time.
>
> When I open Zend and try to checkout the files, I get an error message
saying it cannot add the directory "htdocs" because it already exists.
Obviously, it does exist because that's where I imported the files from.
>
> Is there some way I can set this up so that it only versions the files and
folders I want to version and ignores the rest, as well as allowing me to
keep my working directory the same as the web root for Apache (and my
"phpinclude" folder which is outside the web root)?
>

I might recommend you do something like:

Keep your project in a separate place, such as c:\projects\myproject
with children \htdocs and \phpinclude.  Use SVN to version
c:\projects\myproject. Then edit your apache config to point at the
relevant dirs by whatever means makes sense for your project.  (It's a
pity you can't just use symlinks!)

However, I am not a PHP expert and I've never touched Zend Studio or
even tried to run Apache on Windows, so my advice comes with a free
packet of salt.

But whatever you do, I advise against just having your entire apache
root in SVN.  You might one day have a different project on the same
server which you would want to version separately.  And you might want
to take care not to expose your hidden .svn control directories to the
world in case they include something sensitive.

As for not including everything when importing, I sometimes find it
easier to just create the directory on the repository directly (you
can do this with the TortoiseSVN repo browser) and then check it out
to my desired working directory.  Then I add my relevant files
explicitly and commit the adds.  Perhaps there is some more clever way
to do this, so I'd love to hear ideas from anyone else.

Another important thing to understand is that importing a directory
does NOT make it a working copy.  Only a checkout creates a working
copy, so when you try to checkout in Zend studio it's trying to create
a full working copy on top of your unversioned apache dirs.

The idea is that in general you do this:

  import original directory
  check out to new working directory with a different name

or you can do:

  import original dir
  rename original to something else
  check out to new working dir with original name

Importing just copies stuff into your repository.  It does not create
the .svn control directories or otherwise write anything to the tree
you just imported.

Hope this helps!

-- 
Nathan P. Stien
Consulting Engineer / Software Developer
Embedded Systems Electronics and Software
http://linkedin.com/in/nathanstien
Mobile: 309.241.2581
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug



More information about the Cialug mailing list