You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jean-Sebastien Pilon <js...@PENSON.CA> on 2007/07/13 15:35:51 UTC

Server configuration management with svn question

Hello, 

I use Subversion for managing my Linux servers configurations. I commit
the /etc directory of each box on a repository with subfolder for each
host.

I came across a problem when trying to exclude files I do not which to
monitor/version control.

How can I add files to an exclude list (even files that are already
added to the repository) and avoid getting the file deleted off the
system, in case I need to delete it from the repository to exclude it
from further commits.


Thanks in advance.
NOTICE: This email contains privileged and confidential information and is intended only for the individual to whom it is addressed. If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this transmission by mistake and delete this communication from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. 

AVIS: Le pr�sent courriel contient des renseignements de nature privil�gi�e et confidentielle et n�est destin� qu'� la personne � qui il est adress�. Si vous n��tes pas le destinataire pr�vu, vous �tes par les pr�sentes avis�s que toute diffusion, distribution ou reproduction de cette communication est strictement interdite.� Si vous avez re�u ce courriel par erreur, veuillez en aviser imm�diatement l�exp�diteur et le supprimer de votre syst�me. Notez que la transmission de courriel ne peut en aucun cas �tre consid�r� comme inviolable ou exempt d�erreur puisque les informations qu�il contient pourraient �tre intercept�s, corrompues, perdues, d�truites, arriv�es en retard ou incompl�tes ou contenir un virus. �

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Server configuration management with svn question

Posted by James Coleman <ja...@dspsrv.com>.
Ryan Schmidt wrote:
> On Jul 13, 2007, at 13:57, Jean-Sebastien Pilon wrote:
> 
>>>> I came across a problem when trying to exclude files I do not which
>> to
>>>> monitor/version control.
>>>
>>> Could you give more detail on your problem and list out steps you take
>>> when you get the problem?
>>
>> I wish to exclude files which I find too noisy and that are system
>> generated/modified, which do not need tracking.

Ryan is right.

If they don't need tracking then can you remove them from svn altogether
as Ryan suggests?  And then add an ignore for them?
This is how svn ignore works.

If you still want the default version of the files in svn then it would
have to go somewhere else.


>>>> How can I add files to an exclude list (even files that are already
>>>> added to the repository) and avoid getting the file deleted off the
>>>> system, in case I need to delete it from the repository to exclude
>>>> it from further commits.
>>>
>>> To avoid them getting deleted? During an svn update?
>>>
>>> You can add ignores so that the files will not be listed in svn status
>>> but ignored files will be deleted in many situations.
>>
>> Now what I want to achieve is doable very easily when I start versioning
>> the /etc directory on a new server. But if I want to ignore files on
>> systems that are currently under version control I have no clue how to
>> get it work.
> 
> Suppose you have a file foo that is in the repository and you want to 
> delete it from the repository but not from the working copy. You'll need 
> to do something like this:
> 
> cp foo foo.tmp
> svn delete foo
> svn ci foo -m "removing foo from repository"
> mv foo.tmp foo
> 
> And you may want to set svn:ignore on the directory to ignore foo.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Server configuration management with svn question

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 13, 2007, at 13:57, Jean-Sebastien Pilon wrote:

>>> I came across a problem when trying to exclude files I do not which
> to
>>> monitor/version control.
>>
>> Could you give more detail on your problem and list out steps you  
>> take
>> when you get the problem?
>
> I wish to exclude files which I find too noisy and that are system
> generated/modified, which do not need tracking.
>
> I did the following:
>
> $ svn pe svn:ignore /etc
>
> Added files on separate lines
>
> $ svn status
>
> That said that . (/etc) was modified...
>
> $ svn commit
>
> Now I modify the file /etc/test (which is listed in the ignores)
>
> $ svn status
>
> Says that the file is modified...

Subversion's "ignore" feature only relates to files that are not  
already in the repository.


>>> How can I add files to an exclude list (even files that are already
>>> added to the repository) and avoid getting the file deleted off the
>>> system, in case I need to delete it from the repository to exclude
>>> it from further commits.
>>
>> To avoid them getting deleted? During an svn update?
>>
>> You can add ignores so that the files will not be listed in svn  
>> status
>> but ignored files will be deleted in many situations.
>
> Now what I want to achieve is doable very easily when I start  
> versioning
> the /etc directory on a new server. But if I want to ignore files on
> systems that are currently under version control I have no clue how to
> get it work.

