You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Peter@locotel" <pe...@locotel.gr> on 2011/04/13 11:28:39 UTC

Updating the WC from an non svn directory

Hi All,
I want to know if that is possible and how should I do it. 
My repository has the been imported with the contents (/var/www) of my
web server.
After a checkout my working copy also has been updated with the same
content.
The development in not done on my working copy. It is done by my
developers and
testing programs are uploaded to the web server preview directory so
they can be
tested in real scenarios and test users. If tests are successful, these
program are copied
to the public part of the web server and used by all other users. 
I want periodically to update repository and keep revisions
from /var/www of the web server.
Can I copy using (on my svn server)
cp    /var/www     /home/svn/repository 
or (on my svn server)
svn  import /var/www  http://myserver/svn/repository -m "date-101010"
--username=peanut
or (on my workstation)
cp    /var/www     /home/peanut/workingcopy
svn stat /home/peanut/workingcopy | grep "^?" | awk -F "      " '{print
$2}' | xargs svn add
and the checkin to central repositoty?
I will be grad if you can guide me there. My main misunderstanding is
that I don't know what happens
when you copy a new version of programs (same name dirs etc) to working
copy. 
What shall I do for subversion to understand that these files have been
changed somehow.
Thanks in advance,
Peter 

Re: Updating the WC from an non svn directory

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Peter@locotel,
am Mittwoch, 13. April 2011 um 11:28 schrieben Sie:

> The development in not done on my working copy. It is done by my
> developers and
> testing programs are uploaded to the web server preview directory so
> they can be
> tested in real scenarios and test users. If tests are successful, these
> program are copied
> to the public part of the web server and used by all other users. 
> I want periodically to update repository and keep revisions
> from /var/www of the web server.

I don't think you should work that way at all. What you get are
backups of /var/www, but this is easier to realize than using
Subversion: Just copy/tar/whatever the directory using cron.
Subversion won't be of any real benefit in your scenario, but will
likely produce problems. It's of no benefit because the changes you
get between your copies to subversion will be somewhat large and
therefore hard to understand in case of errors. But in case of any
errors you want to find those quickly. Even your log messages won't be
of any help because you just don't know what has changed, you can just
produce timestamps oir stuff like that, but that's what Subversion
already provides. The problems may arise during deleted and added
directories. Normally a developer would delete and add, move or
whatever directories using a svn client and therefore telling
Subversion exactly what gets deleted, moved etc. In your case there's
no such info unless you build that info into the script which gets
/var/www on a regular basis and commits it to subversion.

What you really should do is let your developers work with Subversion
and than checkout working copies of your software in /var/www, meaning that
you should start in Subversion, not end there.

> I will be grad if you can guide me there. My main misunderstanding is
> that I don't know what happens
> when you copy a new version of programs (same name dirs etc) to working
> copy. 
> What shall I do for subversion to understand that these files have been
> changed somehow.

The svn clients detect themselves that files have changed, that not a
problem. The real problem starts with renamed, deleted and moved files
and directories because one, normally the developer, has to tell
Subversion what moved where etc.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning
AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig
 
Telefon: Potsdam: 0331-743881-0
E-Mail:  tschoening@am-soft.de
Web:     http://www.am-soft.de

AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam
Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow