|
From: Thomas G. <tg...@ja...> - 2004-12-02 16:14:24
|
mh i'm not sure to understand...
here is my code:
(...stuff...)
wd = new WorkingDirectory(CVSRoot, wdirname, reldirname);
cnx = new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
(...stuff...)
then:
pathdir is the full local dir path where the file i want to commit is
stored (ie: D:\Dev\CVSTest\Test\)
vpath is the path for the file (ie: D:\Dev\CVSTest\Test\Index.xml)
wd.Folders.Clear();
FileInfo file = new FileInfo(pathdir + "\\CVS");
FileInfo reposfile = new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder = new Folder();
folder.Repository = Repository.Load(reposfile);
Entries entries = Entries.Load(file);
Entry entry = entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx = new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 = new CommitCommand2(wd);
cmd2.Execute(cnx);
cnx.Close();
it makes no error, but no message at all in my textbox (where i print
errors and responses as well).
do you think this will work at all, and commit only the file i want ?
(Index.xml)
btw, i have to do exactly the same (with the revision number for the
specified file added) for updating some files.
Clayton Harbour wrote:
>Hi Thomas,
>
>The code would look something like this:
> Folder folder = new Folder();
> Entries entries = new Entries.Load(file);
> Entry entry = entries[file];
> Folder.Entries.Add(entry);
> WorkingDirectory wd.Folders.Add(folder);
>
>I have not compiled this code so you may have to play with it somewhat.
>The basic idea is that you have to populate the Folders object on the
>working directory with the Entry you want to update.
>
>
>Cheers,
>
>Clayton
>
>
>
>>-----Original Message-----
>>From: Thomas Guillemin [mailto:tg...@ja...]
>>Sent: December 2, 2004 5:45 AM
>>To: sha...@li...
>>Subject: [Sharpcvslib-users] Simple question
>>
>>
>>Hi
>>Can someone show me how i must proceed to update/commit only
>>one file ?
>>(with UpdateCommand2/CommitCommand2)
>>Thanks
>>
>>Thomas
>>
>>
>>-------------------------------------------------------
>>SF email is sponsored by - The IT Product Guide
>>Read honest & candid reviews on hundreds of IT Products from
>>real users. Discover which products truly live up to the
>>hype. Start reading now.
>>http://productguide.itmanagersjournal.com/
>>_______________________________________________
>>Sharpcvslib-users mailing list Sha...@li...
>>https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
>>
>>
>>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://productguide.itmanagersjournal.com/
>_______________________________________________
>Sharpcvslib-users mailing list
>Sha...@li...
>https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
>
>
>
|