make existing web site subversion aware

View: New views
5 Messages — Rating Filter:   Alert me  

make existing web site subversion aware

by csross :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I have an existing web site project that the developers now want to put into subversion.  There is no version control, just an /usr/local/apache2/htdocs/docsite directory.  This is a solaris 10 server.  I have done a useradd –d /home/subversion –m svn, and svncreate create /home/subversion/repos.  I’m working on the apache configuration. 

 

The documentation talks about importing a project?  Do I have to somehow bring this /usr/local/apache2/htdocs/docsite directory into /home/subversion/repos? 

 

I saw this but how would it know what to do with all the files and directories in the current DocumentRoot that contains all the files for the application being put under subversion control?

 

$ cd /home/subversion/repos

$ mkdir myproject_svn myproject_svn/tags myproject_svn/branches

$ mv myproject myproject_svn/trunk

$ svn import myproject_svn http://localhost:8080/svn/repos/myproject

Can I make another directory under repos for that particular project?  Currently my httpd.conf have SVNPath and not SVNParentPath.

Any help is apprecaited?

Thank you


Re: make existing web site subversion aware

by Andrey Repin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greetings, Christine Ross!

> I have an existing web site project that the developers now want to put
> into subversion.  There is no version control, just an
> /usr/local/apache2/htdocs/docsite directory.  This is a solaris 10
> server.  I have done a useradd -d /home/subversion -m svn, and svncreate
> create /home/subversion/repos.  I'm working on the apache configuration.


 

> The documentation talks about importing a project?  Do I have to somehow
> bring this /usr/local/apache2/htdocs/docsite directory into
> /home/subversion/repos?  

Quite, yes. However, not directly.
You have to use "svn" tool to do this for you.

> I saw this but how would it know what to do with all the files and
> directories in the current DocumentRoot that contains all the files for
> the application being put under subversion control?

*You* tell it to do so. :)

> $ cd /home/subversion/repos

> $ mkdir myproject_svn myproject_svn/tags myproject_svn/branches

> $ mv myproject myproject_svn/trunk

No, no and no.

> $ svn import myproject_svn http://localhost:8080/svn/repos/myproject

Once you configured Apache, established all connections and so on, you should
never touch the /home/subversion directory by hands, unless in dire cases,
such as system crash or movement to the new server.

> Can I make another directory under repos for that particular project?
> Currently my httpd.conf have SVNPath and not SVNParentPath.

> Any help is apprecaited?

First, and foremost - read the http://svnbook.org/ in a whole. No excuse for
you if you didn't. Aside from being very informative, it is a very good
reading.

Second, to the "can i ..." - you can. How, exactly? Depends on your
Apache-Subversion configuration.

And third, you do not need to create trunk/branches/tags by hands.
Subversion can create trunk for you if you tell it to create parent dirs at
import. Same applies to the branching and tagging.


--
WBR,
 Andrey Repin (anrdaemon@...) 05.11.2009, <0:46>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2414528

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].

Re: make existing web site subversion aware

by Neels Janosch Hofmeyr-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christine Ross wrote:
>
>
> I have an existing web site project that the developers now want to put
> into subversion.

Hi Christine,

let me give you a very simple example. Say I've got folder ~/foo that I want
to put in subversion. I already have a repository, and I can reach it at URL
http://my.com/repos/. (You can also try URL file:///abs/path/to/repos )

Then these commands are my preferred way to put 'foo' under version control:

# see if the repos is really there:
svn info http://my.com/repos/

# get a working copy. You can use --depth=immediates when your repos
# is full of stuff you don't want to download.
svn checkout http://my.com/repos working-copy

# Optional: make some structure
svn mkdir working-copy/trunk

# copy the folder foo into trunk
cp -a ~/foo working-copy/trunk/

# Optional: clean out files that shouldn't go under version control
rm working-copy/trunk/foo/bar

# add and commit, so that the stuff goes to the server
cd working-copy
svn add trunk/foo
svn commit -m "Initial commit of foo."

You need to get familiar with working copies, and while I don't recommend
reading the *whole* Subversion book end to end, it is in fact the best place
to find out the stuff I just wrote here.

Also see: http://subversion.tigris.org/faq.html#website-auto-update

Good luck!
~Neels

