You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Toby Johnson <to...@etjohnson.us> on 2004/12/13 19:07:04 UTC
Ignoring files in working copy only
We have a web site checked in to Subversion which includes some
behind-the-scenes config files. When I make changes to this site, I
first test those changes in a development directory.
The development version of these config files point to a development
MySQL database, but the production version of course points to the
production database. So every time I want to commit changes from the
development area, svn sees these config files as modified, but I don't
want to check those changes in.
Is there some clever way to get svn to not notice these changes in the
development working copy? Currently I have to explicitly specify each
file I want to commit so it doesn't pick up the unwanted changes as
well. I guess I could write a shell script to temporarily swap out the
config files if nothing else. Has an "exclude" option to "commit" or
"status" ever been considered?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
AW: Ignoring files in working copy only
Posted by Stefan Quast <Th...@Student.Uni-Augsburg.DE>.
I used the wrong term, sorry. I thought abou optional locking like it will
be in subversion 1.2.
Example:
User A checked out with lockinig subdir sub2 from dir trunk. Now user B
wants to check out trunk. But until A don't removes lock at sub2 he should
not be able to commit his version of sub2.
My question is now (you have partly answered it), is there any possibility
to get a similar solution by using subversion commands?
@Max Thank's very much for your answer.
Greets,
Stefan
-----Ursprüngliche Nachricht-----
Von: Max Bowsher [mailto:maxb@ukf.net]
Gesendet: Dienstag, 14. Dezember 2004 14:52
An: users@subversion.tigris.org
Betreff: Re: Ignoring files in working copy only
Toby Johnson wrote:
> We have a web site checked in to Subversion which includes some
> behind-the-scenes config files. When I make changes to this site, I
> first test those changes in a development directory.
>
> The development version of these config files point to a development
> MySQL database, but the production version of course points to the
> production database. So every time I want to commit changes from the
> development area, svn sees these config files as modified, but I don't
> want to check those changes in.
>
> Is there some clever way to get svn to not notice these changes in the
> development working copy? Currently I have to explicitly specify each
> file I want to commit so it doesn't pick up the unwanted changes as
> well. I guess I could write a shell script to temporarily swap out the
> config files if nothing else. Has an "exclude" option to "commit" or
> "status" ever been considered?
It sounds like
http://subversion.tigris.org/project_faq.html#ignore-commit
is applicable to your situation.
Max.
---------------------------------------------------------------------
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: Ignoring files in working copy only
Posted by Max Bowsher <ma...@ukf.net>.
Toby Johnson wrote:
> We have a web site checked in to Subversion which includes some
> behind-the-scenes config files. When I make changes to this site, I
> first test those changes in a development directory.
>
> The development version of these config files point to a development
> MySQL database, but the production version of course points to the
> production database. So every time I want to commit changes from the
> development area, svn sees these config files as modified, but I don't
> want to check those changes in.
>
> Is there some clever way to get svn to not notice these changes in the
> development working copy? Currently I have to explicitly specify each
> file I want to commit so it doesn't pick up the unwanted changes as
> well. I guess I could write a shell script to temporarily swap out the
> config files if nothing else. Has an "exclude" option to "commit" or
> "status" ever been considered?
It sounds like
http://subversion.tigris.org/project_faq.html#ignore-commit
is applicable to your situation.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Ignoring files in working copy only
Posted by kf...@collab.net.
Toby Johnson <to...@etjohnson.us> writes:
> We have a web site checked in to Subversion which includes some
> behind-the-scenes config files. When I make changes to this site, I
> first test those changes in a development directory.
>
> The development version of these config files point to a development
> MySQL database, but the production version of course points to the
> production database. So every time I want to commit changes from the
> development area, svn sees these config files as modified, but I don't
> want to check those changes in.
>
> Is there some clever way to get svn to not notice these changes in the
> development working copy? Currently I have to explicitly specify each
> file I want to commit so it doesn't pick up the unwanted changes as
> well. I guess I could write a shell script to temporarily swap out the
> config files if nothing else. Has an "exclude" option to "commit" or
> "status" ever been considered?
I have this situation too. Here is how I solved it in a pre-commit
hook:
#!/bin/sh
REPOS="$1"
TXN="$2"
### Make sure that the log message contains some text.
SVNLOOK=/usr/local/bin/svnlook
LOG=`$SVNLOOK log -t "$TXN" "$REPOS"`
echo "$LOG" | grep "[a-zA-Z0-9]" > /dev/null || exit 1
# Make sure we don't accidentally commit the live DB password.
if svnlook diff -t "${TXN}" "${REPOS}" \
| grep '^-$db_url = "mysql://mysite:PUTPASSWORDHERE@localhost/mysite";' \
> /dev/null; then
echo "You almost committed the live MySQL password." 1>&2
exit 1
fi
exit 0
You could do something similar. The above code prevents me from ever
committing the DB password from the live site's config files. But you
could just protect against modifying certain files at all, that might
be easier.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Ignoring files in working copy only
Posted by Ben Collins-Sussman <su...@collab.net>.
On Dec 13, 2004, at 1:07 PM, Toby Johnson wrote:
>
> Is there some clever way to get svn to not notice these changes in the
> development working copy?
FAQ: http://subversion.tigris.org/project_faq.html#ignore-commit
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org