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

JavaHL: ClientNotifyCallback reports unexpected kind "file" for symlinks

From: Marc Strapetz <marc.strapetz_at_syntevo.com>
Date: Tue, 19 May 2015 15:59:29 +0200

When recursively adding a directory "test" which contains another
directory "sub" and a symlink "sub.link" pointing to "sub", "sub.link"
is reported with kind=file where I would expect to receive kind=symlink.
The problem can be reproduced by following code snippet, using quite
recent 1.9 binaries:

final File root = <path-to-a-test-working-copy>;
final File dir = new File(root, "test");
dir.mkdirs();

final File sub = new File(dir, "sub");
sub.mkdirs();

final File subLink = new File(dir, "sub.link");
Runtime.getRuntime().exec("ln -s " + sub.getAbsolutePath() +
   " " + subLink.getAbsolutePath());

final ISVNClient client = new SVNClient();
// client.revert(dir.getAbsolutePath(), Depth.infinity,
// new ArrayList<String>());

client.notification2(new ClientNotifyCallback() {
   @Override
   public void onNotify(ClientNotifyInformation cni) {
     System.out.println("[" + cni.getKind() + "] " + cni.getPath() +
                        " " + cni.getAction());
   }
});
client.add(dir.getAbsolutePath(), Depth.infinity, false, false, false);

-Marc
Received on 2015-05-19 15:59:49 CEST

This is an archived mail posted to the Subversion Dev mailing list.