Question

My question is quite simple and with the SharpSvn Api, it should be easy as well. Here what I did:

path = "c:\project";
using (SvnLookClient client = new SvnLookClient())
{
    SvnLookOrigin o = new SvnLookOrigin(path);
    Collection<SvnChangedEventArgs> changeList;
    client.GetChanged(o, out changeList); // <-- Exception
}

and when I call the GetChanged, I get an exception:

Can't open file 'c:\project\format': The system cannot find the file specified.

So, Maybe there is something I'm missing? Or maybe it's not the right way to do find out the list of files and folders that were modified in the local repository?

Thanks in advance.

Was it helpful?

Solution

The SvnLookClient class in SharpSvn is the equivalent to the 'svnlook' console application. It is a low level tool that enables repository hooks to look into specific transactions of a repository using direct file access.

You probably want to use the SvnClient class to look at a WorkingCopy and most likely its Status() or in some cases simpler GetStatus() function to see what changed.

OTHER TIPS

The path that the SvnLookOrigin constructor wants is actually:

path = "c:\project\.svn\";

That is, it wants that special ".svn" directory not just the root of where the source is checked out to.

Although you probably do want to listen to Bert and do something like:

path = "c:\project";
using (SvnLookClient client = new SvnLookClient())
{
    SvnLookOrigin o = new SvnLookOrigin(path);
    Collection<SvnChangedEventArgs> changeList;
    client.GetStatus(o, out changeList); // Should now return the differences between this working copy and the remote status.
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top