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

Re: adding all unversioned files (except ignored ones)

From: <Mathias.Weinert_at_gfa-net.de>
Date: 2006-02-14 08:37:31 CET

Matthew Willis <mwillis@ecornell.com> wrote:
>
> On Feb 13, 2006, at 6:41 PM, Ryan Schmidt wrote:
>
> > On Feb 12, 2006, at 03:38, Dan Tenenbaum wrote:
> >
> >> So, the question is how to automatically add to the repository all
> >> unversioned files that do not match any of the patterns in the
> >> svn:ignore property. It would also be nice if I could see a list of
> >> such files before doing the add, in case there is stuff that should
> >> not be added.
> >>
> >> I looked at several of the GUI svn clients (svnX, jsvn, rapidsvn,
> >> etc.) and they didn't seem to be able to do this either. Can anyone
> >> help?
> >
> > You would need to write or find a script that does this. It's not
> > built-in. (At least, not built into the official code. You could
> > check the contrib directory...)
> >
>
> I often use the following:
>
> svn status -u | grep "?" | awk '{print $2}' | while read i ; do svn
> add "$i" ; done
>

You could speed this up by just saying 'svn status' as you are only
interested in local files so no repository access is required.

And grep "^?" may be a bit safer as it only takes files with a '?' in
the first column (although it might stand nowhere else anyway).

Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 14 08:38:22 2006

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