Suppose you have a file foo that is in the repository and you want to  
delete it from the repository but not from the working copy. You'll  
need to do something like this:

cp foo foo.tmp
svn delete foo
svn ci foo -m "removing foo from repository"
mv foo.tmp foo

And you may want to set svn:ignore on the directory to ignore foo.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Re: Server configuration management with svn question

Posted by Jean-Sebastien Pilon <js...@PENSON.CA>.
> > I use Subversion for managing my Linux servers configurations. I
commit
> > the /etc directory of each box on a repository with subfolder for
each
> > host.
> 
> So is your /etc/ dir on each host an actual checkedout working copy?

Yes each /etc is a working copy of

https://subversion/repository/<hostname>/etc

I achieved the "import" like this

$ svn mkdir https://subversion/repository/<hostname>
$ svn mkdir https://subversion/repository/<hostname>/etc
$ svn checkout https://subversion/repository/<hostname>/etc /etc
$ svn add *
$ svn commit -m "initial import of /etc for <hostname>"

Now when a file is modified on the servers, it must be committed each
time.


> > I came across a problem when trying to exclude files I do not which
to
> > monitor/version control.
> 
> Could you give more detail on your problem and list out steps you take
> when you get the problem?

I wish to exclude files which I find too noisy and that are system
generated/modified, which do not need tracking.

I did the following:

$ svn pe svn:ignore /etc

Added files on separate lines

$ svn status 

That said that . (/etc) was modified...

$ svn commit 

Now I modify the file /etc/test (which is listed in the ignores)

$ svn status 

Says that the file is modified...

> > How can I add files to an exclude list (even files that are already
> > added to the repository) and avoid getting the file deleted off the
> > system, in case I need to delete it from the repository to exclude
it
> > from further commits.
> >
> 
> To avoid them getting deleted? During an svn update?
> 
> You can add ignores so that the files will not be listed in svn status
but
> ignored files will be deleted in many situations.
> 
> James.


Now what I want to achieve is doable very easily when I start versioning
the /etc directory on a new server. But if I want to ignore files on
systems that are currently under version control I have no clue how to
get it work.

NOTICE: This email contains privileged and confidential information and is intended only for the individual to whom it is addressed. If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this transmission by mistake and delete this communication from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. 

AVIS: Le pr�sent courriel contient des renseignements de nature privil�gi�e et confidentielle et n�est destin� qu'� la personne � qui il est adress�. Si vous n��tes pas le destinataire pr�vu, vous �tes par les pr�sentes avis�s que toute diffusion, distribution ou reproduction de cette communication est strictement interdite.� Si vous avez re�u ce courriel par erreur, veuillez en aviser imm�diatement l�exp�diteur et le supprimer de votre syst�me. Notez que la transmission de courriel ne peut en aucun cas �tre consid�r� comme inviolable ou exempt d�erreur puisque les informations qu�il contient pourraient �tre intercept�s, corrompues, perdues, d�truites, arriv�es en retard ou incompl�tes ou contenir un virus. �

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Server configuration management with svn question

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 13, 2007, at 11:46, Tom Malia wrote:

> Now, what I'd like to be able to do is treat the root directory of  
> this ERP
> package as a "Working Copy" with an automated process that would
> periodically commit the current state of the entire directory to a
> Subversion repository.  Basically, what I'm looking for is to use  
> Subversion
> to provide automated incremental backups, with the added advantages  
> of being
> able to perform DIFF's on different points in time as well as  
> provide easy
> access to the repository of backups from remote locations, and  
> easily role
> back some or all changes that may have occurred.
>
> Is this a task to which Subversion would be well suited?  If so,  
> how do I go
> about "committing" all changes to the WC to the repository including
> additions and deletions of files in a completely automated way?   
> Note that I
> don't think use a Subversion repository configured with WEB-DAV as the
> install directory for the ERP system will be an option for a number of
> different reasons.

Probably not exactly "well suited", since the FAQ's answer to your  
question it "don't":

http://subversion.tigris.org/faq.html#wc-change-detection

You may want to investigate whether a different tool, like FSVS,  
would be better suited to this task. FSVS is based on Subversion.

http://fsvs.tigris.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Server configuration management with svn question

