1
我目前正在研究一個關於計算的項目。我已經完成了我項目的主要部分,還將SVN提交功能集成到了我的代碼中(使用.ini文件讀取特定地址等)SVN提交日誌問題
我可以很容易地提交文件,我正在嘗試的是我想實現實時日誌到我的控制檯。有沒有辦法將日誌實現到控制檯?不是一般的日誌,而是應該是實時的提交日誌。
- 我使用eclipse for mac,我聽說過關於SVNKit,但我對SVN很差。
預先感謝任何信息
---編輯---
這是代碼從.ini文件讀取SVN命令
public static String iniSVNOkut(String deger, String getObje, String fetchObje){
Ini uzantilariAlIni = null;
try
{
String uzantiAyarlari = "Uzantilar.ini";
try
{
uzantilariAlIni = new Ini(new FileReader(uzantiAyarlari));
}
catch (InvalidFileFormatException e)
{
System.err.print("Hata InvalidFileFormat : " + e.getMessage() + "\n");
e.printStackTrace();
}
catch(FileNotFoundException e)
{
System.err.print("Hata FileNotFoundException : " + e.getMessage() + "\n");
e.printStackTrace();
}
catch (IOException e)
{
System.err.print("Hata IOException : " + e.getMessage() + "\n");
e.printStackTrace();
}
return deger = uzantilariAlIni.get(getObje).fetch(fetchObje);
}
finally
{
}
}
這是什麼.ini包含
[svnAdresi]
svnAdresiniAl = svn co http://svn.svnkit.com/repos/svnkit/trunk/ /Users/sample/Documents/workspace/SatirHesaplaGUI/svnTestMAC
這就是我稱之爲
String svnAdresi;
svnAdresi = IniFonksiyon.iniSVNOkut(svnAdresi, "svnAdresi", "svnAdresiniAl");
Runtime cmdCalistir = Runtime.getRuntime();
try
{
Process islem = cmdCalistir.exec(svnAdresi);
}
catch (Exception e)
{
e.printStackTrace();
}
好的答案,我只是補充一點,您可以指定REVISION_LIMIT直接登錄()方法。然後他們不會被加載到服務器上並通過網絡進行轉換。如果存儲庫有很多修訂,這可能會顯着加快您的實現。 –
非常感謝!那正是我所需要的,如果我們不指定REVISION_LIMIT,那麼它有多重要?由於我正在處理的存儲庫有很多修訂 –
@ Yesilmen:不,如果您不想指定修訂限制,則不必指定修訂限制。在我的應用程序中,我只需要最近的5.對德米特里來說,你是對的。我不記得爲什麼,但我需要一段時間的所有修訂,然後我將代碼限制爲5.我應該把限制放在handleLogEntry方法中。 –