svn status --xml with -u and --depth=empty lost the entry block

2025-04-27 Thread Jian Wang
Hi~
I'm coding to use svn in my Unity project, and want find a way to get file
status
I've tried `svn status` command, in most cases it works well,
however when  -u and --depth=empty are both enabled, the entry block is
missing.
The following is my test:

Step 1
svn status --depth=empty "H:/svn/UnityTest/Assets/ddd.meta
got











Step 2
And I add -u
svn status --depth=empty -u "H:/svn/UnityTest/Assets/ddd.meta
the output is








The entry part disappear

Step 3
Try remove arg --depth=empty

svn status -u "H:/svn/UnityTest/Assets/ddd.meta
The output is












The entry part came back.

After trying --depth=files and --depth=immediates, they all return xml
contains the entry part.

So why when  -u and --depth=empty are both enabled, the entry block is
missing?  How can I tell if the target is unversioned in this case?


Re: svn status --xml with -u and --depth=empty lost the entry block

2025-04-27 Thread Lorenz via users
Hi,

hm, with depth=empty you're telling svn to only consider the root
folder itself.
In that case the entry tag would be empty ( and therefore perhaps
omitted) in case there are no changes/updates regarding the folder.

Lorenz
-- 

Jian Wang wrote:

>Hi~
>I'm coding to use svn in my Unity project, and want find a way to get file
>status
>I've tried `svn status` command, in most cases it works well,
>however when  -u and --depth=empty are both enabled, the entry block is
>missing.
>The following is my test:
>
>Step 1
>svn status --depth=empty "H:/svn/UnityTest/Assets/ddd.meta
>got
>
>
>
>  path="H:\svn\UnityTest\Assets\ddd.meta">
>  path="H:\svn\UnityTest\Assets\ddd.meta">
>  props="none"
>  item="unversioned">
>
>
>
>
>
>Step 2
>And I add -u
>svn status --depth=empty -u "H:/svn/UnityTest/Assets/ddd.meta
>the output is
>
>
>
>   path="H:\svn\UnityTest\Assets\ddd.meta">
>   revision="27"/>
>
>
>
>The entry part disappear
>
>Step 3
>Try remove arg --depth=empty
>
>svn status -u "H:/svn/UnityTest/Assets/ddd.meta
>The output is
>
>
>
>  path="H:\svn\UnityTest\Assets\ddd.meta">
>  path="H:\svn\UnityTest\Assets\ddd.meta">
>  props="none"
>  item="unversioned">
>
>
>  revision="27"/>
>
>
>
>The entry part came back.
>
>After trying --depth=files and --depth=immediates, they all return xml
>contains the entry part.
>
>So why when  -u and --depth=empty are both enabled, the entry block is
>missing?  How can I tell if the target is unversioned in this case?