문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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.
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top