0

I currently have a requirement where I need to validate that all the files in a folder structure which are in SVN to see if they are up to date. Is there a way to do this using the svn artefacts that are held in the same directory as the file without interacting with SVN?

Apologies, this appears to need some further explanation... I'm iterating through the projects loaded within a solution and can access the corresponding files on the file system. I need to check
a) if corresponding files on the file system match the latest revision if the file is under source control and b) if any or the files or projects have not been added to the SVN.

This is essentially a validation check prior to calling a build server to start a build in case a user has forgotten to check in some changes, new files or new projects to a solution. The build server retrieves the code directly from the source control.

gouldos
  • 1,015
  • 1
  • 16
  • 30
  • 1
    "checked in"? As in, exist in the repository? Or, match the latest revision? – bzlm Oct 15 '10 at 17:23
  • It's not quite clear to me what your asking here... Do you mean inside Visual Studio? or in the folder structure? or... what? – EJC Oct 15 '10 at 17:25
  • @EJC I'm *guessing* they want C# code to determine the svn status of a file in a local working copy. Like `svn.exe st %s` but without the `svn.exe` part. – bzlm Oct 15 '10 at 17:37
  • @bzlm Oh, I see. That sounds like a logical guess I suppose. For which I won't be of much help, without digging around to figure out the answer for myself. :) – EJC Oct 15 '10 at 17:39
  • @EJC Don't bother. Voting to close. :) possible duplicate of [Does anyone know of a good C# API for Subversion?](http://stackoverflow.com/questions/481247/does-anyone-know-of-a-good-c-api-for-subversion) and [this one](http://stackoverflow.com/questions/211765/svn-libraries-for-net) – bzlm Oct 15 '10 at 17:42
  • Why do you want to avoid SVN API? Or you just mean you want to avoid commits prior check? I guess you have Subversion installed either on build-server or server where you want to do your check so you can safely check repo by using SVN API directly or via SharpSVN or via cmdline. – Nick Martyshchenko Oct 15 '10 at 17:50

1 Answers1

1

Do you ask how to detect what files stored in SVN folder(s) are changed?

You ask to do that without interacting with SVN, but I would recommend avoid this because file or folder structure can be changed by Subversion team in future.

Try to use SharpSVN I use it in one of my projects. It handy, stable, has nice API and actively developed.

Also check comments in your question. Anyway you can check source code of SharpSVN to undestand how to make it by yourself

Nick Martyshchenko
  • 4,231
  • 2
  • 20
  • 24
  • My thinking was that removing the need to interact with another system would reduce the complexity. Having read your response I can see that that could be the wrong approach to take. I'll delve into SharpSVN ater the weekend :) – gouldos Oct 15 '10 at 18:30