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.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-13 21:35:20 CET