Posted by David Kastrup <da...@gnu.org>.
"Matt Sickler" <cr...@gmail.com> writes:

> SVN could do that well.  Just remember that you will have to write a
> script that adds files not already added, and removes missing files
> automatically.  And you wont get the copy/move tracking that svn
> provides if you use the systems cp/mv commands.

I'd use git for that.  Git does copy/move tracking even if you use the
system's cp/mv commands (_and_ is efficient in its operation).

Basically, you do once
git-init
at the top and then repeatedly use
git add .
git commit -m "some commit message" -a
to update your local repository.  When you want to know what happened,
use something like
git-diff --name-status -M -C -R -B ":/some commit message"

Something like that.  Copy/Rename detection happens only when doing
git-diff, but the checkins are efficient nevertheless (identical file
contents don't take up additional space regardless of what file they
happen to occur).

Git defaults to using a single local repository .git in the top
directory.  While you can use a file:// URL for the subversion
repository, too, you can't really share this with the same tree as the
content.

-- 
David Kastrup

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Server configuration management with svn question

Posted by Matt Sickler <cr...@gmail.com>.
SVN could do that well.  Just remember that you will have to write a
script that adds files not already added, and removes missing files
automatically.  And you wont get the copy/move tracking that svn
provides if you use the systems cp/mv commands.

On 7/13/07, Tom Malia <to...@ttdsinc.com> wrote:
> If I could piggy back on this thread a little.... I've been considering
> trying to use Subversion for something similar but don't know if what I what
> to do is reasonable in Subversion.
>
> I support an ERP product that installs a fairly extensive directory
> structure and set of files to a server, from which many workstations then
> run the programs.  It is very common for the files in this directory to be
> modified for a variety of different reasons.  Also there are several
> directories that the software itself will created delete and modify records
> in as part of normal operations.  Occasionally it would be extremely
> convenient to be able to compare the state of the system at different points
> in time and also to be able to easily revert some changes.
>
> I think the environment is not significantly different than say the
> directory structure of a moderately complex web site or web application.
>
> Now, what I'd like to be able to do is treat the root directory of this ERP
> package as a "Working Copy" with an automated process that would
> periodically commit the current state of the entire directory to a
> Subversion repository.  Basically, what I'm looking for is to use Subversion
> to provide automated incremental backups, with the added advantages of being
> able to perform DIFF's on different points in time as well as provide easy
> access to the repository of backups from remote locations, and easily role
> back some or all changes that may have occurred.
>
> Is this a task to which Subversion would be well suited?  If so, how do I go
> about "committing" all changes to the WC to the repository including
> additions and deletions of files in a completely automated way?  Note that I
> don't think use a Subversion repository configured with WEB-DAV as the
> install directory for the ERP system will be an option for a number of
> different reasons.
>
> Thanks in advance,
> Tom Malia
>
>
> -----Original Message-----
> From: James Coleman [mailto:jamesc@dspsrv.com]
> Sent: Friday, July 13, 2007 11:57 AM
> To: users@subversion.tigris.org
> Subject: Re: Server configuration management with svn question
>
> Jean-Sebastien Pilon wrote:
> > Hello,
> >
> > I use Subversion for managing my Linux servers configurations. I commit
> > the /etc directory of each box on a repository with subfolder for each
> > host.
>
> So is your /etc/ dir on each host an actual checkedout working copy?
>
> >
> > I came across a problem when trying to exclude files I do not which to
> > monitor/version control.
>
> Could you give more detail on your problem and list out steps you take
> when you get the problem?
>
> >
> > How can I add files to an exclude list (even files that are already
> > added to the repository) and avoid getting the file deleted off the
> > system, in case I need to delete it from the repository to exclude it
> > from further commits.
> >
>
> To avoid them getting deleted? During an svn update?
>
> You can add ignores so that the files will not be listed in svn status but
> ignored files will be deleted in many situations.
>
> James.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Server configuration management with svn question

Posted by Tom Malia <to...@ttdsinc.com>.
If I could piggy back on this thread a little.... I've been considering
trying to use Subversion for something similar but don't know if what I what
to do is reasonable in Subversion.

I support an ERP product that installs a fairly extensive directory
structure and set of files to a server, from which many workstations then
run the programs.  It is very common for the files in this directory to be
modified for a variety of different reasons.  Also there are several
directories that the software itself will created delete and modify records
in as part of normal operations.  Occasionally it would be extremely
convenient to be able to compare the state of the system at different points
in time and also to be able to easily revert some changes. 

