Search Results

Search found 10 results on 1 pages for 'svnclient'.

Page 1/1 | 1 

  • How can a SVN::Error callback identify the context from which it was called

    - by Colin Fine
    I've written some fairly extensive Perl modules and scripts using the Perl bindings SVN::Client etc. Since the calls to SVN::Client are all deep in a module, I have overridden the default error handling. So far I have done so by setting $SVN::Error::handler = undef as described in [1], but this makes the individual calls a bit messy because you have to remember to make each call to SVN::Client in list context and test the first value for errors. I would like to switch to using an error handler I would write; but $SVN::Error::handler is global, so I can't see any way that my callback can determine where the error came from, and what object to set an error code in. I wondered if I could use a pool for this purpose: so far I have ignored pools as irrelevant to working in Perl, but if I call a SVN::Client method with a pool I have created, will any SVN::Error object be created in the same pool? Has anybody any knowledge or experience which bears on this? [1]: http://search.cpan.org/~mschwern/Alien-SVN-1.4.6.0/src/subversion/subversion/bindings/swig/perl/native/Core.pm#svn_error_t_-_SVN::Error SVN::Core POD

    Read the article

  • How do I use SharpSVN to programatically "add to ignore list" for a folder.

    - by Myster
    How do I use SharpSVN to programatically to add a folder to the ignore list? EDIT: Attempted: Here's what I've tried svnClient.GetProperty(new SvnUriTarget("svn://svn.foo.com/" + DatabaseName + "/"), SvnPropertyNames.SvnIgnore, out ignores); ignores += " Artifacts"; var args = new SvnSetPropertyArgs() { BaseRevision = ???, LogMessage = "update ignore list" }; svnClient.SetProperty(new Uri("svn://svn.foo.com/" + DatabaseName + "/"), SvnPropertyNames.SvnIgnore, ignores, args); But I don't know how to get the BaseRevision (I can get it manually, and that works, but all the combinations of GetProperty I tried don't seem to give it to me.) SOLUTION: Based on Bert's Answer SvnGetPropertyArgs getArgs = new SvnGetPropertyArgs(){}; string ignores = "Artifacts"; string result; if(svnClient.GetProperty(new SvnUriTarget("svn://svn.foo.com/" + ProjectName + "/trunk/"), SvnPropertyNames.SvnIgnore,out result)) { ignores = result + " Artifacts"; //TODO: check for existing & tidy formatting. } svnClient.SetProperty(UncPath.TrimEnd('\\'), SvnPropertyNames.SvnIgnore, ignores); SvnCommit(svnClient);

    Read the article

  • Commit in sharpSVN

    - by Pedro
    Hello! I have a problem doing commit with sharpsvn. Now i´m adding all the files of my working copy (if the file is added throws an exception), and after it i do commit. It works but it trows exceptions. There is some way to get the status of the repository before do add() and only add the new files or the files who are changed? And if i delete one file or folder on my working copy , How can i delete these files or folder on the repository? Code: String[] folders; folders = Directory.GetDirectories(direccionLocal,"*.*", SearchOption.AllDirectories); foreach (String folder in folders) { String[] files; files = Directory.GetFiles(folder); foreach (String file in files) { if (file.IndexOf("\\.svn") == -1) { Add(file, workingcopy); } } } Commit(workingcopy, "change"); Add: public bool Add(string path, string direccionlocal) { using (SvnClient client = new SvnClient()) { SvnAddArgs args = new SvnAddArgs(); args.Depth = SvnDepth.Empty; Console.Out.WriteLine(path); args.AddParents = true; try { return client.Add(path, args); } catch (Exception ex) { return false; } } } Commit: public bool Commit(string path, string message) { using (SvnClient client = new SvnClient()) { SvnCommitArgs args = new SvnCommitArgs(); args.LogMessage = message; args.ThrowOnError = true; args.ThrowOnCancel = true; try { return client.Commit(path, args); } catch (Exception e) { if (e.InnerException != null) { throw new Exception(e.InnerException.Message, e); } throw e; } } }

    Read the article

  • Add file using SharpSVN

    - by jan
    Hi, I would like to add all unversioned files under a directory to SVN using SharpSVN. I tried regular svn commands on the command line first: C:\temp\CheckoutDir> svn status -v I see all subdirs, all the files that are already checked in, a few new files labeled "?", nothing with the "L" lock indication C:\temp\CheckoutDir> svn add . --force This results in all new files in the subdirs ,that are already under version control themselves, to be added. I'd like to do the same using SharpSVN. I copy a few extra files into the same directory and run this code: ... using ( SharpSvn.SvnClient svn = new SvnClient() ) { SvnAddArgs saa = new SvnAddArgs(); saa.Force = true; saa.Depth = SvnDepth.Infinity; try { svn.Add(@"C:\temp\CheckoutDir\." , saa); } catch (SvnException exc) { Log(@"SVN Exception: " + exc.Message + " - " + exc.File); } } But an SvnException is raised: SvnException.Message: Working copy 'C:\temp\CheckoutDir' locked SvnException.File: ..\..\..\subversion\libsvn_wc\lock.c" No other svnclient instance is running in my code, I also tried calling svn.cleanup() right before the Add, but to no avail. Since the documentation is rather vague ;), I was wondering if anyone here knew the answer. Thanks in advance! Jan

    Read the article

  • How to use SharpSVN in ASP.NET?

    - by Bryan
    Trying to use use SharpSVN in an ASP.NET app. So far, it's been nothing but trouble. First, I kept getting permission errors on "lock" files (that don't exist), even though NETWORK SERVICE has full permissions on the directories. Finally in frustration I just granted Everyone full control. Now I get a new error: OPTIONS of 'https://server/svn/repo': authorization failed: Could not authenticate to server: rejected Basic challenge (https://server) This happens whether I have the DefaultCredentials set below or not: using (SvnClient client = new SvnClient()) { //client.Authentication.DefaultCredentials = new System.Net.NetworkCredential("user", "password"); client.LoadConfiguration(@"C:\users\myuser\AppData\Roaming\Subversion"); SvnUpdateResult result; client.Update(workingdir, out result); } Any clues? I wish there was SOME documentation with this library, as it seems so useful.

    Read the article

  • Subversion error, but I don't know what it means

    - by DaveDev
    I'm trying to do an Update on my solution but I'm getting the following subversion error: SharpSvn.SvnFileSystemException: Working copy path 'Path_to_image/logo LoRes.jpg' does not exist in repository but I can see that the image is in the repository. The stack trace is as follows: at SharpSvn.SvnClientArgs.HandleResult(SvnClientContext client, SvnException error) at SharpSvn.SvnClientArgs.HandleResult(SvnClientContext client, svn_error_t* error) at SharpSvn.SvnClient.Update(ICollection`1 paths, SvnUpdateArgs args, SvnUpdateResult& result) at SharpSvn.SvnClient.Update(String path, SvnUpdateArgs args, SvnUpdateResult& result) at Ankh.Commands.SolutionUpdateCommand.UpdateRunner.Work(Object sender, ProgressWorkerArgs e) at Ankh.ProgressRunnerService.ProgressRunner.Run(Object arg) Is there something else that could be wrong?

    Read the article

  • Problem with commit in sharpsvn

    - by zhangxiaoning
    Hi,I'm a programmer in china. 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()){ string path = @"C:\testdelete\test.java"; client.Delete(path); client.Authentication.Clear(); // Clear predefined handlers client.Authentication.UserNamePasswordHandlers += delegate(object obj, SharpSvn.Security.SvnUserNamePasswordEventArgs args) { args.UserName = "username"; args.Password = "password"; }; var uri = client.GetUriFromWorkingCopy(path); if (uri != null) { SvnCommitArgs args = new SvnCommitArgs(); args.ThrowOnError = true; args.ThrowOnCancel = true; client.Commit(path, args);//here throw a SvnOperationCanceledException } } But it doesn´t work,Why?Thanks!

    Read the article

  • Multiple CheckOut or Multiple Commit .

    - by marco
    Hello sorry for my English ... I'm using Visual studio 2008 with C# and SharpSVN dll (for Subversion 1.6) I wish to commit to multiple different folders in my repository, but without having to checkout the entire repository. I tried using the method: SVNClient.Commit (ICollection coll, CommitArgs ca); Where eg coll [0] = "c:\svnCheckoutDir\dirLic001\sect\file_ext.ini" and coll [1] = "c:\svnCheckoutDir\dirLic121\sect\file_ext.ini" but I get the error message: "c:\svnCheckoutDir" is not a working copy. when I download the entire repository, I have no problems. but when I do a checkout of the folders you just want to modify the process does not work. Help me please . Marco Untiveros Novatronic Peru SAC.

    Read the article

  • Removing zombie locks in Subversion

    - by ThatBlairGuy
    I'm trying to find a way to remove zombie locks using the Subversion command line tools. The eventual goal is to do this from a hook script, but I haven't been able to work out the command line to use when you only have a physical repository path. (Using svnadmin rmlocks only seems to work for locks which exist in the HEAD revision.) Ideally, I'd like to do this via the post-commit hook script using the command line tools. (I'm aware of the python script for this purpose, but we'd prefer not to install python on that server for this single use.) We're a .NET shop, so creating a tool with the SharpSVN library is also a possibility, but the only unlock capability there appears to be in the SVNClient class. So it's really two questions: Is there a way to do this with the command line tools? If not, is there a way to do it from SharpSVN? (Or perhaps another library?)

    Read the article

1