[Cialug] Subversion

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


It actually did dump an .svn folder into my working directory, so I'm not
sure I can't do it the way I'm trying to do it.  I'll experiment with it
more tomorrow and see if it is just the htdocs folder that is causing the
problem because of permission settings or if it's more than that.  There are
also some files in that folder that get created during the apache install
and I have a feeling those files are also going to cause problems.  I won't
include that folder (htdocs) when I try it again.

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