Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

I am unable to retrieve the local modified to files for to commit.
Once i commit all will be update in repository.

I want to bind the modified files and newly added files to data source control.
Based on checked files only i have to commit..

Can any one help me on this?
Posted
Comments
ZurdoDev 2-Dec-14 8:37am    
Where are you stuck? You need to add a lot more context and detail.
suman palla 2-Dec-14 8:45am    
I am unable to find out the list of files and folders that were modified in the local repository?
ZurdoDev 2-Dec-14 8:47am    
But you need to provide detail. Why can't you get the list of files? Do you get an error? How are you trying to get the list of files? Etc, etc. We can't see anything that you are doing.
suman palla 2-Dec-14 9:04am    
SvnClient client = new SvnClient();
SvnStatusArgs sa = new SvnStatusArgs();
sa.Depth = SvnDepth.Infinity;
sa.RetrieveAllEntries = true; //the new line
System.Collections.ObjectModel.Collection<svnstatuseventargs> statuses;

client.GetStatus(file, sa, out statuses);

i am using the above code. It retrieves all the files in the local . In this list i have to figure out the modified , deleted and newly added files...

But it seems to be returning a list of every file in the project instead of just the modified ones.

1 solution

Check the LocalContentStatus property on the statuses, here is an example:

C#
var statusArgs = new SvnStatusArgs();
statusArgs.Depth = SvnDepth.Infinity;
statusArgs.RetrieveAllEntries = true;
Collection<SvnStatusEventArgs> statuses;
svnClient.GetStatus(@"C:\SVN\stuff\", statusArgs, out statuses);
foreach (SvnStatusEventArgs statusEventArgs in statuses)
{
   if (statusEventArgs.LocalContentStatus == SvnStatus.Modified)
      Console.WriteLine("Modified file: " + statusEventArgs.Path);
}
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900