>  There is no version control, just an
> /usr/local/apache2/htdocs/docsite directory.  This is a solaris 10
> server.  I have done a *useradd –d /home/subversion –m svn*, and
> *svncreate create /home/subversion/repos*.  I’m working on the apache
> configuration.
>
>  
>
> The documentation talks about importing a project?  Do I have to somehow
> bring this /usr/local/apache2/htdocs/docsite directory into
> /home/subversion/repos?
>
>  
>
> I saw this but how would it know what to do with all the files and
> directories in the current DocumentRoot that contains all the files for
> the application being put under subversion control?
>
>  
>
> $ cd /home/subversion/repos
>
> $ mkdir myproject_svn myproject_svn/tags myproject_svn/branches
>
> $ mv myproject myproject_svn/trunk
>
> $ svn import myproject_svn http://localhost:8080/svn/repos/myproject
>
> Can I make another directory under repos for that particular project?
> Currently my httpd.conf have SVNPath and not SVNParentPath.
>
> Any help is apprecaited?
>
> Thank you
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2414534

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].

signature.asc (205 bytes) Download Attachment

RE: make existing web site subversion aware

by csross :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you.  I appreciate your answer but my question was about not
having any subversion repos installed yet and how to bring a web site
DocumentRoot into subversion.  

I will check out the sites and docs.

Thanks
-----Original Message-----
From: Neels J Hofmeyr [mailto:neels@...]
Sent: Wednesday, November 04, 2009 5:11 PM
To: Christine Ross
Cc: users@...
Subject: Re: make existing web site subversion aware

Christine Ross wrote:
>
>
> I have an existing web site project that the developers now want to
put
> into subversion.

Hi Christine,

let me give you a very simple example. Say I've got folder ~/foo that I
want
to put in subversion. I already have a repository, and I can reach it at
URL
http://my.com/repos/. (You can also try URL file:///abs/path/to/repos )

Then these commands are my preferred way to put 'foo' under version
control:

# see if the repos is really there:
svn info http://my.com/repos/

# get a working copy. You can use --depth=immediates when your repos
# is full of stuff you don't want to download.
svn checkout http://my.com/repos working-copy

# Optional: make some structure
svn mkdir working-copy/trunk

# copy the folder foo into trunk
cp -a ~/foo working-copy/trunk/

# Optional: clean out files that shouldn't go under version control
rm working-copy/trunk/foo/bar

# add and commit, so that the stuff goes to the server
cd working-copy
svn add trunk/foo
svn commit -m "Initial commit of foo."

You need to get familiar with working copies, and while I don't
recommend
reading the *whole* Subversion book end to end, it is in fact the best
place
to find out the stuff I just wrote here.

Also see: http://subversion.tigris.org/faq.html#website-auto-update

Good luck!
~Neels

>  There is no version control, just an
> /usr/local/apache2/htdocs/docsite directory.  This is a solaris 10
> server.  I have done a *useradd -d /home/subversion -m svn*, and
> *svncreate create /home/subversion/repos*.  I'm working on the apache
> configuration.
>
>  
>
> The documentation talks about importing a project?  Do I have to
somehow
> bring this /usr/local/apache2/htdocs/docsite directory into
> /home/subversion/repos?
>
>  
>
> I saw this but how would it know what to do with all the files and
> directories in the current DocumentRoot that contains all the files
for

> the application being put under subversion control?
>
>  
>
> $ cd /home/subversion/repos
>
> $ mkdir myproject_svn myproject_svn/tags myproject_svn/branches
>
> $ mv myproject myproject_svn/trunk
>
> $ svn import myproject_svn http://localhost:8080/svn/repos/myproject
>
> Can I make another directory under repos for that particular project?
> Currently my httpd.conf have SVNPath and not SVNParentPath.
>
> Any help is apprecaited?
>
> Thank you
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2414742

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].

Re: make existing web site subversion aware

by Ryan Schmidt-60 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov 5, 2009, at 09:19, Christine Ross wrote:

> Thank you.  I appreciate your answer but my question was about not
> having any subversion repos installed yet and how to bring a web site
> DocumentRoot into subversion.
>
> I will check out the sites and docs.

Of course you would begin by creating an empty repository with  
"svnadmin create". Then you import the files.

You may prefer to use what's called an "in-place import", rather than  
the usual "svn import" command. See the FAQ:

http://subversion.tigris.org/faq.html#in-place-import

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2415694

To unsubscribe from this discussion, e-mail: [users-unsubscribe@...].