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

Re: How to commit only top level files?

From: Bo Berglund <bo.berglund_at_gmail.com>
Date: Tue, 06 Nov 2018 23:23:06 +0100

On Tue, 6 Nov 2018 23:13:08 +0100, Branko ?ibej <brane_at_apache.org>
wrote:

>> The problem I have is in the definition of "target"...
>
>"Target" is any file or directory that you tell the command to operate
>on. For example, when you say:
>
>    svn commit foo bar
>
>"foo" and "bar" are targets for 'svn commit'. You can omit explicit
>targets for some commands — svn commit is one of them — in which case
>the implicit target is the current directory; so,
>
>    svn commit
>
>means exactly the same as
>
>    svn commit .
>
>
>> I am doing the operation inside the top level of the WC tree (where
>> the .svn dir is located).
>> The command will be:
>> svn ci --depth <argument>
>>
>> What should I use as argument so that only the changed files in the
>> current dir are committed?
>
>    svn commit --depth files
>
>(or 'svn commit --depth files .') will only commit /files/ that in the
>current directory. On the other hand,
>
>    svn commit --depth immediates
>
>will commit files /and/ directories, but will not recurse into the
>directories. Basically this means that changed files and property
>changes on directories in the current dir will be committed, but nothing
>else.
>
>
>> empty does not work for me because the dir is NOT empty
>
>That's not what '--depth empty' means. It means "commit only the target
>itself", so if the target is a directory, it will only commit any
>property changes on that directory.
>
>
>> files does not work because I don't understand what "file children" is
>
>Files within the target direcory.
>
>> immediates clearly would include subdirs too?
>
>Yes, but nothing inside those subdirs.
>
>> infinity not what I want, full recursion...
>>
>> Tried to google but I only get hits that deal with the opposite, how
>> to exclude file commit.
>>
>> I want to block recursion into subdirectories...
>
>You want either 'svn commit --depth files' or 'svn commit --depth
>immediates', depending on whether or not property changes on directories
>matter.
>
>-- Brane

Thanks for the complete explanation!

I used --depth files and got what I wanted!

-- 
Bo Berglund
Developer in Sweden
Received on 2018-11-06 23:23:32 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.