|
From: Clayton H. <cla...@sp...> - 2004-12-20 15:11:55
|
Hi Thomas, the key for the folders object should be the directory name =
of the file you are adding; it looks like this is pathdir for this piece =
of code but it doesn't look like pathdir is being updated in your loop.
If you have multiple files in the same folder though you might want to =
do something like:
if (folders.Contains(pathdir)) {
folder =3D folder[pathdir];
} else {
folder =3D new Folder();
}
Hope that makes sense.
Cheers,
Clayton
> -----Original Message-----
> From: Thomas Guillemin [mailto:tg...@ja...]=20
> Sent: December 20, 2004 1:42 AM
> To: Clayton Harbour
> Subject: Re: [Sharpcvslib-users] Simple question
>=20
>=20
> Hi Clayton
> Yup i got it and tested it too. I've updated my sharpcvslib=20
> sources and=20
> now this part of my app works just fine :)
> Now for the second part, this is the moment i check every=20
> file+revision=20
> in the index file, and try to update each file to the=20
> specified revision:
> foreach (DataTable t in ds.Tables)
> {
> foreach (DataRow r in t.Rows)
> {
> filename =3D (string)r["Filename"];
> version =3D (string)r["Revision"];
> //sw.WriteLine(CVSexe + " -d " + CVSRoot + "=20
> update -r " + version + " " + filename);
> // See, the above line is the emergency temporary solution,=20
> creating a=20
> .bat file with command line cvs.
> folder =3D new Folder();
> folder.Repository =3D=20
> Repository.Load(reposfile);
> entries =3D Entries.Load(dir);
> entry =3D entries[filename];
> folder.Entries.Add(pathdir, entry);
> wd.Folders.Add(pathdir, folder);
> wd.Revision =3D version;
> cmd =3D new UpdateCommand2(wd);
> cmd.Execute(cnx);
>=20
> }
> }
> It crashes on the folder.Add method, claiming that the element had=20
> already been added (french message: Une exception non g=E9r=E9e du =
type=20
> 'System.ArgumentException' s'est produite dans mscorlib.dll
>=20
> Informations suppl=E9mentaires : L'=E9l=E9ment a d=E9j=E0 =E9t=E9 =
ajout=E9. Cl=E9 du=20
> dictionnaire : "D:\Dev\CVSTest\Test2" Cl=E9 ajout=E9e :=20
> "D:\Dev\CVSTest\Test2") (cl=E9 =3D key) I think i'm not doing the=20
> right way. How should i proceed ?
>=20
> Thomas
>=20
> Clayton Harbour wrote:
>=20
> >Hey Thomas, I sent a working copy back of this last week,=20
> did you get=20
> >it?
> >
> > -----Original Message-----=20
> > From: Thomas Guillemin [mailto:tg...@ja...]=20
> > Sent: Thu 16/12/2004 7:40 AM=20
> > To: Clayton Harbour=20
> > Cc:=20
> > Subject: Re: [Sharpcvslib-users] Simple question
> >=09
> >=09
> > ok here is the standard zipped format (at least i hope so)
> > the code is the current one.
> >=09
> > Clayton Harbour wrote:
> >
> > Hey Thomas, I finally had the chance to try to=20
> look at your program=20
> >this morning (had network issues yesterday). Can you=20
> resubmit the file using a different format, I am unable to=20
> unzip using 7zip. Thanks,
> > =09
> > =09
> > Clayton
> > =09
> > -----Original Message-----
> > From: Thomas Guillemin [mailto:tg...@ja...]
> > Sent: Wed 12/15/2004 3:19 AM
> > To: Clayton Harbour
> > Cc:=09
> > Subject: Re: [Sharpcvslib-users] Simple question
> > Hi Clayton
> > =09
> > Here is my solution and the doc, so you can=20
> have a better understanding=20
> > of what i want to do.
> > The textreader is used to create the fileinfo=20
> object you told me to use,=20
> > so it parses my index.xml file (which lists every file).
> > I have now replaced
> > Entry entry =3D new Entry(fi, fstr);
> > by
> > Entry entry =3D Entry.CreateEntry(vpath);
> > and i also placed a line in order to have the=20
> index.xml not stored in=20
> > itself, which could cause some cvs errors
> > (i added "if ((string)dr["Filename"] !=3D=20
> reldirname + "/Index.xml")"=20
> > before "dt.Rows.Add(dr);")
> > and it seems to work better.
> > Now i have some kind of cvs problem, cause i=20
> commit my test repository,=20
> > update all, then i run my app, which first does=20
> an rlog, stores every=20
> > filename and version number in index.xml, then=20
> commits index.xml, and=20
> > then i have a response
> > cvs server: Up-to-date check failed for `Index.xml'
> > i don't understand why it behaves this way, but=20
> i don't think it comes=20
> > from the app now. there must be something i=20
> don't understand in the cvs=20
> > behaviour.
> > =09
> > Clayton Harbour wrote:
> > =09
> > =20
> >
> > Hi Thomas,
> > =20
> > It looks like you are reading in the=20
> entire CVS\Entries file using the=20
> > TextReader. This file will definitely=20
> give you too many '/'=20
> > characters as it is made up of many=20
> Entry objects. Try using the=20
> > following:
> > Entry entry =3D=20
> Entry.CreateEntry(FileInfo managedFile);
> > =20
> > where the managedFile is the file on=20
> your local file system that you=20
> > want to add to the repository. If that=20
> does not work can you please=20
> > send the following:
> > 1) fi.FullName
> > 2) contents of fi.FullName file=20
> that you are trying to read.
> > =20
> > =20
> > Cheers,
> > =20
> > Clayton
> > =09
> > -----Original Message-----
> > *From:* Thomas Guillemin=20
> [mailto:tg...@ja...]
> > *Sent:* December 13, 2004 10:18 AM
> > *To:* Clayton Harbour
> > *Cc:*=20
> sha...@li...
> > *Subject:* Re: [Sharpcvslib-users]=20
> Simple question
> > =09
> > Hi Clayton
> > =09
> > I'm not sure of how to set the=20
> FileInfo object.
> > Here is what i do to replace vpath=20
> by a FileInfo (first line and
> > last line are the same so you can=20
> replace it in the precedent code
> > part):
> > Entries entries =3D=20
> Entries.Load(dir);
> > FileInfo fi =3D new=20
> FileInfo(vpath);
> > TextReader tr =3D=20
> fi.OpenText();
> > string fstr =3D=20
> tr.ReadToEnd();
> > Entry entry =3D new=20
> Entry(fi, fstr);
> > =20
> folder.Entries.Add(pathdir, entry);
> > =09
> > And here is what i get from=20
> execution: (message is in french but
> > that's ok)
> > Une exception non g=E9r=E9e du type
> > =20
> 'ICSharpCode.SharpCvsLib.FileSystem.EntryParseException' s'est
> > produite dans icsharpcode.sharpcvslib.dll
> > =09
> > Informations suppl=E9mentaires : Too=20
> many tokens in entry
> > line.tokens.Length=3D[34]line=3D[<?xml=20
> version=3D"1.0" encoding=3D"utf-8" ?>
> > <Revision_Index>
> > <FileList>
> > <Filename>Test/App.config</Filename>
> > <Revision>1.4</Revision>
> > </FileList>
> > <FileList>
> > =20
> <Filename>Test/AssemblyInfo.cs</Filename>
> > <Revision>1.1</Revision>
> > </FileList>
> > <FileList>
> > <Filename>Test/Index.txt</Filename>
> > <Revision>1.10</Revision>
> > </FileList>
> > <FileList>
> > <Filename>Test/Index.xml</Filename>
> > <Revision>1.9</Revision>
> > </FileList>
> > <FileList>
> > <Filename>Test/Member.cs</Filename>
> > <Revision>1.5</Revision>
> > </FileList>
> > <FileList>
> > <Filename>Test/Pack.xml</Filename>
> > <Revision>1.3</Revision>
> > </FileList>
> > <FileList>
> > <Filename>Test/doc.xml</Filename>
> > <Revision>1.5</Revision>
> > </FileList>
> > <FileList>
> > <Filename>Test/docVPFW.xml</Filename>
> > <Revision>1.4</Revision>
> > </FileList>
> > </Revision_Index>]
> > =09
> > So i don't really know the way i=20
> should do it.
> > Does that ring anything for you ?
> > =09
> > Thanks
> > Thomas
> > =09
> > Clayton Harbour wrote:
> > =09
> > =20
> >
> > Hi Thomas,
> > =20
> > I think you are correct the=20
> commandline option would be uglier.=20
> > Further I think that what=20
> you have found here is a break of some
> > sort and should be fixed. =20
> Having said that I believe that vpath
> > is a string, am I correct? =20
> If a string is passed in the
> > application will try to=20
> "guess" if the string is a File or
> > Directory. I have added=20
> methods for most parts of the API to
> > take either a FileInfo or=20
> DirectoryInfo object. Could you try
> > changing your vpath to a=20
> FileInfo object (and use
> > FileInfo.FullPath fo the=20
> folders Hashtable) and let me know if
> > that gets you by the latest=20
> challenge? I will look into the
> > actual cause of the break tonight.
> > =20
> > =20
> > Cheers,
> > =20
> > Clayton
> > =09
> > -----Original Message-----
> > *From:* Thomas=20
> Guillemin [mailto:tg...@ja...]
> > *Sent:* December 13,=20
> 2004 2:32 AM
> > *To:* Clayton Harbour
> > *Cc:*=20
> sha...@li...
> > *Subject:* Re:=20
> [Sharpcvslib-users] Simple question
> > =09
> > Hi
> > =09
> > The recent changes seem=20
> to have deeply changed the whole
> > behaviour. First, the=20
> first part that was working quite fine
> > now generates a file=20
> not found exception ; it looks for
> > =20
> d:\dev\CVSTest\Test\Index.xml\CVS (still with that part of
> > the code:
> > =20
DirectoryInfo dir =3D new
> > =20
> DirectoryInfo(Path.Combine(pathdir, "CVS"));
> > =20
FileInfo reposfile =3D new FileInfo(pathdir +
> > "\\CVS\\Repository");
> > Folder=20
> folder =3D new Folder();
> > =20
folder.Repository =3D Repository.Load(reposfile);
> > Entries=20
> entries =3D Entries.Load(dir);
> > Entry=20
> entry =3D entries[vpath];
> > =20
folder.Entries.Add(pathdir, entry);
> > =20
> wd.Folders.Add(pathdir, folder);
> > cnx =3D=20
> new CVSServerConnection(wd);
> > =20
RegisterListenEvents(cnx);
> > =20
cnx.Connect(wd, userpass);
> > =20
> CommitCommand2 cmd2 =3D new CommitCommand2(wd);
> > =20
cmd2.Execute(cnx);
> > cnx.Close();
> > knowing that pathdir =3D=20
> d:\dev\CVSTest\Test\, and vpath =3D
> > d:\dev\CVSTest\Test\Index.xml)
> > Any recommandation ?=20
> i'm not sure of what i should change or
> > not change, now i feel=20
> like i understand the mechanism less
> > and less...
> > And for the second part=20
> (i'm currently on it so maybe i will
> > find more today) i do:
> > cnx =3D=20
> new CVSServerConnection(wd);
> > =20
cnx.Connect(wd, userpass);
> > =20
RegisterListenEvents(cnx);
> > =20
UpdateCommand2 cmd =3D new UpdateCommand2(wd);
> > =20
cmd.Execute(cnx);
> > and nothing appears in=20
> my textbox (knowing that
> > registerlistenevents=20
> starts the requests, responses and
> > errors listening and=20
> that no internal error appears, every
> > line is passed fine in=20
> trace mode). What do you think ?
> > =09
> > For your information,=20
> i'm working here until 24/12, then i
> > quit. I'd like to give=20
> them something finished as for my
> > other works ; and i=20
> also would like to send you this app that
> > could be an example of=20
> how to use your lib. So if we can't be
> > done for this date, i'm=20
> not sure of when i'll finish it,
> > because i'm not sure of=20
> when i'll be programming again at
> > all. And i'm also=20
> thinking that if you keep changing elements
> > of the base structure=20
> after that, which is much probable, my
> > example won't be of any=20
> use anymore, so, maybe i could just
> > replace the stuff by a=20
> command-line maker that would do what
> > i want, that's ugly,=20
> but tell me what you think.
> > =09
> > Thomas
> > =09
> > Clayton Harbour wrote:
> > =09
> > =20
> >
> > Hi Thomas,
> > =20
> > I agree with=20
> making the Folders object the default. When I
> > move the=20
> Property I will make the accessor a Folders object
> > (which is=20
> backed by a Hashtable, but implements
> > ICollection). =20
> That is going to take awhile because I would
> > like to=20
> refactor all commands to have something like
> > that...and=20
> won't be in right away. For the immediate I will
> > try to make=20
> sure changing the Folders and FoldersToUpdate to
> > use the same=20
> variable under the covers which should
> > accomplish some=20
> of what you need.
> > =20
> > Adding the -A=20
> should be rather simple. If you look at the
> > Tag property it=20
> is basically like you describe below. As
> > far as I=20
> remember the remove sticky tags always operates on
> > an enumeration=20
> of files (i.e. we are unable to pick and
> > choose which=20
> file to remove stickies unless you execute the
> > command more=20
> than once). So it should make sense to set the
> > -A (on=20
> requested) for the group of folders in the
> > =20
FoldersToUpdate...hopefully I am making sense > here :-). I
> > will try to get=20
> this in tonight if I have time, I have added
> > it as issue ( 1082691 ).
> > =20
> > =20
> > Cheers,
> > =20
> > Clayton
> > =09
> > =20
> -----Original Message-----
> > *From:*=20
> Thomas Guillemin [mailto:tg...@ja...]
> > *Sent:*=20
> December 9, 2004 7:43 AM
> > *To:*=20
> Clayton Harbour
> > *Cc:*=20
> sha...@li...
> > *Subject:*=20
> Re: [Sharpcvslib-users] Simple question
> > =09
> > yeah that's great.
> > i'll have=20
> to wait for the cvs changes ; btw i think you
> > should also=20
> transform the class of FoldersToUpdate: it
> > is a=20
> Folder[], so one can't use the Add method, while
> > Folders is=20
> a FileSystem.Folders object (which is, i
> > guess, some=20
> kind of an ArrayList right ?) which is way
> > more easy=20
> to use for our purposes.
> > Another=20
> issue i'm thinking of is the sticky tags
> > thing...=20
> Personnally, when i want to remove some tags i
> > just type=20
> an 'update -A' command... but here for some
> > people it=20
> could be harmful. For the moment, i think the
> > easiest way=20
> would be to add a special property to the
> > =20
updatecommand class, so that people would only > use it
> > when=20
> needed... but there could be different
> > =20
possibilities (and i don't know cvs enough to be > able to
> > enumerate them).
> > What do you think ?
> > =09
> > Thomas
> > =09
> > Clayton=20
> Harbour wrote:
> > =09
> > =20
> >
> > Hi Thomas,
> > =09
> > Yeah, that is a bit of=20
> ugliness. The whole Folders/=20
> >FoldersToUpdate needs to be reworked actually. The basic=20
> idea was to store an entire list of the CVS Entries Folders=20
> in the Folders property and then filter that and put it in=20
> the FoldersToUpdate property. I have filed a bug on this=20
> (1082194) and the simple solution will probably be to just=20
> make the two properties equal if there are no issues anywhere=20
> else in the library.
> > =09
> > In the meantime though=20
> if you populate the FoldersToUpdate=20
> >Property instead that should fix your issue.
> > =09
> > I have also added a=20
> check to see if the FoldersToUpdate is null=20
> >and if so the method just returns which is better than the=20
> NullPointer.
> > =09
> > =09
> > Cheers,
> > =09
> > =09
> > Clayton
> > =09
> > -----Original Message-----
> > From: Thomas=20
> Guillemin [mailto:tg...@ja...]
> > Sent: Thu 12/9/2004 3:42 AM
> > To: Clayton Harbour
> > Cc:=09
> sha...@li...
> > Subject: Re:=20
> [Sharpcvslib-users] Simple question
> > hi hi
> > thanks for that you're=20
> great clayton, now my committing function seems=20
> > to work fine.
> > Now i'm still having=20
> problems with my update function, which begins with=20
> > the update of one file=20
> (still the index.xml):
> > if (File.Exists(IndexPath))
> > {
> > string=20
> pathdir =3D vpath.Substring(0,=20
> > IndexPath.LastIndexOf("\\"));
> > string=20
> wdirname =3D pathdir.Substring(0,=20
> > pathdir.LastIndexOf("\\"));
> > =09
> > string=20
> reldirname =3D=20
> > =09
> pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -=20
> > pathdir.LastIndexOf("\\")-1);
> > // We=20
> update the index file to the desired revision
> > // (the=20
> last one by default)
> > wd =3D new=20
> WorkingDirectory(cvsroot, wdirname, reldirname);
> > if=20
> (Revision !=3D "" && Revision !=3D "Last Version")
> > {
> > =20
> wd.Revision =3D Revision;
> > }
> > =20
DirectoryInfo dir =3D new=20
> > =09
> DirectoryInfo(Path.Combine(pathdir, "CVS"));
> > FileInfo=20
> reposfile =3D new FileInfo(pathdir +=20
> > "\\CVS\\Repository");
> > Folder=20
> folder =3D new Folder();
> > =20
folder.Repository =3D Repository.Load(reposfile);
> > Entries=20
> entries =3D Entries.Load(dir);
> > Entry=20
> entry =3D entries[vpath];
> > =20
folder.Entries.Add(pathdir, entry);
> > =20
wd.Folders.Add(pathdir, folder);
> > =20
//Debug.WriteLine> (wd.FoldersToUpdate.Length.ToString());
> > cnx =3D=20
> new CVSServerConnection(wd);
> > =20
cnx.Connect(wd, userpass);
> > =20
RegisterListenEvents(cnx);
> > =20
UpdateCommand2 cmd =3D new UpdateCommand2(wd);
> > cmd.Execute(cnx);
> > =09
> > It crashes on=20
> UpdateCommand2.Execute(): =20
> > =09
> workingDirectory.FoldersToUpdate is NULL and so i get a=20
> > nullreferenceexception...
> > Do you know how i must proceed ?
> > =09
> > Thomas
> > =09
> > Clayton Harbour wrote:
> > =09
> > =20
> > =09
> > =20
> >
> > Hi Thomas, just=20
> checking back in if you are still having an issue=20
> >with this. I have been looking at the error message below=20
> and it looks like the Repository folder may have an extra=20
> empty line near the end. I added a trim on December 3rd that=20
> might take care if this if you could try it again.
> > =09
> > Cheers,
> > =09
> > Clayton
> > =09
> > =09
> > -----Original Message-----
> > From: Thomas=20
> Guillemin [mailto:tg...@ja...]
> > Sent: Mon 12/6/2004 7:43 AM
> > To: Clayton Harbour
> > Cc:=09
> sha...@li...
> > Subject: Re:=20
> [Sharpcvslib-users] Simple question
> > i'm using the lib,=20
> updated last week (i'm waiting for sourceforge to be=20
> > up again and i'll=20
> update then), so no cvs.exe, and the server is a cvsnt=20
> > on windows xp, :pserver:.
> > I was only listening to=20
> response events, not the request ones. I have=20
> > added it, and here is=20
> what i get from my TextBox now:
> > REQUEST:=20
> [Valid-responses ok error Valid-requests Checked-in New-entry=20
> > Updated Created Merged=20
> Mod-time Removed Set-static-directory=20
> > Clear-static-directory=20
> Set-sticky Clear-sticky Module-expansion M E MT]
> > --> []
> > REQUEST: [valid-requests]
> > --> []
> > RESPONSE: Root=20
> Valid-responses valid-requests Directory Max-dotdot=20
> > Static-directory Sticky=20
> Entry EntryExtra Kopt Checkin-time Modified=20
> > Is-modified=20
> UseUnchanged Unchanged Notify NotifyUser Questionable Utf8=20
> > Argument Argumentx=20
> Global_option Gzip-stream wrapper-sendme-rcsOptions=20
> > Set Rename=20
> VirtualRepository expand-modules ci co chown setowner setperm=20
> > chacl setacl lsacl=20
> passwd info update diff log rlog add remove=20
> > update-patches status=20
> ls rdiff tag rtag import admin export history=20
> > release watch-on=20
> watch-off watch-add watch-remove watchers editors init=20
> > annotate rannotate noop=20
> version Rootless-stream-modification=20
> > Kerberos-encrypt=20
> Gssapi-encrypt Protocol-encrypt Gssapi-authenticate=20
> > Protocol-authenticate=20
> read-cvsrc read-cvsrc2 read-cvsignore=20
> > read-cvswrappers=20
> Error-If-Reader Valid-RcsOptions
> > - (=20
> ValidRequestsResponse )REQUEST: [UseUnchanged]
> > --> []
> > REQUEST: [Root /CVSRep]
> > --> []
> > REQUEST: [Global_option -q]
> > --> []
> > REQUEST: [Argument -m]
> > --> []
> > REQUEST: [Argument LOG MESSAGE]
> > --> []
> > REQUEST: [Argument --]
> > --> []
> > REQUEST: [Directory .]
> > --> [/CVSRep/Test
> > ]
> > --> []
> > --> []
> > REQUEST: [Entry=20
> /Index.xml/1.6/Mon Dec 6 16:32:25 2004+Fri Dec 3=20
> > 12:03:15 2004//T1.6]
> > --> []
> > REQUEST: [Modified Index.xml]
> > --> [u=3Drw,g=3Drw,o=3Drw]
> > --> []
> > REQUEST: [Directory .]
> > --> [/CVSRep/Test
> > ]
> > --> []
> > --> []
> > REQUEST: [Argument Index.xml]
> > --> []
> > REQUEST: [ci]
> > --> []
> > ERROR: cvs server: M =20
> unrecognized request `'
> > =09
> > does that put some=20
> light on the scene ?
> > =09
> > Clayton Harbour wrote:
> > =09
> > =09
> > =09
> > =20
> > =09
> > =20
> >
> > Which version of the=20
> client are you using Thomas? Also which version=20
> > of server are you=20
> connecting to? If you are using the code from cvs=20
> > could you do an update,=20
> sometimes it takes a while for sourceforge's=20
> > development cvs server=20
> to replicate to the anonymous server. Also=20
> > verify that you are=20
> handling the following events:
> > =20
serverConn.RequestMessageEvent +=3D
> > =20
> new MessageEventHandler(Writer.WriteLine);
> > =20
serverConn.ResponseMessageEvent +=3D
> > =20
> new MessageEventHandler(Writer.WriteLine);
> > =09
> > This will print out all=20
> requests and responses. What I am suspecting=20
> > is that there is a=20
> CaseRequest being sent that the server does not=20
> > like...at least that=20
> was an issue I came across l week. Let me know=20
> > what you find out.
> > =09
> > =09
> > Cheers,
> > =09
> > Clayton
> > =09
> > -----Original Message-----
> > *From:* Thomas=20
> Guillemin [mailto:tg...@ja...]
> > *Sent:* December 6,=20
> 2004 1:53 AM
> > *To:* Clayton Harbour
> > *Cc:*=20
> sha...@li...
> > *Subject:* Re:=20
> [Sharpcvslib-users] Simple question
> > =09
> > hm, it behaves=20
> exactly the same with this line instead.
> > and i still get [cvs=20
> server: M unrecognized request `'] in the=20
> >end...
> > =09
> > Clayton Harbour wrote:
> > =09
> > =20
> > =09
> > =20
> > =09
> > =20
> >
> > Hi Thomas,
> > =20
> > I think this line:
> > FileInfo file =3D=20
> new FileInfo(pathdir + \\CVS <file://%5C%5CCVS> <file://%5C%5CCVS> );
> > should be:
> > DirectoryInfo dir=20
> =3D new DirectoryInfo(Path.Combine(pathdir,
> > "CVS");
> > =20
> > I am surprised that=20
> you don't get an error when you do an
> > Entries entries =3D=20
> Entries.Load(file);
> > =20
> > There is no=20
> CvsFileNotFoundException being thrown? Are you sure
> > you are not trapping=20
> this error silently?
> > =20
> > =09
> > -----Original Message-----
> > *From:* Thomas=20
> Guillemin [mailto:tg...@ja...]
> > *Sent:* December=20
> 2, 2004 8:12 AM
> > *To:* Clayton Harbour
> > *Cc:*=20
> sha...@li...
> > *Subject:* Re:=20
> [Sharpcvslib-users] Simple question
> > =09
> > mh i'm not sure=20
> to understand...
> > here is my code:
> > =09
> > (...stuff...)
> > wd =3D new=20
> WorkingDirectory(CVSRoot, wdirname, reldirname);
> > cnx =3D new=20
> CVSServerConnection(wd);
> > cnx.Connect(wd, userpass);
> > (...stuff...)
> > then:
> > pathdir is the=20
> full local dir path where the file i want to
> > commit is stored=20
> (ie: D:\Dev\CVSTest\Test\)
> > vpath is the path=20
> for the file (ie:
> > =20
> D:\Dev\CVSTest\Test\Index.xml)
> > =09
> > =20
> wd.Folders.Clear();
> > =20
> FileInfo file =3D new FileInfo(pathdir + "\\CVS");
> > =20
> FileInfo reposfile =3D new FileInfo(pathdir +
> > "\\CVS\\Repository");
> > =20
> Folder folder =3D new Folder();
> > =20
> folder.Repository =3D Repository.Load(reposfile);
> > =20
> Entries entries =3D Entries.Load(file);
> > =20
> Entry entry =3D entries[vpath];
> > =20
> folder.Entries.Add(pathdir, entry);
> > =20
> wd.Folders.Add(pathdir, folder);
> > =20
> cnx =3D new CVSServerConnection(wd);
> > =20
> cnx.Connect(wd, userpass);
> > =20
> CommitCommand2 cmd2 =3D new CommitCommand2(wd);
> > =20
> cmd2.Execute(cnx);
> > =20
> cnx.Close();
> > =09
> > it makes no=20
> error, but no message at all in my textbox (where
> > i print errors=20
> and responses as well).
> > do you think this=20
> will work at all, and commit only the file
> > i want ? (Index.xml)
> > =09
> > btw, i have to do=20
> exactly the same (with the revision number
> > for the specified=20
> file added) for updating some files.
> > =09
> > Clayton Harbour wrote:
> > =09
> > =20
> > =09
> > =20
> > =09
> > =20
> >
> > Hi Thomas,
> > =09
> > The code would look=20
> something like this:
> > Folder folder =3D=20
> new Folder();
> > Entries entries=20
> =3D new Entries.Load(file);
> > Entry entry =3D=20
> entries[file];
> > =09
> Folder.Entries.Add(entry);
> > =09
> WorkingDirectory wd.Folders.Add(folder);
> > =09
> > I have not compiled=20
> this code so you may have to play with it somewhat.
> > The basic idea is that=20
> you have to populate the Folders object on the
> > working directory with=20
> the Entry you want to update.
> > =09
> > =09
> > Cheers,
> > =09
> > Clayton
> > =09
> > =09
> > =09
> > =20
> > =09
> > =20
> > =09
> > =20
> >
> > -----Original Message-----
> > From: Thomas Guillemin=20
> [mailto:tg...@ja...]=20
> > Sent: December 2, 2004 5:45 AM
> > To:=20
> sha...@li...
> > Subject:=20
> [Sharpcvslib-users] Simple question
> > =09
> > =09
> > Hi
> > Can someone show me how=20
> i must proceed to update/commit only=20
> > one file ?=20
> > (with=20
> UpdateCommand2/CommitCommand2)
> > Thanks
> > =09
> > Thomas
> > =09
> > =09
> > =09
> -------------------------------------------------------
> > SF email is sponsored=20
> by - The IT Product Guide
> > Read honest & candid=20
> reviews on hundreds of IT Products from=20
> > real users. Discover=20
> which products truly live up to the=20
> > hype. Start reading now.=20
> > =09
> http://productguide.itmanagersjournal.com/
> > =09
> _______________________________________________
> > Sharpcvslib-users=20
> mailing list Sha...@li...
> > =09
> https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
> > =09
> > =20
> > =09
> > =20
> > =09
> > =20
> > =09
> > =20
> >
> > =09
> -------------------------------------------------------
> > SF email is sponsored=20
> by - The IT Product Guide
> > Read honest & candid=20
> reviews on hundreds of IT Products from real users.
> > Discover which products=20
> truly live up to the hype. Start reading now.=20
> > =09
> http://productguide.itmanagersjournal.com/
> > =09
> _______________________________________________
> > Sharpcvslib-users mailing list
> > =09
> Sha...@li...
> > =09
> https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
> > =09
> > =09
> > =09
> > =20
> > =09
> > =20
> > =09
> > =20
> >
> > =20
> > =09
> > =20
> >
> > =09
> > =09
> > =09
> -------------------------------------------------------
> > SF email is sponsored=20
> by - The IT Product Guide
> > Read honest & candid=20
> reviews on hundreds of IT Products from real users.
> > Discover which products=20
> truly live up to the hype. Start reading now.=20
> > =09
> http://productguide.itmanagersjournal.com/
> > =09
> _______________________________________________
> > Sharpcvslib-users mailing list
> > =09
> Sha...@li...
> > =09
> https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
> > =09
> > =20
> > =09
> > =20
> >
> > =09
> > =09
> > =20
> >
> > =20
> >
>=20
|