简体   繁体   中英

Read SVN properties of a directory in Java or JavaScript

I have checked out a code repo on my windows machine. When I do the right click on the directory and go to properties I am able to see the Subversion Tab. There it has a button named Properties which when clicked shows a prompt having Subversion properties like svn:ignore . I was just wondering

  1. If these properties have become directory properties now like last modified and all?
  2. Can I read these properties using Java / JavaScript programatically?

Answers:

  1. Not in the sense of - as you suggest - OS or file system level properties. These are Subversion's own properties and as such are managed by Subversion itself (or other software that can work with Subversion, like very probably in your case: TortoiseSVN . This is what provides you with the tab in the Windows file properties dialog you mentioned).
  2. Yes, with Java, sure - using a library like JavaHL , which is a JNI wrapper around the native Subversion C code. You can get it as part of the Subversion package for Windows (the most recent version as of this post is 1.8.11). Other alternatives include SVNKit , which is a raw Java implementation. Since you're mentioning Javascript, I guess you're talking Node.js, so after a quick use of Google, I'd direct you to something called nodesvn .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM