0

I have a Working Copy and added new files FOUR.txt and more/FIVE.txt using svn add command.

svn add FOUR.txt
svn add more/FIVE.txt

On executing svn status on working copy I get following output

A FOUR.txt
A more/FIVE.txt

Now I want to get same info with SVNKit API. So, I written code like this

SVNClientManager.newInstance().getStatusClient().doStatus(tempRepoWorkingCopy, SVNRevision.WORKING, SVNDepth.INFINITY, false, true, true, true, new ISVNStatusHandler() {

            @Override
            public void handleStatus(SVNStatus status) throws SVNException {
                System.out.println(status.getContentsStatus());
                System.out.println(status.getFile());                   
            }

        }, null);

It is giving getContentStatus() as Modified instead of Added. How to get Added information using SVNStatusClient. Am I missing something here?

Pokuri
  • 3,072
  • 8
  • 31
  • 55

1 Answers1

1

SVNStatus.getNodeStatus() does the job!

Pokuri
  • 3,072
  • 8
  • 31
  • 55
  • Actually, the correct answer is SVNStatus.getCombinedNodeAndContentsStatus(), this method is used to implement status printing in SVNKit command line client. – Dmitry Pavlenko Sep 03 '14 at 14:57