嗨如何獲取使用SVNkit的文件的最後修改值。 場景:文件從SVN更新,並且itr在本地回購(工作副本)中可用。最後修改使用SVNkit的文件的詳細信息
1
A
回答
0
SVNProperties props=new SVNProperties();
repository.getFile(filePath,new Long(-1),props,null);
String author=props.getSVNPropertyValue("svn:entry:last-author").toString();
工作正常。
0
你可以使用svn關鍵字http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html'修改'應該是作者。
您必須確保在每次檢入前都會更改包含關鍵字的文件。這可以使用ant腳本來完成。
關鍵字可以以恆定使用具有第二恆定提取有趣的部分:
private static final String SVN_AUTHOR_BASE = "$Author: 113665 $";
/** Is filled in automatically on check in */
public static final String SVN_AUTHOR = SVN_AUTHOR_BASE.
substring(9,SVN_AUTHOR_BASE.indexOf('$', 9) - 1);
0
public static String getLastModifiedBy(File localPath) throws SVNException {
final SVNStatus status = SVNClientManager.newInstance().getStatusClient().doStatus(localPath, false);
return status != null ? status.getAuthor() : null;
}
相關問題
- 1. Git pull後的詳細信息更改
- 2. 獲取最後登錄詳細信息
- 3. 如何使用wix bootstraper更改exe文件的詳細信息?
- 4. Crystal Reports詳細信息詳細信息
- 5. Android主詳細信息詳細信息
- 6. NSIS在顯示詳細信息後隱藏詳細信息
- 7. 如何修改詳細查看我的強類型的詳細信息
- 8. 顯示TXT文件的詳細信息
- 9. MVC3上傳文件的詳細信息
- 10. 修改iPhone應用程序商店的詳細信息
- 11. Zend Framework 2:修改控制器中的layout.pthml的詳細信息
- 12. 詳細信息披露後的註釋詳細信息被按下?
- 13. 視頻文件格式的標題信息的詳細信息
- 14. Jenkins插件詳細信息
- 15. 通話結束後的最後一個去電詳細信息
- 16. 有關使用AVAudioEngine的詳細信息
- 17. Prestashop修改產品名稱的詳細信息
- 18. 搜索和修改用戶詳細信息
- 19. 如何在symfony2中用戶詳細信息創建/修改
- 20. 獲取擴展文件信息的詳細信息
- 21. PHP $ _FILES文件詳細信息
- 22. 在文件中寫入詳細信息
- 23. Android DCIM文件夾詳細信息
- 24. JPA persistence.xml文件內容詳細信息
- 25. 獲取文件詳細信息
- 26. MS測試.orderedtest文件詳細信息
- 27. 將詳細信息寫入文件
- 28. PushViewController詳細信息?
- 29. 詳細信息sql
- 30. UITableView詳細信息