1

I'm trying to list every un-versioned file in my SVN working copy regardless of their directory depth. Let me start with a scenario on the command line - my ultimate goal is to do this with SVNKit.

If I run the following commands in my home directory,

svnadmin create svnrepo
svn mkdir file:///home/foobar/svnrepo/myproj -m "New proj"
svn co file:///home/foobar/svnrepo/myproj
cd myproj
mkdir -p trunk/path/to/new/folder
touch trunk/path/to/new/folder/file.txt
svn status

I see the following output,

?       trunk

What I want to see is file.txt in the list. I know if I add trunk, then all the files will show up, but I can't do this in my scenario.

In SVNKit I'm calling getStatusClient().doStatus( new File(myWorkingCopy), SVNRevision.HEAD, SVNDepth.Infinity, false, true, false, false, handler, null). My handler implements ISVNStatusHandler and ISVNEventHandler and the handleStatus() method only sees that trunk is unversioned. Probably as expected.

Does anyone know if it is possible (or how) to get a list of every un-versioned file by querying the status at the root of my working copy with SVNKit?

Thanks

wsams
  • 2,499
  • 7
  • 40
  • 51
  • The SVN CLI part of your question is a duplicate of this question: [How do I get a list of all unversioned files from svn?](http://stackoverflow.com/questions/216049/how-do-i-get-a-list-of-all-unversioned-files-from-svn) – Yannick Blondeau Jun 29 '12 at 14:39
  • I'm sorry, I saw that but I needed to setup my real question carefully. – wsams Jun 29 '12 at 15:24

1 Answers1

1

I'm pretty sure this is not possible by pure SVNKit functionality (*). Instead, when you encounter an unversioned directory you need to do the unversioned-recursion yourself.

(*) Have a look at SVNStatusEditor17.getDirStatus: in the for(String name : allChildren) loop, in case of versioned directories (nodeInfo != null) there is a recursion. However, in case of sendUnversioned there is none.

mstrap
  • 16,808
  • 10
  • 56
  • 86