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

Jian Wang <[email protected]> Sun, 27 Apr 2025 16:05:18 +0800
Newsgroups gmane.comp.version-control.subversion.user
Message-ID <CAE5Kxc38FT_VZApL7N24WSyccsFgY7YQwW4iP94BYUBiOqjWxQ@mail.gmail.com>
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

<?xml version="1.0" encoding="UTF-8"?>
<status>
<target
  path="H:\svn\UnityTest\Assets\ddd.meta">
<entry
  path="H:\svn\UnityTest\Assets\ddd.meta">
<wc-status
  props="none"
  item="unversioned">
</wc-status>
</entry>
</target>
</status>

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

<?xml version="1.0" encoding="UTF-8"?>
<status>
<target
   path="H:\svn\UnityTest\Assets\ddd.meta">
<against
   revision="27"/>
</target>
</status>

The entry part disappear

Step 3
Try remove arg --depth=empty

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

<?xml version="1.0" encoding="UTF-8"?>
<status>
<target
  path="H:\svn\UnityTest\Assets\ddd.meta">
<entry
  path="H:\svn\UnityTest\Assets\ddd.meta">
<wc-status
  props="none"
  item="unversioned">
</wc-status>
</entry>
<against
  revision="27"/>
</target>
</status>

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?