3

I have some files that I want to commit:

C:\Dir1\Dir2\Data\dfile1.txt

C:\Dir1\Dir2\Tools\tfile1.xml

When I try to use svnClient.Commit(ICollection) for the above paths, I get 'Dir2 is not a working copy' error.

However, if I commit them one by one in a loop, it commits fine. Apparently, svn signature exists for the Data and Tools folders but not for the Dir2 folder.

Any ideas on how to do a batch commit ?

Edit: More info: If I select Dir2 via tortoise svn, I do not see the 'svn commit' option but if I select 'Data' and 'Tools' together with my mouse on the right hand side of my windows explorer, I can see the 'svn commit' option.

DeeStackOverflow
  • 2,741
  • 4
  • 23
  • 23

1 Answers1

2

There's no real solution to you problem. What you're seeing is correct behavior of both tools. TortoiseSvn will commit Data and Tools in a loop when you go ahead and do that. SharpSvn only offers the Commit(ICollection) overload to commit multiple files within the same working copy. In your case Data and Tools are separate working copies (from what I understand so far).

Sander Rijken
  • 21,376
  • 3
  • 61
  • 85
  • Agreed. But when I use tortoise svn to do the commit like that, when I check the log on one of those files, I see the list of other files that were committed (greyed out list in the bottom window). Somehow there is a 'grouping' done which is helpful in that it tells about a unit of work done. How is tortoise able to achieve that if it is committing the files individually in a loop ? If I commit files in a loop using sharpsvn, I do not see the other files in the show log window. – DeeStackOverflow May 08 '11 at 20:41
  • 2
    TortoiseSVN temporarily creates a working copy in the common ancestor of the directories you select. (Which may or may not work and may or may not break your working copy). It looks like this scenario will be fully supported in subversion 1.7, without hacks. – Bert Huijben May 11 '11 at 19:17