sharpsvn

How to get list of uncommitted files from SharpSVN

拟墨画扇 提交于 2020-01-06 04:24:07
问题 Using SharpSvn, how can I get a list of files that need to be committed (the list that you would see if you right click on a folder with tortoisesvn and hit commit) I tried this: SharpSvn.SvnClient client = new SharpSvn.SvnClient(); Collection<SvnListChangeListEventArgs> list; bool result = client.GetChangeList(@"C:\MyProjectPath", out list); But it seems to be returning a list of every file in the project instead of just the modified ones. 回答1: The function you're using is for the changelist

Decrypt SVN authentication data

风格不统一 提交于 2019-12-25 03:53:56
问题 I would like to get the name of a working copy user. The authentication data is saved in %appdata%\subversion\auth. , however it is encrypted. Is it possible to decrypt it programmatically using c#? Any help would be highly appreciated! 回答1: TortoiseSVN Password Decrypter and it's sources 来源: https://stackoverflow.com/questions/25018572/decrypt-svn-authentication-data

SharpSVN SvnUI.Bind to WPF window

安稳与你 提交于 2019-12-25 01:45:22
问题 I am guessing there is no way to Bind call SharpSVN in a WPF application? I was just following there tutorial, and I found out that you can't bind becuase this isn't a Windows.Forms application. Quite the bummer. I was really cooking there for a minute. 回答1: Currently the answer is: No. For compatibility SharpSvn is compiled against .Net 2.0, so doesn't have access to the WPF classes. You could implement your own IWin32Window to provide a Hwnd. Googling a bit provided me this sample code.

SvnClient.GetStatus(path, args, statuses) returning 0 for versioned file?

放肆的年华 提交于 2019-12-23 09:49:36
问题 I have written a simple C# app using SharpSVN to query the status of a file prior to attempting an add. The examples I've seen in various places for this very purpose involve calling the GetStatus method of the SvnClient, passing in the full path and an out parameter to a collection of SvnStatusEventArgs. My understanding is that, for a file, GetStatus should return with an SvnStatusEventArgs collection having a count of exactly one, with a status among NotVersioned, Missing, Normal, and so

Using client.status in c# with sharpsvn

旧时模样 提交于 2019-12-22 08:44:09
问题 I want to use the status method but i dont understand how it works. Could someone show me an example of use please? EventHandler < SvnStatusEventArgs > statusHandler = new EventHandler<SvnStatusEventArgs>(void(object, SvnStatusEventArgs) target); client.Status(path, statusHandler); 回答1: Well, it'll work exactly like the svn status command : http://svnbook.red-bean.com/en/1.0/re26.html You'll get the list of files pumped to the EventHandler: using(SvnClient client = /* set up a client */ ){

How to access file information in a pre-commit hook using SharpSVN

我的梦境 提交于 2019-12-19 04:22:07
问题 I am new to SharpSVN and SVN in general. I am trying to implement a pre-commit hook that when the user commits a certain type of XML file; I am going to need to intercept the file and analyze it to ensure they included certain elements before I allow the file to be committed. Since it seems that SVN submits two arguments; the repository path and the transaction; I will need to use these two items to intercept the file. Does anyone know what I need to use in SharpSVN to get file information

Using SharpSvn to retrieve log entries within a date range

こ雲淡風輕ζ 提交于 2019-12-18 19:11:14
问题 I'm using SharpSvn to interact with my svn repository via C# code. I am using this code to retrieve svn log entries: Collection<SvnLogEventArgs> logitems; var uri = new Uri("http://myserver/svn/foo/bar.txt"); client.GetLog(uri, out logitems); foreach (var logentry in logitems) { string author = logentry.Author; string message = logentry.LogMessage; DateTime checkindate = logentry.Time; } This works well, but now I want to restrict the returned log entries by revision date. This is something

How to checkout a specific file in repository using sharpsvn API?

和自甴很熟 提交于 2019-12-13 04:06:51
问题 How to checkout a specific or a single file in repository using SharpSvn API???? 回答1: Subversion doesn't allow checking out files by itself as the smallest working copy consists of a directory. What you could do is the equivalent of svn co http://my.example/repository/subdir --depth empty F:\scratch-dir svn up F:\scratch-dir\file</code></pre> This will give you a checkout of http://my.example/repository/subdir as F:\scratch-dir\file. This allows changing the file and committing changes to it.

Problem with commit in sharpsvn

血红的双手。 提交于 2019-12-13 01:17:45
问题 I want to commit the changes of a working copy in my computer to the repository. The repository is in an URL and i´m doing this now: using (SvnClient client = new SvnClient()) { SvnCommitArgs ca = new SvnCommitArgs(); ca.ChangeLists.Add(workingcopydir + filename); ca.LogMessage = "Change"; client.Add(workingcopydir + filename); try { client.Commit(workingcopydir, ca); //, ca, out resultado } catch (Exception exc) { MessageBox.Show(this, exc.Message, "Error", MessageBoxButtons.OK,

How can i get access to the SVN pre-commit message using SharpSVN?

假如想象 提交于 2019-12-13 00:27:06
问题 i see that all I can set to is %repos% and %txn% how can I use those to get to the commit message (in my case, so i can parse out the ticket number so i can see if it exists in the bug database before committing to it) 回答1: Using a recent SharpSvn release you can use SvnHookArguments ha; if (!SvnHookArguments.ParseHookArguments(args, SvnHookType.PreCommit, false, out ha)) { Console.Error.WriteLine("Invalid arguments"); Environment.Exit(1); } to parse the arguments of a pre-commit hook and