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

Re: Better alternative to `svn add --force *`

From: Kalin KOZHUHAROV <kalin_at_thinrope.net>
Date: 2005-09-15 04:41:02 CEST

Kalin KOZHUHAROV wrote:
> Hello,
>
> I run into this situation several times already, and cannot find any
> good solution so far (with the command svn client).
>
> I hate most of my $HOME dir under subversion control and I update/commit
> as I move around different machines. Problem is certain directories
> often contain new files on almost every commit. To be more specific,
> gaim keeps each new im conversation log in a new file like:
>
> .gaim/logs/yahoo/my_yahoo_nick/buddy_yahoo_nick/2005-07-20.230446.txt
>
> I have also system logs there which I don't need, so they are in
> svn:ignore for the respective directories. Now the problem is that if I
> run something like:
>
> svn add .gaim/ && svn commit -m "gaim"
>
> the add exits with an error "Already under version control"
>
> I tried the suggested
>
> svn add --force .gaim/ && svn commit -m "gaim"
>
> but then all properties like svn:ignore get ignored :-) and I got all
> system logs in there....
>
> Any better solution than adding files one-by-one?
>
> In five minutes I came up with this script that can be put as an alias,
> but aren't there smarter solutions?
>
> cd .gaim && \
> for f in `svn status|grep ^?`; do [ "$f" == "?" ] || svn add $f;done

As this went unanswered, I am asking again: is there any other (better) ways of using the CLI for
such cases?

::: SUMMARY :::

want to do:
 Add to add all unversioned files and subdirs under versioned directory /foo/bar except those
mentioned in svn:ignore (for /foo/bar/ directory)

tried:
 svn add --force /foo/bar/*
problem:
 bails on added files, does not add unversion files in (versioned) /foo/bar/bas/

tried:
 svn add --force /foo/bar/*
problem:
 svn:ignore is _ignored_ on /foo/bar/

Kalin.

-- 
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 15 04:41:48 2005

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