[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn:ignore and svn add *

From: Marcelo de Moraes Serpa <celoserpa_at_gmail.com>
Date: Wed, 13 Feb 2008 18:37:56 -0200

Thanks Ryan!

So you committed this add? Well, you can undo it like any other
revision, as described in the book:

Luckily, in this case, I didn't commit it.

The better alternative to "svn add *" is "svn add --force ." (note
the "." at the end indicating the current directory). Yes, this
works; yes, this still obeys the svn:ignores. I tried it just now.

Thanks for the tip, this is what I wanted to know :)

Marcelo.

On Feb 13, 2008 6:34 PM, Ryan Schmidt <subversion-2008a_at_ryandesign.com>
wrote:

>
> On Feb 13, 2008, at 14:23, Marcelo de Moraes Serpa wrote:
>
> > I have a directory tree like this:
> >
> > bin/
> > buildout.cfg
> > buildout.cfg.old
> > develop-debug/
> > develop-products/
> > eggs/
> > parts/
> > wiki/
> > bootstrap.py
> > datatransp.ldif
> > develop-eggs
> > downloads
> > EXTERNALS.txt
> > products/
> > src/
> > var/
> >
> > After some hours working, I want to add everything I added or
> > modified inside these dirs except for:
> > bin/
> > develop-debug/
> > eggs/
> > parts/
> > wiki/
> > var/
> >
> > So, what I did was to "svn propedit svn:externals . " and added
> > this to the list:
> > bin/
> > develop-debug/
> > eggs/
> > parts/
> > wiki/
> > var/
> >
> > However, when I run svn add *, all these dirs and its sub-contents
> > get added to the repository.
>
> That's correct.
>
> > What am I doing wrong?
>
> Using "svn add *", in this case. svn does not ignore things that you
> explicitly specify on the command line. And it is your shell, not
> Subversion, that sees the "*" and expands it to the list of all items
> in the directory. Thus, you are explicitly asking to add every item
> in the directory, thus Subversion does so.
>
> > Note: With svn add * my purpose is to add all the new files created
> > (but those on the ignore list). Then I do a svn commit to commit
> > the modifications in the existing files.
>
> The better alternative to "svn add *" is "svn add --force ." (note
> the "." at the end indicating the current directory). Yes, this
> works; yes, this still obeys the svn:ignores. I tried it just now.
>
> > Also, is there a way to undo the last operations you did on a
> > working copy (in this case, I added a bunch of unecessary data)?
>
> So you committed this add? Well, you can undo it like any other
> revision, as described in the book:
>
> http://svnbook.red-bean.com/en/1.4/
> svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo
>
> However, the unnecessary data will still be stored in the repository
> forever (as with all data in the repository). The workaround for
> that, if you want to reclaim the space or if you accidentally
> committed confidential information that must be purged, would be to
> take the repository offline, "svnadmin dump" it, "svndumpfilter" it
> to remove the undesired data, "svnadmin load" it into a new
> repository, and make everyone check out new working copies. Not easy.
> That's why it's so important not to commit undesired information in
> the first place.
>
>
Received on 2008-02-13 21:38:25 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.