I think the environment is not significantly different than say the
directory structure of a moderately complex web site or web application.

Now, what I'd like to be able to do is treat the root directory of this ERP
package as a "Working Copy" with an automated process that would
periodically commit the current state of the entire directory to a
Subversion repository.  Basically, what I'm looking for is to use Subversion
to provide automated incremental backups, with the added advantages of being
able to perform DIFF's on different points in time as well as provide easy
access to the repository of backups from remote locations, and easily role
back some or all changes that may have occurred.

Is this a task to which Subversion would be well suited?  If so, how do I go
about "committing" all changes to the WC to the repository including
additions and deletions of files in a completely automated way?  Note that I
don't think use a Subversion repository configured with WEB-DAV as the
install directory for the ERP system will be an option for a number of
different reasons.

Thanks in advance,
Tom Malia


-----Original Message-----
From: James Coleman [mailto:jamesc@dspsrv.com] 
Sent: Friday, July 13, 2007 11:57 AM
To: users@subversion.tigris.org
Subject: Re: Server configuration management with svn question

Jean-Sebastien Pilon wrote:
> Hello, 
> 
> I use Subversion for managing my Linux servers configurations. I commit
> the /etc directory of each box on a repository with subfolder for each
> host.

So is your /etc/ dir on each host an actual checkedout working copy?

> 
> I came across a problem when trying to exclude files I do not which to
> monitor/version control.

Could you give more detail on your problem and list out steps you take
when you get the problem?

> 
> How can I add files to an exclude list (even files that are already
> added to the repository) and avoid getting the file deleted off the
> system, in case I need to delete it from the repository to exclude it
> from further commits.
> 

To avoid them getting deleted? During an svn update?

You can add ignores so that the files will not be listed in svn status but
ignored files will be deleted in many situations.

James.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Server configuration management with svn question

Posted by James Coleman <ja...@dspsrv.com>.
Karl Fogel wrote:
> James Coleman <ja...@dspsrv.com> writes:
>> You can add ignores so that the files will not be listed in svn status but
>> ignored files will be deleted in many situations.
> 
> Really?  I didn't know Subversion did that.  When does it delete
> ignored files?
> 

"many situations" !? is incorrect on my part.
I was thinking in case of "svn switch" but that is also incorrect.
What was I thinking ... ?
Thanks for calling me up on that now to me obviously incorrect statement!

I use some helpers with svn which ignore or remove ignored+unversioned files.
e.g. making a patch to backup any changes more regularily than they are comitted
So essentially for me it is dangerous to have anything I need unversioned.
So as a working principle if anything is listed in status as "?" I know I have
to either add an ignore or add it.
I think that is what I was thinking.

It seems intuitive that an svn switch maybe should remove unversioned files,
but it doesn't.

In fact specifically in a situation where you do an svn switch to another
branch or area in a repository, if a directory doesn't exist on the new branch
then all unversioned contents cause a problem (as we've seen on other thread).
svn doesn't want to remove unversioned files and it stops the switch with error.

James.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Server configuration management with svn question

Posted by Karl Fogel <kf...@red-bean.com>.
James Coleman <ja...@dspsrv.com> writes:
> You can add ignores so that the files will not be listed in svn status but
> ignored files will be deleted in many situations.

Really?  I didn't know Subversion did that.  When does it delete
ignored files?

Thanks,
-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Server configuration management with svn question

Posted by James Coleman <ja...@dspsrv.com>.
Jean-Sebastien Pilon wrote:
> Hello, 
> 
> I use Subversion for managing my Linux servers configurations. I commit
> the /etc directory of each box on a repository with subfolder for each
> host.

So is your /etc/ dir on each host an actual checkedout working copy?

> 
> I came across a problem when trying to exclude files I do not which to
> monitor/version control.

Could you give more detail on your problem and list out steps you take
when you get the problem?

> 
> How can I add files to an exclude list (even files that are already
> added to the repository) and avoid getting the file deleted off the
> system, in case I need to delete it from the repository to exclude it
> from further commits.
> 

To avoid them getting deleted? During an svn update?

You can add ignores so that the files will not be listed in svn status but
ignored files will be deleted in many situations.

James.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org