You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(3) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(20) |
| 2005 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: SourceForge.net <no...@so...> - 2007-05-09 07:21:56
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4302950 By: sly44 I’m a beginner in SharpCVSlib, I would like to connect to my CVS Server and make a list of all directories (modules ?) exists in my repository. I can’t see how I have to do ! I had write this : -------------------------------- CvsRoot rootCVS = new CvsRoot(":pserver:spiau@sldbe3a:/app/projetsCVS/be"); WorkingDirectory workingdirectory = new WorkingDirectory(rootCVS, "D:\\Test", "test11"); CVSServerConnection cnxCVS = new CVSServerConnection(workingdirectory); cnxCVS.Connect(workingdirectory, "mypassword"); cnxCVS.SubmitRequest(new ArgumentRequest(workingdirectory.ModuleName)); cnxCVS.SubmitRequest(new DirectoryRequest(".", workingdirectory.CvsRoot.CvsRepository + "/" + workingdirectory.ModuleName)); cnxCVS.SubmitRequest (new ListRequest()); -------------------------------- I don’t know if it’s the best way to do… ? At the last line, the program crash and I have to do “Ctrl-Alt-Suppr” !! I don’t know why ? Is someone can help me ? Thank you very much. Sly. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=267247 |
|
From: Dipl. I. A. A. <Di...@al...> - 2007-02-02 19:28:09
|
Hi, I am trying to make a basic checkout. But I could not make a connection. Cvs is running local. It fails and I get the failure: Unknown protocol=[local]. cvsConnection = new CVSServerConnection(); cvsRoot = new CvsRoot(@":local:D:/TEST_DIR/CvsVersionBroker/Repository/CVSROOT"); workingDirectory = new WorkingDirectory(cvsRoot, @"D:\Test\CvsWorkingCopy", "Repository"); cvsConnection.Connect(workingDirectory, ""); CheckoutModuleCommand checkoutCmd = new CheckoutModuleCommand(workingDirectory); checkoutCmd.Execute(cvsConnection); Can somebody help me? Ali ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
|
From: Imran A. <Im...@PL...> - 2005-03-15 09:11:32
|
Hi ,
I'm Imran. I was looking out for a C# CVS Library for usage in my .Net
application when I came across NetCVSLibrary version 2.0 which is part of
the isharpcode project.
I'm in the process of writing a sample winforms application in C# that would
invoke the basic cvs commands like checkout, commit and update. I was able
to invoked the checkout command with success. The following is the code
snippet for the same.
CVSServerConnection connection = new CVSServerConnection();
CvsRoot cvsroot = new
CvsRoot(":pserver:satinderp@172.16.69.188:/cvs/HOMESTORECVS");
WorkingDirectory workingdirectory = new WorkingDirectory(cvsroot,
@"D:\\Imran\\cvs\\FileContainer_CVS", "FileContainer");
connection.Connect(workingdirectory, "password");
//check out
new CheckoutModuleCommand(workingdirectory).Execute(connection);
MessageBox.Show("CVS LOCAL CHECKOUT COMPLETED");
Similary I have written a code snippet to do a commit operation of the File
TestForm.cs contained in the checkout directory
"D:\Imran\cvs\FileContainer_CVS\FileContainer" . The following is the code
snippet for the same. Unfortunately I'm not able to do the commit operation
successfully. I get the error "cvs server: Up-to-date check failed for
`TestForm.cs' as the ErrorMessage Response.
CVSServerConnection connection = new CVSServerConnection();
CvsRoot cvsroot = new
CvsRoot(":pserver:satinderp@172.16.69.188:/cvs/HOMESTORECVS");
WorkingDirectory workingdirectory = new
WorkingDirectory(cvsroot,@"D:\Imran\cvs\FileContainer_CVS\FileContainer",
"FileContainer");
workingdirectory.AddAllFiles(@"D:\Imran\cvs\FileContainer_CVS\FileContainer"
);
MessageBox.Show(workingdirectory.Folders.Count.ToString());
connection.Connect(workingdirectory, "password");
CommitCommand2 objCommit = new CommitCommand2(workingdirectory);
objCommit.LogMessage = "Test Logging";
objCommit.ReleaseString = "Release Imran 2";
objCommit.Execute(connection);
Please guide me with reasons for the same or changes in the above code
snippet to yield a positive result. Also if you could share any examples
using the NetCVSLibrary, it would be appreciated. I've also downloaded the
SharpCVSLib but I cannot use it since my application uses .Net 1.0.
I'm looking forward to your help asap
Thanks & Regards
Imran
|
|
From: Clayton H. <cla...@sp...> - 2005-01-14 17:01:50
|
Hi Everyone, I am going to be doing some work on the project website, basically removing the wiki section as it has been vandalized and in the process move some of that information to static html pages. I know I have been answering a lot of email/ posts about how to use the library in GUI clients, I would like to include this information in the website with the hopes of maybe bringing some of these endeavors together. If you are working on an application that uses the sharpcvslib could you send me your project/ site link and some way that you might be contacted. I will be posting this information publicly so if you would prefer your email hidden please send your sf.net account or provide another means of contact (i.e. "I monitor the sharpcvslib list"). =20 Also I have released a "dev" package of the library to help those of you with cvs access issues.I have done this because the release on sourceforge is a little out of date and I don't really have the time to maintain both branches. This will eventually role into an official release which will come out when I have time to implement the sspi pieces and will basically be a "cvs snapshot" packaged up in a zip file. If you could prefer to continue using cvs that is great, but if not then please use this. =20 Cheers, =20 Clayton |
|
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
|
|
From: Clayton H. <cla...@sp...> - 2004-12-16 15:45:44
|
Hi Thomas, just a quick question are you using the AddCommand before =
using the CommitCommand? The AddCommand does not do a lot at the server =
(well there are checks to see if the file exists from what I can tell) =
but results in a new line in the CVS\Entries folder for your file which =
should look like:
/foo.cs/0/dummy timestamp//
I will have more time to look into this tonight. =20
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Thu 12/16/2004 1:47 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
Hi Clayton
Did you receive my last mail with the sample attached ? I've sent it to=20
your sporadicism address because of the size and the attached file.
As an additional information about it, i get something strange, and in=20
fact i think that comes from my program: i've manually created another=20
module, checked out, commited. Then i try the 'validate' part of my app, =
and i get cvs server: Up-to-date check failed for `Index.xml', as with=20
my other module. Knowing that i start with a newly commited directory,=20
then only index.xml is modified, then it is commited, and this is where=20
i get the cvs error. Here is my cvs dialog (after the rlog command):
REQUEST: [UseUnchanged]
--> []
REQUEST: [Root /CVSRep]
--> []
REQUEST: [Global_option -q]
--> []
REQUEST: [Argument -m]
--> []
REQUEST: [Argument LOG MESSAGE]
--> []
REQUEST: [Argument --]
--> []
REQUEST: [Directory .]
--> [/CVSRep/Test2]
--> []
REQUEST: [Entry /Index.xml/0///]
--> []
REQUEST: [Modified Index.xml]
--> [u=3Drw,g=3Drw,o=3Drw]
--> []
REQUEST: [Directory .]
--> [/CVSRep/Test2]
--> []
REQUEST: [Argument Index.xml]
--> []
REQUEST: [ci]
--> []
ERROR: cvs server: E cvs server: Up-to-date check failed for `Index.xml'
RESPONSE: cvs server: Up-to-date check failed for `Index.xml'
- ( ErrorMessageResponse )ERROR: cvs server: E cvs [server aborted]:=20
correct above errors first!
RESPONSE: cvs [server aborted]: correct above errors first!
- ( ErrorMessageResponse )ERROR: cvs server: M=20
If you have any idea...
Thomas
Clayton Harbour wrote:
> Hi Thomas,
> =20
> It looks like you are reading in the entire CVS\Entries file using the =
> TextReader. This file will definitely give you too many '/'=20
> characters as it is made up of many Entry objects. Try using the=20
> following:
> Entry entry =3D Entry.CreateEntry(FileInfo managedFile);
> =20
> where the managedFile is the file on your local file system that you=20
> want to add to the repository. If that does not work can you please=20
> send the following:
> 1) fi.FullName
> 2) contents of fi.FullName file that you are trying to read.
> =20
> =20
> Cheers,
> =20
> Clayton
>
> -----Original Message-----
> *From:* Thomas Guillemin [mailto:tg...@ja...]
> *Sent:* December 13, 2004 10:18 AM
> *To:* Clayton Harbour
> *Cc:* sha...@li...
> *Subject:* Re: [Sharpcvslib-users] Simple question
>
> Hi Clayton
>
> I'm not sure of how to set the FileInfo object.
> Here is what i do to replace vpath by a FileInfo (first line and
> last line are the same so you can replace it in the precedent code
> part):
> Entries entries =3D Entries.Load(dir);
> FileInfo fi =3D new FileInfo(vpath);
> TextReader tr =3D fi.OpenText();
> string fstr =3D tr.ReadToEnd();
> Entry entry =3D new Entry(fi, fstr);
> folder.Entries.Add(pathdir, entry);
>
> And here is what i get from execution: (message is in french but
> that's ok)
> Une exception non g=E9r=E9e du type
> 'ICSharpCode.SharpCvsLib.FileSystem.EntryParseException' s'est
> produite dans icsharpcode.sharpcvslib.dll
>
> Informations suppl=E9mentaires : Too many tokens in entry
> line.tokens.Length=3D[34]line=3D[<?xml version=3D"1.0" =
encoding=3D"utf-8" ?>
> <Revision_Index>
> <FileList>
> <Filename>Test/App.config</Filename>
> <Revision>1.4</Revision>
> </FileList>
> <FileList>
> <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>]
>
> So i don't really know the way i should do it.
> Does that ring anything for you ?
>
> Thanks
> Thomas
>
> Clayton Harbour wrote:
>
>> Hi Thomas,
>> =20
>> I think you are correct the commandline option would be uglier.=20
>> Further I think that what you have found here is a break of some
>> sort and should be fixed. Having said that I believe that vpath
>> is a string, am I correct? If a string is passed in the
>> application will try to "guess" if the string is a File or
>> Directory. I have added methods for most parts of the API to
>> take either a FileInfo or DirectoryInfo object. Could you try
>> changing your vpath to a FileInfo object (and use
>> FileInfo.FullPath fo the folders Hashtable) and let me know if
>> that gets you by the latest challenge? I will look into the
>> actual cause of the break tonight.
>> =20
>> =20
>> Cheers,
>> =20
>> Clayton
>>
>> -----Original Message-----
>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>> *Sent:* December 13, 2004 2:32 AM
>> *To:* Clayton Harbour
>> *Cc:* sha...@li...
>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>
>> Hi
>>
>> The recent changes seem to have deeply changed the whole
>> behaviour. First, the first part that was working quite fine
>> now generates a file not found exception ; it looks for
>> d:\dev\CVSTest\Test\Index.xml\CVS (still with that part of
>> the code:
>> DirectoryInfo dir =3D new
>> DirectoryInfo(Path.Combine(pathdir, "CVS"));
>> FileInfo reposfile =3D new FileInfo(pathdir +
>> "\\CVS\\Repository");
>> Folder folder =3D new Folder();
>> folder.Repository =3D =
Repository.Load(reposfile);
>> Entries entries =3D Entries.Load(dir);
>> Entry entry =3D entries[vpath];
>> folder.Entries.Add(pathdir, entry);
>> wd.Folders.Add(pathdir, folder);
>> cnx =3D new CVSServerConnection(wd);
>> RegisterListenEvents(cnx);
>> cnx.Connect(wd, userpass);
>> CommitCommand2 cmd2 =3D new =
CommitCommand2(wd);
>> cmd2.Execute(cnx);
>> cnx.Close();
>> knowing that pathdir =3D d:\dev\CVSTest\Test\, and vpath =3D
>> d:\dev\CVSTest\Test\Index.xml)
>> Any recommandation ? i'm not sure of what i should change or
>> not change, now i feel like i understand the mechanism less
>> and less...
>> And for the second part (i'm currently on it so maybe i will
>> find more today) i do:
>> cnx =3D new CVSServerConnection(wd);
>> cnx.Connect(wd, userpass);
>> RegisterListenEvents(cnx);
>> UpdateCommand2 cmd =3D new =
UpdateCommand2(wd);
>> cmd.Execute(cnx);
>> and nothing appears in my textbox (knowing that
>> registerlistenevents starts the requests, responses and
>> errors listening and that no internal error appears, every
>> line is passed fine in trace mode). What do you think ?
>>
>> For your information, i'm working here until 24/12, then i
>> quit. I'd like to give them something finished as for my
>> other works ; and i also would like to send you this app that
>> could be an example of how to use your lib. So if we can't be
>> done for this date, i'm not sure of when i'll finish it,
>> because i'm not sure of when i'll be programming again at
>> all. And i'm also thinking that if you keep changing elements
>> of the base structure after that, which is much probable, my
>> example won't be of any use anymore, so, maybe i could just
>> replace the stuff by a command-line maker that would do what
>> i want, that's ugly, but tell me what you think.
>>
>> Thomas
>>
>> Clayton Harbour wrote:
>>
>>> Hi Thomas,
>>> =20
>>> I agree with making the Folders object the default. When I
>>> move the Property I will make the accessor a Folders object
>>> (which is backed by a Hashtable, but implements
>>> ICollection). That is going to take awhile because I would
>>> like to refactor all commands to have something like
>>> that...and won't be in right away. For the immediate I will
>>> try to make sure changing the Folders and FoldersToUpdate to
>>> use the same variable under the covers which should
>>> accomplish some of what you need.
>>> =20
>>> Adding the -A should be rather simple. If you look at the
>>> Tag property it is basically like you describe below. As
>>> far as I remember the remove sticky tags always operates on
>>> an enumeration of files (i.e. we are unable to pick and
>>> choose which file to remove stickies unless you execute the
>>> command more than once). So it should make sense to set the
>>> -A (on requested) for the group of folders in the
>>> FoldersToUpdate...hopefully I am making sense here :-). I
>>> will try to get this in tonight if I have time, I have added
>>> it as issue ( 1082691 ).
>>> =20
>>> =20
>>> Cheers,
>>> =20
>>> Clayton
>>>
>>> -----Original Message-----
>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>> *Sent:* December 9, 2004 7:43 AM
>>> *To:* Clayton Harbour
>>> *Cc:* sha...@li...
>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>
>>> yeah that's great.
>>> i'll have to wait for the cvs changes ; btw i think you
>>> should also transform the class of FoldersToUpdate: it
>>> is a Folder[], so one can't use the Add method, while
>>> Folders is a FileSystem.Folders object (which is, i
>>> guess, some kind of an ArrayList right ?) which is way
>>> more easy to use for our purposes.
>>> Another issue i'm thinking of is the sticky tags
>>> thing... Personnally, when i want to remove some tags i
>>> just type an 'update -A' command... but here for some
>>> people it could be harmful. For the moment, i think the
>>> easiest way would be to add a special property to the
>>> updatecommand class, so that people would only use it
>>> when needed... but there could be different
>>> possibilities (and i don't know cvs enough to be able to
>>> enumerate them).
>>> What do you think ?
>>>
>>> Thomas
>>>
>>> Clayton Harbour wrote:
>>>
>>>>Hi Thomas,
>>>>
>>>>Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate =
needs to be reworked actually. The basic idea was to store an entire =
list of the CVS Entries Folders in the Folders property and then filter =
that and put it in the FoldersToUpdate property. I have filed a bug on =
this (1082194) and the simple solution will probably be to just make the =
two properties equal if there are no issues anywhere else in the =
library. =20
>>>>
>>>>In the meantime though if you populate the FoldersToUpdate Property =
instead that should fix your issue.
>>>>
>>>>I have also added a check to see if the FoldersToUpdate is null and =
if so the method just returns which is better than the NullPointer.
>>>>
>>>>
>>>>Cheers,
>>>>
>>>>
>>>>Clayton
>>>>
>>>>-----Original Message-----
>>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>>Sent: Thu 12/9/2004 3:42 AM
>>>>To: Clayton Harbour
>>>>Cc: sha...@li...
>>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>>hi hi
>>>>thanks for that you're great clayton, now my committing function =
seems=20
>>>>to work fine.
>>>>Now i'm still having problems with my update function, which begins =
with=20
>>>>the update of one file (still the index.xml):
>>>>if (File.Exists(IndexPath))
>>>> {
>>>> string pathdir =3D vpath.Substring(0,=20
>>>>IndexPath.LastIndexOf("\\"));
>>>> string wdirname =3D pathdir.Substring(0,=20
>>>>pathdir.LastIndexOf("\\"));
>>>>
>>>> string reldirname =3D=20
>>>>pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -=20
>>>>pathdir.LastIndexOf("\\")-1);
>>>> // We update the index file to the desired revision
>>>> // (the last one by default)
>>>> wd =3D new WorkingDirectory(cvsroot, wdirname, =
reldirname);
>>>> if (Revision !=3D "" && Revision !=3D "Last =
Version")
>>>> {
>>>> wd.Revision =3D Revision;
>>>> }
>>>> DirectoryInfo dir =3D new=20
>>>>DirectoryInfo(Path.Combine(pathdir, "CVS"));
>>>> FileInfo reposfile =3D new FileInfo(pathdir +=20
>>>>"\\CVS\\Repository");
>>>> Folder folder =3D new Folder();
>>>> folder.Repository =3D Repository.Load(reposfile);
>>>> Entries entries =3D Entries.Load(dir);
>>>> Entry entry =3D entries[vpath];
>>>> folder.Entries.Add(pathdir, entry);
>>>> wd.Folders.Add(pathdir, folder);
>>>> =
//Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
>>>> cnx =3D new CVSServerConnection(wd);
>>>> cnx.Connect(wd, userpass);
>>>> RegisterListenEvents(cnx);
>>>> UpdateCommand2 cmd =3D new UpdateCommand2(wd);
>>>> cmd.Execute(cnx);
>>>>
>>>>It crashes on UpdateCommand2.Execute(): =20
>>>>workingDirectory.FoldersToUpdate is NULL and so i get a=20
>>>>nullreferenceexception...
>>>>Do you know how i must proceed ?
>>>>
>>>>Thomas
>>>>
>>>>Clayton Harbour wrote:
>>>>
>>>> =20
>>>>
>>>>>Hi Thomas, just checking back in if you are still having an issue =
with this. I have been looking at the error message below and it looks =
like the Repository folder may have an extra empty line near the end. I =
added a trim on December 3rd that might take care if this if you could =
try it again.
>>>>>
>>>>>Cheers,
>>>>>
>>>>>Clayton
>>>>>
>>>>>
>>>>>-----Original Message-----
>>>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>>>Sent: Mon 12/6/2004 7:43 AM
>>>>>To: Clayton Harbour
>>>>>Cc: sha...@li...
>>>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>>>i'm using the lib, updated last week (i'm waiting for sourceforge =
to be=20
>>>>>up again and i'll update then), so no cvs.exe, and the server is a =
cvsnt=20
>>>>>on windows xp, :pserver:.
>>>>>I was only listening to response events, not the request ones. I =
have=20
>>>>>added it, and here is what i get from my TextBox now:
>>>>>REQUEST: [Valid-responses ok error Valid-requests Checked-in =
New-entry=20
>>>>>Updated Created Merged Mod-time Removed Set-static-directory=20
>>>>>Clear-static-directory Set-sticky Clear-sticky Module-expansion M E =
MT]
>>>>> --> []
>>>>>REQUEST: [valid-requests]
>>>>> --> []
>>>>>RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot=20
>>>>>Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified =
>>>>>Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable =
Utf8=20
>>>>>Argument Argumentx Global_option Gzip-stream =
wrapper-sendme-rcsOptions=20
>>>>>Set Rename VirtualRepository expand-modules ci co chown setowner =
setperm=20
>>>>>chacl setacl lsacl passwd info update diff log rlog add remove=20
>>>>>update-patches status ls rdiff tag rtag import admin export history =
>>>>>release watch-on watch-off watch-add watch-remove watchers editors =
init=20
>>>>>annotate rannotate noop version Rootless-stream-modification=20
>>>>>Kerberos-encrypt Gssapi-encrypt Protocol-encrypt =
Gssapi-authenticate=20
>>>>>Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore=20
>>>>>read-cvswrappers Error-If-Reader Valid-RcsOptions
>>>>>- ( 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 /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 unrecognized request `'
>>>>>
>>>>>does that put some light on the scene ?
>>>>>
>>>>>Clayton Harbour wrote:
>>>>>
>>>>>=20
>>>>>
>>>>> =20
>>>>>
>>>>>>Which version of the client are you using Thomas? Also which =
version=20
>>>>>>of server are you connecting to? If you are using the code from =
cvs=20
>>>>>>could you do an update, sometimes it takes a while for =
sourceforge's=20
>>>>>>development cvs server to replicate to the anonymous server. Also =
>>>>>>verify that you are handling the following events:
>>>>>> serverConn.RequestMessageEvent +=3D
>>>>>> new MessageEventHandler(Writer.WriteLine);
>>>>>> serverConn.ResponseMessageEvent +=3D
>>>>>> new MessageEventHandler(Writer.WriteLine);
>>>>>>
>>>>>>This will print out all requests and responses. What I am =
suspecting=20
>>>>>>is that there is a CaseRequest being sent that the server does not =
>>>>>>like...at least that was an issue I came across l week. Let me =
know=20
>>>>>>what you find out.
>>>>>>
>>>>>>
>>>>>>Cheers,
>>>>>>
>>>>>>Clayton
>>>>>>
>>>>>> -----Original Message-----
>>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>>> *Sent:* December 6, 2004 1:53 AM
>>>>>> *To:* Clayton Harbour
>>>>>> *Cc:* sha...@li...
>>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>>
>>>>>> hm, it behaves exactly the same with this line instead.
>>>>>> and i still get [cvs server: M unrecognized request `'] in the =
end...
>>>>>>
>>>>>> Clayton Harbour wrote:
>>>>>>
>>>>>> =20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>>> Hi Thomas,
>>>>>>> =20
>>>>>>> I think this line:
>>>>>>> FileInfo file =3D new FileInfo(pathdir + \\CVS =
<file://%5C%5CCVS>);
>>>>>>> should be:
>>>>>>> DirectoryInfo dir =3D new =
DirectoryInfo(Path.Combine(pathdir,
>>>>>>> "CVS");
>>>>>>> =20
>>>>>>> I am surprised that you don't get an error when you do an
>>>>>>> Entries entries =3D Entries.Load(file);
>>>>>>> =20
>>>>>>> There is no CvsFileNotFoundException being thrown? Are you =
sure
>>>>>>> you are not trapping this error silently?
>>>>>>> =20
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>>>> *Sent:* December 2, 2004 8:12 AM
>>>>>>> *To:* Clayton Harbour
>>>>>>> *Cc:* sha...@li...
>>>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>>>
>>>>>>> mh i'm not sure to understand...
>>>>>>> here is my code:
>>>>>>>
>>>>>>> (...stuff...)
>>>>>>> wd =3D new WorkingDirectory(CVSRoot, wdirname, =
reldirname);
>>>>>>> cnx =3D 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 =3D new FileInfo(pathdir + =
"\\CVS");
>>>>>>> FileInfo reposfile =3D new =
FileInfo(pathdir +
>>>>>>> "\\CVS\\Repository");
>>>>>>> Folder folder =3D new Folder();
>>>>>>> folder.Repository =3D =
Repository.Load(reposfile);
>>>>>>> Entries entries =3D Entries.Load(file);
>>>>>>> Entry entry =3D entries[vpath];
>>>>>>> folder.Entries.Add(pathdir, entry);
>>>>>>> wd.Folders.Add(pathdir, folder);
>>>>>>> cnx =3D new CVSServerConnection(wd);
>>>>>>> cnx.Connect(wd, userpass);
>>>>>>> CommitCommand2 cmd2 =3D 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:
>>>>>>>
>>>>>>> =20
>>>>>>>
>>>>>>> =20
>>>>>>>
>>>>>>>>Hi Thomas,
>>>>>>>>
>>>>>>>>The code would look something like this:
>>>>>>>> Folder folder =3D new Folder();
>>>>>>>> Entries entries =3D new Entries.Load(file);
>>>>>>>> Entry entry =3D 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> =20
>>>>>>>>
>>>>>>>> =20
>>>>>>>>
>>>>>>>>>-----Original Message-----
>>>>>>>>>From: Thomas Guillemin [mailto:tg...@ja...]=20
>>>>>>>>>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=20
>>>>>>>>>one file ?=20
>>>>>>>>>(with UpdateCommand2/CommitCommand2)
>>>>>>>>>Thanks
>>>>>>>>>
>>>>>>>>>Thomas
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>-------------------------------------------------------
>>>>>>>>>SF email is sponsored by - The IT Product Guide
>>>>>>>>>Read honest & candid reviews on hundreds of IT Products from=20
>>>>>>>>>real users. Discover which products truly live up to the=20
>>>>>>>>>hype. Start reading now.=20
>>>>>>>>>http://productguide.itmanagersjournal.com/
>>>>>>>>>_______________________________________________
>>>>>>>>>Sharpcvslib-users mailing list =
Sha...@li...
>>>>>>>>>https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
>>>>>>>>>
>>>>>>>>> =20
>>>>>>>>>
>>>>>>>>> =20
>>>>>>>>>
>>>>>>>>> =20
>>>>>>>>>
>>>>>>>>-------------------------------------------------------
>>>>>>>>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.=20
>>>>>>>>http://productguide.itmanagersjournal.com/
>>>>>>>>_______________________________________________
>>>>>>>>Sharpcvslib-users mailing list
>>>>>>>>Sha...@li...
>>>>>>>>https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> =20
>>>>>>>>
>>>>>>>> =20
>>>>>>>>
>>>>>=20
>>>>>
>>>>> =20
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>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.=20
>>>>http://productguide.itmanagersjournal.com/
>>>>_______________________________________________
>>>>Sharpcvslib-users mailing list
>>>>Sha...@li...
>>>>https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
>>>>
>>>> =20
>>>>
|
|
From: Thomas G. <tg...@ja...> - 2004-12-16 10:17:15
|
(oh and last precision i forgot to tell: when commiting the file
manually or with tortoiseCVS, it works fine)
Clayton Harbour wrote:
> Hi Thomas,
>
> It looks like you are reading in the entire CVS\Entries file using the
> TextReader. This file will definitely give you too many '/'
> characters as it is made up of many Entry objects. Try using the
> following:
> Entry entry = Entry.CreateEntry(FileInfo managedFile);
>
> where the managedFile is the file on your local file system that you
> want to add to the repository. If that does not work can you please
> send the following:
> 1) fi.FullName
> 2) contents of fi.FullName file that you are trying to read.
>
>
> Cheers,
>
> Clayton
>
> -----Original Message-----
> *From:* Thomas Guillemin [mailto:tg...@ja...]
> *Sent:* December 13, 2004 10:18 AM
> *To:* Clayton Harbour
> *Cc:* sha...@li...
> *Subject:* Re: [Sharpcvslib-users] Simple question
>
> Hi Clayton
>
> I'm not sure of how to set the FileInfo object.
> Here is what i do to replace vpath by a FileInfo (first line and
> last line are the same so you can replace it in the precedent code
> part):
> Entries entries = Entries.Load(dir);
> FileInfo fi = new FileInfo(vpath);
> TextReader tr = fi.OpenText();
> string fstr = tr.ReadToEnd();
> Entry entry = new Entry(fi, fstr);
> folder.Entries.Add(pathdir, entry);
>
> And here is what i get from execution: (message is in french but
> that's ok)
> Une exception non gérée du type
> 'ICSharpCode.SharpCvsLib.FileSystem.EntryParseException' s'est
> produite dans icsharpcode.sharpcvslib.dll
>
> Informations supplémentaires : Too many tokens in entry
> line.tokens.Length=[34]line=[<?xml version="1.0" encoding="utf-8" ?>
> <Revision_Index>
> <FileList>
> <Filename>Test/App.config</Filename>
> <Revision>1.4</Revision>
> </FileList>
> <FileList>
> <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>]
>
> So i don't really know the way i should do it.
> Does that ring anything for you ?
>
> Thanks
> Thomas
>
> Clayton Harbour wrote:
>
>> Hi Thomas,
>>
>> I think you are correct the commandline option would be uglier.
>> Further I think that what you have found here is a break of some
>> sort and should be fixed. Having said that I believe that vpath
>> is a string, am I correct? If a string is passed in the
>> application will try to "guess" if the string is a File or
>> Directory. I have added methods for most parts of the API to
>> take either a FileInfo or DirectoryInfo object. Could you try
>> changing your vpath to a FileInfo object (and use
>> FileInfo.FullPath fo the folders Hashtable) and let me know if
>> that gets you by the latest challenge? I will look into the
>> actual cause of the break tonight.
>>
>>
>> Cheers,
>>
>> Clayton
>>
>> -----Original Message-----
>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>> *Sent:* December 13, 2004 2:32 AM
>> *To:* Clayton Harbour
>> *Cc:* sha...@li...
>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>
>> Hi
>>
>> The recent changes seem to have deeply changed the whole
>> behaviour. First, the first part that was working quite fine
>> now generates a file not found exception ; it looks for
>> d:\dev\CVSTest\Test\Index.xml\CVS (still with that part of
>> the code:
>> DirectoryInfo dir = new
>> DirectoryInfo(Path.Combine(pathdir, "CVS"));
>> FileInfo reposfile = new FileInfo(pathdir +
>> "\\CVS\\Repository");
>> Folder folder = new Folder();
>> folder.Repository = Repository.Load(reposfile);
>> Entries entries = Entries.Load(dir);
>> Entry entry = entries[vpath];
>> folder.Entries.Add(pathdir, entry);
>> wd.Folders.Add(pathdir, folder);
>> cnx = new CVSServerConnection(wd);
>> RegisterListenEvents(cnx);
>> cnx.Connect(wd, userpass);
>> CommitCommand2 cmd2 = new CommitCommand2(wd);
>> cmd2.Execute(cnx);
>> cnx.Close();
>> knowing that pathdir = d:\dev\CVSTest\Test\, and vpath =
>> d:\dev\CVSTest\Test\Index.xml)
>> Any recommandation ? i'm not sure of what i should change or
>> not change, now i feel like i understand the mechanism less
>> and less...
>> And for the second part (i'm currently on it so maybe i will
>> find more today) i do:
>> cnx = new CVSServerConnection(wd);
>> cnx.Connect(wd, userpass);
>> RegisterListenEvents(cnx);
>> UpdateCommand2 cmd = new UpdateCommand2(wd);
>> cmd.Execute(cnx);
>> and nothing appears in my textbox (knowing that
>> registerlistenevents starts the requests, responses and
>> errors listening and that no internal error appears, every
>> line is passed fine in trace mode). What do you think ?
>>
>> For your information, i'm working here until 24/12, then i
>> quit. I'd like to give them something finished as for my
>> other works ; and i also would like to send you this app that
>> could be an example of how to use your lib. So if we can't be
>> done for this date, i'm not sure of when i'll finish it,
>> because i'm not sure of when i'll be programming again at
>> all. And i'm also thinking that if you keep changing elements
>> of the base structure after that, which is much probable, my
>> example won't be of any use anymore, so, maybe i could just
>> replace the stuff by a command-line maker that would do what
>> i want, that's ugly, but tell me what you think.
>>
>> Thomas
>>
>> Clayton Harbour wrote:
>>
>>> Hi Thomas,
>>>
>>> I agree with making the Folders object the default. When I
>>> move the Property I will make the accessor a Folders object
>>> (which is backed by a Hashtable, but implements
>>> ICollection). That is going to take awhile because I would
>>> like to refactor all commands to have something like
>>> that...and won't be in right away. For the immediate I will
>>> try to make sure changing the Folders and FoldersToUpdate to
>>> use the same variable under the covers which should
>>> accomplish some of what you need.
>>>
>>> Adding the -A should be rather simple. If you look at the
>>> Tag property it is basically like you describe below. As
>>> far as I remember the remove sticky tags always operates on
>>> an enumeration of files (i.e. we are unable to pick and
>>> choose which file to remove stickies unless you execute the
>>> command more than once). So it should make sense to set the
>>> -A (on requested) for the group of folders in the
>>> FoldersToUpdate...hopefully I am making sense here :-). I
>>> will try to get this in tonight if I have time, I have added
>>> it as issue ( 1082691 ).
>>>
>>>
>>> Cheers,
>>>
>>> Clayton
>>>
>>> -----Original Message-----
>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>> *Sent:* December 9, 2004 7:43 AM
>>> *To:* Clayton Harbour
>>> *Cc:* sha...@li...
>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>
>>> yeah that's great.
>>> i'll have to wait for the cvs changes ; btw i think you
>>> should also transform the class of FoldersToUpdate: it
>>> is a Folder[], so one can't use the Add method, while
>>> Folders is a FileSystem.Folders object (which is, i
>>> guess, some kind of an ArrayList right ?) which is way
>>> more easy to use for our purposes.
>>> Another issue i'm thinking of is the sticky tags
>>> thing... Personnally, when i want to remove some tags i
>>> just type an 'update -A' command... but here for some
>>> people it could be harmful. For the moment, i think the
>>> easiest way would be to add a special property to the
>>> updatecommand class, so that people would only use it
>>> when needed... but there could be different
>>> possibilities (and i don't know cvs enough to be able to
>>> enumerate them).
>>> What do you think ?
>>>
>>> Thomas
>>>
>>> Clayton Harbour wrote:
>>>
>>>>Hi Thomas,
>>>>
>>>>Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate needs to be reworked actually. The basic idea was to store an entire list of the CVS Entries Folders in the Folders property and then filter that and put it in the FoldersToUpdate property. I have filed a bug on this (1082194) and the simple solution will probably be to just make the two properties equal if there are no issues anywhere else in the library.
>>>>
>>>>In the meantime though if you populate the FoldersToUpdate Property instead that should fix your issue.
>>>>
>>>>I have also added a check to see if the FoldersToUpdate is null and if so the method just returns which is better than the NullPointer.
>>>>
>>>>
>>>>Cheers,
>>>>
>>>>
>>>>Clayton
>>>>
>>>>-----Original Message-----
>>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>>Sent: Thu 12/9/2004 3:42 AM
>>>>To: Clayton Harbour
>>>>Cc: sha...@li...
>>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>>hi hi
>>>>thanks for that you're great clayton, now my committing function seems
>>>>to work fine.
>>>>Now i'm still having problems with my update function, which begins with
>>>>the update of one file (still the index.xml):
>>>>if (File.Exists(IndexPath))
>>>> {
>>>> string pathdir = vpath.Substring(0,
>>>>IndexPath.LastIndexOf("\\"));
>>>> string wdirname = pathdir.Substring(0,
>>>>pathdir.LastIndexOf("\\"));
>>>>
>>>> string reldirname =
>>>>pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -
>>>>pathdir.LastIndexOf("\\")-1);
>>>> // We update the index file to the desired revision
>>>> // (the last one by default)
>>>> wd = new WorkingDirectory(cvsroot, wdirname, reldirname);
>>>> if (Revision != "" && Revision != "Last Version")
>>>> {
>>>> wd.Revision = Revision;
>>>> }
>>>> DirectoryInfo dir = new
>>>>DirectoryInfo(Path.Combine(pathdir, "CVS"));
>>>> FileInfo reposfile = new FileInfo(pathdir +
>>>>"\\CVS\\Repository");
>>>> Folder folder = new Folder();
>>>> folder.Repository = Repository.Load(reposfile);
>>>> Entries entries = Entries.Load(dir);
>>>> Entry entry = entries[vpath];
>>>> folder.Entries.Add(pathdir, entry);
>>>> wd.Folders.Add(pathdir, folder);
>>>> //Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
>>>> cnx = new CVSServerConnection(wd);
>>>> cnx.Connect(wd, userpass);
>>>> RegisterListenEvents(cnx);
>>>> UpdateCommand2 cmd = new UpdateCommand2(wd);
>>>> cmd.Execute(cnx);
>>>>
>>>>It crashes on UpdateCommand2.Execute():
>>>>workingDirectory.FoldersToUpdate is NULL and so i get a
>>>>nullreferenceexception...
>>>>Do you know how i must proceed ?
>>>>
>>>>Thomas
>>>>
>>>>Clayton Harbour wrote:
>>>>
>>>>
>>>>
>>>>>Hi Thomas, just checking back in if you are still having an issue with this. I have been looking at the error message below and it looks like the Repository folder may have an extra empty line near the end. I added a trim on December 3rd that might take care if this if you could try it again.
>>>>>
>>>>>Cheers,
>>>>>
>>>>>Clayton
>>>>>
>>>>>
>>>>>-----Original Message-----
>>>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>>>Sent: Mon 12/6/2004 7:43 AM
>>>>>To: Clayton Harbour
>>>>>Cc: sha...@li...
>>>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>>>i'm using the lib, updated last week (i'm waiting for sourceforge to be
>>>>>up again and i'll update then), so no cvs.exe, and the server is a cvsnt
>>>>>on windows xp, :pserver:.
>>>>>I was only listening to response events, not the request ones. I have
>>>>>added it, and here is what i get from my TextBox now:
>>>>>REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry
>>>>>Updated Created Merged Mod-time Removed Set-static-directory
>>>>>Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
>>>>> --> []
>>>>>REQUEST: [valid-requests]
>>>>> --> []
>>>>>RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot
>>>>>Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified
>>>>>Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8
>>>>>Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions
>>>>>Set Rename VirtualRepository expand-modules ci co chown setowner setperm
>>>>>chacl setacl lsacl passwd info update diff log rlog add remove
>>>>>update-patches status ls rdiff tag rtag import admin export history
>>>>>release watch-on watch-off watch-add watch-remove watchers editors init
>>>>>annotate rannotate noop version Rootless-stream-modification
>>>>>Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate
>>>>>Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore
>>>>>read-cvswrappers Error-If-Reader Valid-RcsOptions
>>>>>- ( 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 /Index.xml/1.6/Mon Dec 6 16:32:25 2004+Fri Dec 3
>>>>>12:03:15 2004//T1.6]
>>>>> --> []
>>>>>REQUEST: [Modified Index.xml]
>>>>> --> [u=rw,g=rw,o=rw]
>>>>> --> []
>>>>>REQUEST: [Directory .]
>>>>> --> [/CVSRep/Test
>>>>>]
>>>>> --> []
>>>>> --> []
>>>>>REQUEST: [Argument Index.xml]
>>>>> --> []
>>>>>REQUEST: [ci]
>>>>> --> []
>>>>>ERROR: cvs server: M unrecognized request `'
>>>>>
>>>>>does that put some light on the scene ?
>>>>>
>>>>>Clayton Harbour wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Which version of the client are you using Thomas? Also which version
>>>>>>of server are you connecting to? If you are using the code from cvs
>>>>>>could you do an update, sometimes it takes a while for sourceforge's
>>>>>>development cvs server to replicate to the anonymous server. Also
>>>>>>verify that you are handling the following events:
>>>>>> serverConn.RequestMessageEvent +=
>>>>>> new MessageEventHandler(Writer.WriteLine);
>>>>>> serverConn.ResponseMessageEvent +=
>>>>>> new MessageEventHandler(Writer.WriteLine);
>>>>>>
>>>>>>This will print out all requests and responses. What I am suspecting
>>>>>>is that there is a CaseRequest being sent that the server does not
>>>>>>like...at least that was an issue I came across l week. Let me know
>>>>>>what you find out.
>>>>>>
>>>>>>
>>>>>>Cheers,
>>>>>>
>>>>>>Clayton
>>>>>>
>>>>>> -----Original Message-----
>>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>>> *Sent:* December 6, 2004 1:53 AM
>>>>>> *To:* Clayton Harbour
>>>>>> *Cc:* sha...@li...
>>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>>
>>>>>> hm, it behaves exactly the same with this line instead.
>>>>>> and i still get [cvs server: M unrecognized request `'] in the end...
>>>>>>
>>>>>> Clayton Harbour wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi Thomas,
>>>>>>>
>>>>>>> I think this line:
>>>>>>> FileInfo file = new FileInfo(pathdir + \\CVS <file://%5C%5CCVS>);
>>>>>>> should be:
>>>>>>> DirectoryInfo dir = new DirectoryInfo(Path.Combine(pathdir,
>>>>>>> "CVS");
>>>>>>>
>>>>>>> I am surprised that you don't get an error when you do an
>>>>>>> Entries entries = Entries.Load(file);
>>>>>>>
>>>>>>> There is no CvsFileNotFoundException being thrown? Are you sure
>>>>>>> you are not trapping this error silently?
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>>>> *Sent:* December 2, 2004 8:12 AM
>>>>>>> *To:* Clayton Harbour
>>>>>>> *Cc:* sha...@li...
>>>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>>>
>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>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
>>>>
>>>>
>>>>
|
|
From: Thomas G. <tg...@ja...> - 2004-12-16 09:49:29
|
Hi Clayton
Did you receive my last mail with the sample attached ? I've sent it to
your sporadicism address because of the size and the attached file.
As an additional information about it, i get something strange, and in
fact i think that comes from my program: i've manually created another
module, checked out, commited. Then i try the 'validate' part of my app,
and i get cvs server: Up-to-date check failed for `Index.xml', as with
my other module. Knowing that i start with a newly commited directory,
then only index.xml is modified, then it is commited, and this is where
i get the cvs error. Here is my cvs dialog (after the rlog command):
REQUEST: [UseUnchanged]
--> []
REQUEST: [Root /CVSRep]
--> []
REQUEST: [Global_option -q]
--> []
REQUEST: [Argument -m]
--> []
REQUEST: [Argument LOG MESSAGE]
--> []
REQUEST: [Argument --]
--> []
REQUEST: [Directory .]
--> [/CVSRep/Test2]
--> []
REQUEST: [Entry /Index.xml/0///]
--> []
REQUEST: [Modified Index.xml]
--> [u=rw,g=rw,o=rw]
--> []
REQUEST: [Directory .]
--> [/CVSRep/Test2]
--> []
REQUEST: [Argument Index.xml]
--> []
REQUEST: [ci]
--> []
ERROR: cvs server: E cvs server: Up-to-date check failed for `Index.xml'
RESPONSE: cvs server: Up-to-date check failed for `Index.xml'
- ( ErrorMessageResponse )ERROR: cvs server: E cvs [server aborted]:
correct above errors first!
RESPONSE: cvs [server aborted]: correct above errors first!
- ( ErrorMessageResponse )ERROR: cvs server: M
If you have any idea...
Thomas
Clayton Harbour wrote:
> Hi Thomas,
>
> It looks like you are reading in the entire CVS\Entries file using the
> TextReader. This file will definitely give you too many '/'
> characters as it is made up of many Entry objects. Try using the
> following:
> Entry entry = Entry.CreateEntry(FileInfo managedFile);
>
> where the managedFile is the file on your local file system that you
> want to add to the repository. If that does not work can you please
> send the following:
> 1) fi.FullName
> 2) contents of fi.FullName file that you are trying to read.
>
>
> Cheers,
>
> Clayton
>
> -----Original Message-----
> *From:* Thomas Guillemin [mailto:tg...@ja...]
> *Sent:* December 13, 2004 10:18 AM
> *To:* Clayton Harbour
> *Cc:* sha...@li...
> *Subject:* Re: [Sharpcvslib-users] Simple question
>
> Hi Clayton
>
> I'm not sure of how to set the FileInfo object.
> Here is what i do to replace vpath by a FileInfo (first line and
> last line are the same so you can replace it in the precedent code
> part):
> Entries entries = Entries.Load(dir);
> FileInfo fi = new FileInfo(vpath);
> TextReader tr = fi.OpenText();
> string fstr = tr.ReadToEnd();
> Entry entry = new Entry(fi, fstr);
> folder.Entries.Add(pathdir, entry);
>
> And here is what i get from execution: (message is in french but
> that's ok)
> Une exception non gérée du type
> 'ICSharpCode.SharpCvsLib.FileSystem.EntryParseException' s'est
> produite dans icsharpcode.sharpcvslib.dll
>
> Informations supplémentaires : Too many tokens in entry
> line.tokens.Length=[34]line=[<?xml version="1.0" encoding="utf-8" ?>
> <Revision_Index>
> <FileList>
> <Filename>Test/App.config</Filename>
> <Revision>1.4</Revision>
> </FileList>
> <FileList>
> <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>]
>
> So i don't really know the way i should do it.
> Does that ring anything for you ?
>
> Thanks
> Thomas
>
> Clayton Harbour wrote:
>
>> Hi Thomas,
>>
>> I think you are correct the commandline option would be uglier.
>> Further I think that what you have found here is a break of some
>> sort and should be fixed. Having said that I believe that vpath
>> is a string, am I correct? If a string is passed in the
>> application will try to "guess" if the string is a File or
>> Directory. I have added methods for most parts of the API to
>> take either a FileInfo or DirectoryInfo object. Could you try
>> changing your vpath to a FileInfo object (and use
>> FileInfo.FullPath fo the folders Hashtable) and let me know if
>> that gets you by the latest challenge? I will look into the
>> actual cause of the break tonight.
>>
>>
>> Cheers,
>>
>> Clayton
>>
>> -----Original Message-----
>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>> *Sent:* December 13, 2004 2:32 AM
>> *To:* Clayton Harbour
>> *Cc:* sha...@li...
>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>
>> Hi
>>
>> The recent changes seem to have deeply changed the whole
>> behaviour. First, the first part that was working quite fine
>> now generates a file not found exception ; it looks for
>> d:\dev\CVSTest\Test\Index.xml\CVS (still with that part of
>> the code:
>> DirectoryInfo dir = new
>> DirectoryInfo(Path.Combine(pathdir, "CVS"));
>> FileInfo reposfile = new FileInfo(pathdir +
>> "\\CVS\\Repository");
>> Folder folder = new Folder();
>> folder.Repository = Repository.Load(reposfile);
>> Entries entries = Entries.Load(dir);
>> Entry entry = entries[vpath];
>> folder.Entries.Add(pathdir, entry);
>> wd.Folders.Add(pathdir, folder);
>> cnx = new CVSServerConnection(wd);
>> RegisterListenEvents(cnx);
>> cnx.Connect(wd, userpass);
>> CommitCommand2 cmd2 = new CommitCommand2(wd);
>> cmd2.Execute(cnx);
>> cnx.Close();
>> knowing that pathdir = d:\dev\CVSTest\Test\, and vpath =
>> d:\dev\CVSTest\Test\Index.xml)
>> Any recommandation ? i'm not sure of what i should change or
>> not change, now i feel like i understand the mechanism less
>> and less...
>> And for the second part (i'm currently on it so maybe i will
>> find more today) i do:
>> cnx = new CVSServerConnection(wd);
>> cnx.Connect(wd, userpass);
>> RegisterListenEvents(cnx);
>> UpdateCommand2 cmd = new UpdateCommand2(wd);
>> cmd.Execute(cnx);
>> and nothing appears in my textbox (knowing that
>> registerlistenevents starts the requests, responses and
>> errors listening and that no internal error appears, every
>> line is passed fine in trace mode). What do you think ?
>>
>> For your information, i'm working here until 24/12, then i
>> quit. I'd like to give them something finished as for my
>> other works ; and i also would like to send you this app that
>> could be an example of how to use your lib. So if we can't be
>> done for this date, i'm not sure of when i'll finish it,
>> because i'm not sure of when i'll be programming again at
>> all. And i'm also thinking that if you keep changing elements
>> of the base structure after that, which is much probable, my
>> example won't be of any use anymore, so, maybe i could just
>> replace the stuff by a command-line maker that would do what
>> i want, that's ugly, but tell me what you think.
>>
>> Thomas
>>
>> Clayton Harbour wrote:
>>
>>> Hi Thomas,
>>>
>>> I agree with making the Folders object the default. When I
>>> move the Property I will make the accessor a Folders object
>>> (which is backed by a Hashtable, but implements
>>> ICollection). That is going to take awhile because I would
>>> like to refactor all commands to have something like
>>> that...and won't be in right away. For the immediate I will
>>> try to make sure changing the Folders and FoldersToUpdate to
>>> use the same variable under the covers which should
>>> accomplish some of what you need.
>>>
>>> Adding the -A should be rather simple. If you look at the
>>> Tag property it is basically like you describe below. As
>>> far as I remember the remove sticky tags always operates on
>>> an enumeration of files (i.e. we are unable to pick and
>>> choose which file to remove stickies unless you execute the
>>> command more than once). So it should make sense to set the
>>> -A (on requested) for the group of folders in the
>>> FoldersToUpdate...hopefully I am making sense here :-). I
>>> will try to get this in tonight if I have time, I have added
>>> it as issue ( 1082691 ).
>>>
>>>
>>> Cheers,
>>>
>>> Clayton
>>>
>>> -----Original Message-----
>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>> *Sent:* December 9, 2004 7:43 AM
>>> *To:* Clayton Harbour
>>> *Cc:* sha...@li...
>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>
>>> yeah that's great.
>>> i'll have to wait for the cvs changes ; btw i think you
>>> should also transform the class of FoldersToUpdate: it
>>> is a Folder[], so one can't use the Add method, while
>>> Folders is a FileSystem.Folders object (which is, i
>>> guess, some kind of an ArrayList right ?) which is way
>>> more easy to use for our purposes.
>>> Another issue i'm thinking of is the sticky tags
>>> thing... Personnally, when i want to remove some tags i
>>> just type an 'update -A' command... but here for some
>>> people it could be harmful. For the moment, i think the
>>> easiest way would be to add a special property to the
>>> updatecommand class, so that people would only use it
>>> when needed... but there could be different
>>> possibilities (and i don't know cvs enough to be able to
>>> enumerate them).
>>> What do you think ?
>>>
>>> Thomas
>>>
>>> Clayton Harbour wrote:
>>>
>>>>Hi Thomas,
>>>>
>>>>Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate needs to be reworked actually. The basic idea was to store an entire list of the CVS Entries Folders in the Folders property and then filter that and put it in the FoldersToUpdate property. I have filed a bug on this (1082194) and the simple solution will probably be to just make the two properties equal if there are no issues anywhere else in the library.
>>>>
>>>>In the meantime though if you populate the FoldersToUpdate Property instead that should fix your issue.
>>>>
>>>>I have also added a check to see if the FoldersToUpdate is null and if so the method just returns which is better than the NullPointer.
>>>>
>>>>
>>>>Cheers,
>>>>
>>>>
>>>>Clayton
>>>>
>>>>-----Original Message-----
>>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>>Sent: Thu 12/9/2004 3:42 AM
>>>>To: Clayton Harbour
>>>>Cc: sha...@li...
>>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>>hi hi
>>>>thanks for that you're great clayton, now my committing function seems
>>>>to work fine.
>>>>Now i'm still having problems with my update function, which begins with
>>>>the update of one file (still the index.xml):
>>>>if (File.Exists(IndexPath))
>>>> {
>>>> string pathdir = vpath.Substring(0,
>>>>IndexPath.LastIndexOf("\\"));
>>>> string wdirname = pathdir.Substring(0,
>>>>pathdir.LastIndexOf("\\"));
>>>>
>>>> string reldirname =
>>>>pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -
>>>>pathdir.LastIndexOf("\\")-1);
>>>> // We update the index file to the desired revision
>>>> // (the last one by default)
>>>> wd = new WorkingDirectory(cvsroot, wdirname, reldirname);
>>>> if (Revision != "" && Revision != "Last Version")
>>>> {
>>>> wd.Revision = Revision;
>>>> }
>>>> DirectoryInfo dir = new
>>>>DirectoryInfo(Path.Combine(pathdir, "CVS"));
>>>> FileInfo reposfile = new FileInfo(pathdir +
>>>>"\\CVS\\Repository");
>>>> Folder folder = new Folder();
>>>> folder.Repository = Repository.Load(reposfile);
>>>> Entries entries = Entries.Load(dir);
>>>> Entry entry = entries[vpath];
>>>> folder.Entries.Add(pathdir, entry);
>>>> wd.Folders.Add(pathdir, folder);
>>>> //Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
>>>> cnx = new CVSServerConnection(wd);
>>>> cnx.Connect(wd, userpass);
>>>> RegisterListenEvents(cnx);
>>>> UpdateCommand2 cmd = new UpdateCommand2(wd);
>>>> cmd.Execute(cnx);
>>>>
>>>>It crashes on UpdateCommand2.Execute():
>>>>workingDirectory.FoldersToUpdate is NULL and so i get a
>>>>nullreferenceexception...
>>>>Do you know how i must proceed ?
>>>>
>>>>Thomas
>>>>
>>>>Clayton Harbour wrote:
>>>>
>>>>
>>>>
>>>>>Hi Thomas, just checking back in if you are still having an issue with this. I have been looking at the error message below and it looks like the Repository folder may have an extra empty line near the end. I added a trim on December 3rd that might take care if this if you could try it again.
>>>>>
>>>>>Cheers,
>>>>>
>>>>>Clayton
>>>>>
>>>>>
>>>>>-----Original Message-----
>>>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>>>Sent: Mon 12/6/2004 7:43 AM
>>>>>To: Clayton Harbour
>>>>>Cc: sha...@li...
>>>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>>>i'm using the lib, updated last week (i'm waiting for sourceforge to be
>>>>>up again and i'll update then), so no cvs.exe, and the server is a cvsnt
>>>>>on windows xp, :pserver:.
>>>>>I was only listening to response events, not the request ones. I have
>>>>>added it, and here is what i get from my TextBox now:
>>>>>REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry
>>>>>Updated Created Merged Mod-time Removed Set-static-directory
>>>>>Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
>>>>> --> []
>>>>>REQUEST: [valid-requests]
>>>>> --> []
>>>>>RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot
>>>>>Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified
>>>>>Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8
>>>>>Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions
>>>>>Set Rename VirtualRepository expand-modules ci co chown setowner setperm
>>>>>chacl setacl lsacl passwd info update diff log rlog add remove
>>>>>update-patches status ls rdiff tag rtag import admin export history
>>>>>release watch-on watch-off watch-add watch-remove watchers editors init
>>>>>annotate rannotate noop version Rootless-stream-modification
>>>>>Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate
>>>>>Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore
>>>>>read-cvswrappers Error-If-Reader Valid-RcsOptions
>>>>>- ( 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 /Index.xml/1.6/Mon Dec 6 16:32:25 2004+Fri Dec 3
>>>>>12:03:15 2004//T1.6]
>>>>> --> []
>>>>>REQUEST: [Modified Index.xml]
>>>>> --> [u=rw,g=rw,o=rw]
>>>>> --> []
>>>>>REQUEST: [Directory .]
>>>>> --> [/CVSRep/Test
>>>>>]
>>>>> --> []
>>>>> --> []
>>>>>REQUEST: [Argument Index.xml]
>>>>> --> []
>>>>>REQUEST: [ci]
>>>>> --> []
>>>>>ERROR: cvs server: M unrecognized request `'
>>>>>
>>>>>does that put some light on the scene ?
>>>>>
>>>>>Clayton Harbour wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Which version of the client are you using Thomas? Also which version
>>>>>>of server are you connecting to? If you are using the code from cvs
>>>>>>could you do an update, sometimes it takes a while for sourceforge's
>>>>>>development cvs server to replicate to the anonymous server. Also
>>>>>>verify that you are handling the following events:
>>>>>> serverConn.RequestMessageEvent +=
>>>>>> new MessageEventHandler(Writer.WriteLine);
>>>>>> serverConn.ResponseMessageEvent +=
>>>>>> new MessageEventHandler(Writer.WriteLine);
>>>>>>
>>>>>>This will print out all requests and responses. What I am suspecting
>>>>>>is that there is a CaseRequest being sent that the server does not
>>>>>>like...at least that was an issue I came across l week. Let me know
>>>>>>what you find out.
>>>>>>
>>>>>>
>>>>>>Cheers,
>>>>>>
>>>>>>Clayton
>>>>>>
>>>>>> -----Original Message-----
>>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>>> *Sent:* December 6, 2004 1:53 AM
>>>>>> *To:* Clayton Harbour
>>>>>> *Cc:* sha...@li...
>>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>>
>>>>>> hm, it behaves exactly the same with this line instead.
>>>>>> and i still get [cvs server: M unrecognized request `'] in the end...
>>>>>>
>>>>>> Clayton Harbour wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi Thomas,
>>>>>>>
>>>>>>> I think this line:
>>>>>>> FileInfo file = new FileInfo(pathdir + \\CVS <file://%5C%5CCVS>);
>>>>>>> should be:
>>>>>>> DirectoryInfo dir = new DirectoryInfo(Path.Combine(pathdir,
>>>>>>> "CVS");
>>>>>>>
>>>>>>> I am surprised that you don't get an error when you do an
>>>>>>> Entries entries = Entries.Load(file);
>>>>>>>
>>>>>>> There is no CvsFileNotFoundException being thrown? Are you sure
>>>>>>> you are not trapping this error silently?
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>>>> *Sent:* December 2, 2004 8:12 AM
>>>>>>> *To:* Clayton Harbour
>>>>>>> *Cc:* sha...@li...
>>>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>>>
>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>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
>>>>
>>>>
>>>>
|
|
From: Clayton H. <cla...@sp...> - 2004-12-14 15:42:03
|
Hi Thomas,
=20
It looks like you are reading in the entire CVS\Entries file using the =
TextReader. This file will definitely give you too many '/' characters =
as it is made up of many Entry objects. Try using the following:
Entry entry =3D Entry.CreateEntry(FileInfo managedFile);
=20
where the managedFile is the file on your local file system that you =
want to add to the repository. If that does not work can you please =
send the following:
1) fi.FullName
2) contents of fi.FullName file that you are trying to read.
=20
=20
Cheers,
=20
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 13, 2004 10:18 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
Hi Clayton
I'm not sure of how to set the FileInfo object.
Here is what i do to replace vpath by a FileInfo (first line and last =
line are the same so you can replace it in the precedent code part):
Entries entries =3D Entries.Load(dir);
FileInfo fi =3D new FileInfo(vpath);
TextReader tr =3D fi.OpenText();
string fstr =3D tr.ReadToEnd();
Entry entry =3D new Entry(fi, fstr);
folder.Entries.Add(pathdir, entry);
And here is what i get from execution: (message is in french but that's =
ok)
Une exception non g=E9r=E9e du type =
'ICSharpCode.SharpCvsLib.FileSystem.EntryParseException' s'est produite =
dans icsharpcode.sharpcvslib.dll
Informations suppl=E9mentaires : Too many tokens in entry =
line.tokens.Length=3D[34]line=3D[<?xml version=3D"1.0" =
encoding=3D"utf-8" ?>
<Revision_Index>
<FileList>
<Filename>Test/App.config</Filename>
<Revision>1.4</Revision>
</FileList>
<FileList>
<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>]
So i don't really know the way i should do it.
Does that ring anything for you ?
Thanks
Thomas
Clayton Harbour wrote:
Hi Thomas,
=20
I think you are correct the commandline option would be uglier. Further =
I think that what you have found here is a break of some sort and should =
be fixed. Having said that I believe that vpath is a string, am I =
correct? If a string is passed in the application will try to "guess" =
if the string is a File or Directory. I have added methods for most =
parts of the API to take either a FileInfo or DirectoryInfo object. =
Could you try changing your vpath to a FileInfo object (and use =
FileInfo.FullPath fo the folders Hashtable) and let me know if that gets =
you by the latest challenge? I will look into the actual cause of the =
break tonight.
=20
=20
Cheers,
=20
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 13, 2004 2:32 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
Hi
The recent changes seem to have deeply changed the whole behaviour. =
First, the first part that was working quite fine now generates a file =
not found exception ; it looks for d:\dev\CVSTest\Test\Index.xml\CVS =
(still with that part of the code:
DirectoryInfo dir =3D new =
DirectoryInfo(Path.Combine(pathdir, "CVS"));
FileInfo reposfile =3D new FileInfo(pathdir + =
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(dir);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx =3D new CVSServerConnection(wd);
RegisterListenEvents(cnx);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 =3D new CommitCommand2(wd);
cmd2.Execute(cnx);
cnx.Close();
knowing that pathdir =3D d:\dev\CVSTest\Test\, and vpath =3D =
d:\dev\CVSTest\Test\Index.xml)
Any recommandation ? i'm not sure of what i should change or not change, =
now i feel like i understand the mechanism less and less...
And for the second part (i'm currently on it so maybe i will find more =
today) i do:
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
RegisterListenEvents(cnx);
UpdateCommand2 cmd =3D new UpdateCommand2(wd);
cmd.Execute(cnx);
and nothing appears in my textbox (knowing that registerlistenevents =
starts the requests, responses and errors listening and that no internal =
error appears, every line is passed fine in trace mode). What do you =
think ?
For your information, i'm working here until 24/12, then i quit. I'd =
like to give them something finished as for my other works ; and i also =
would like to send you this app that could be an example of how to use =
your lib. So if we can't be done for this date, i'm not sure of when =
i'll finish it, because i'm not sure of when i'll be programming again =
at all. And i'm also thinking that if you keep changing elements of the =
base structure after that, which is much probable, my example won't be =
of any use anymore, so, maybe i could just replace the stuff by a =
command-line maker that would do what i want, that's ugly, but tell me =
what you think.
Thomas
Clayton Harbour wrote:=20
Hi Thomas,
=20
I agree with making the Folders object the default. When I move the =
Property I will make the accessor a Folders object (which is backed by a =
Hashtable, but implements ICollection). That is going to take awhile =
because I would like to refactor all commands to have something like =
that...and won't be in right away. For the immediate I will try to make =
sure changing the Folders and FoldersToUpdate to use the same variable =
under the covers which should accomplish some of what you need.
=20
Adding the -A should be rather simple. If you look at the Tag property =
it is basically like you describe below. As far as I remember the =
remove sticky tags always operates on an enumeration of files (i.e. we =
are unable to pick and choose which file to remove stickies unless you =
execute the command more than once). So it should make sense to set the =
-A (on requested) for the group of folders in the =
FoldersToUpdate...hopefully I am making sense here :-). I will try to =
get this in tonight if I have time, I have added it as issue ( 1082691 =
).
=20
=20
Cheers,
=20
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 9, 2004 7:43 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
yeah that's great.
i'll have to wait for the cvs changes ; btw i think you should also =
transform the class of FoldersToUpdate: it is a Folder[], so one can't =
use the Add method, while Folders is a FileSystem.Folders object (which =
is, i guess, some kind of an ArrayList right ?) which is way more easy =
to use for our purposes.
Another issue i'm thinking of is the sticky tags thing... Personnally, =
when i want to remove some tags i just type an 'update -A' command... =
but here for some people it could be harmful. For the moment, i think =
the easiest way would be to add a special property to the updatecommand =
class, so that people would only use it when needed... but there could =
be different possibilities (and i don't know cvs enough to be able to =
enumerate them).
What do you think ?
Thomas
Clayton Harbour wrote:
Hi Thomas,
Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate =
needs to be reworked actually. The basic idea was to store an entire =
list of the CVS Entries Folders in the Folders property and then filter =
that and put it in the FoldersToUpdate property. I have filed a bug on =
this (1082194) and the simple solution will probably be to just make the =
two properties equal if there are no issues anywhere else in the =
library. =20
In the meantime though if you populate the FoldersToUpdate Property =
instead that should fix your issue.
I have also added a check to see if the FoldersToUpdate is null and if =
so the method just returns which is better than the NullPointer.
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Thu 12/9/2004 3:42 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
hi hi
thanks for that you're great clayton, now my committing function seems=20
to work fine.
Now i'm still having problems with my update function, which begins with =
the update of one file (still the index.xml):
if (File.Exists(IndexPath))
{
string pathdir =3D vpath.Substring(0,=20
IndexPath.LastIndexOf("\\"));
string wdirname =3D pathdir.Substring(0,=20
pathdir.LastIndexOf("\\"));
string reldirname =3D=20
pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -=20
pathdir.LastIndexOf("\\")-1);
// We update the index file to the desired revision
// (the last one by default)
wd =3D new WorkingDirectory(cvsroot, wdirname, =
reldirname);
if (Revision !=3D "" && Revision !=3D "Last Version")
{
wd.Revision =3D Revision;
}
DirectoryInfo dir =3D new=20
DirectoryInfo(Path.Combine(pathdir, "CVS"));
FileInfo reposfile =3D new FileInfo(pathdir +=20
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(dir);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
//Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
RegisterListenEvents(cnx);
UpdateCommand2 cmd =3D new UpdateCommand2(wd);
cmd.Execute(cnx);
It crashes on UpdateCommand2.Execute(): =20
workingDirectory.FoldersToUpdate is NULL and so i get a=20
nullreferenceexception...
Do you know how i must proceed ?
Thomas
Clayton Harbour wrote:
=20
Hi Thomas, just checking back in if you are still having an issue with =
this. I have been looking at the error message below and it looks like =
the Repository folder may have an extra empty line near the end. I =
added a trim on December 3rd that might take care if this if you could =
try it again.
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Mon 12/6/2004 7:43 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
i'm using the lib, updated last week (i'm waiting for sourceforge to be=20
up again and i'll update then), so no cvs.exe, and the server is a cvsnt =
on windows xp, :pserver:.
I was only listening to response events, not the request ones. I have=20
added it, and here is what i get from my TextBox now:
REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry=20
Updated Created Merged Mod-time Removed Set-static-directory=20
Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
--> []
REQUEST: [valid-requests]
--> []
RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot=20
Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified=20
Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8=20
Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions=20
Set Rename VirtualRepository expand-modules ci co chown setowner setperm =
chacl setacl lsacl passwd info update diff log rlog add remove=20
update-patches status ls rdiff tag rtag import admin export history=20
release watch-on watch-off watch-add watch-remove watchers editors init=20
annotate rannotate noop version Rootless-stream-modification=20
Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate=20
Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore=20
read-cvswrappers Error-If-Reader Valid-RcsOptions
- ( 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 /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 unrecognized request `'
does that put some light on the scene ?
Clayton Harbour wrote:
=20
=20
Which version of the client are you using Thomas? Also which version=20
of server are you connecting to? If you are using the code from cvs=20
could you do an update, sometimes it takes a while for sourceforge's=20
development cvs server to replicate to the anonymous server. Also=20
verify that you are handling the following events:
serverConn.RequestMessageEvent +=3D
new MessageEventHandler(Writer.WriteLine);
serverConn.ResponseMessageEvent +=3D
new MessageEventHandler(Writer.WriteLine);
This will print out all requests and responses. What I am suspecting=20
is that there is a CaseRequest being sent that the server does not=20
like...at least that was an issue I came across l week. Let me know=20
what you find out.
Cheers,
Clayton
-----Original Message-----
*From:* Thomas Guillemin [mailto:tg...@ja...]
*Sent:* December 6, 2004 1:53 AM
*To:* Clayton Harbour
*Cc:* sha...@li...
*Subject:* Re: [Sharpcvslib-users] Simple question
hm, it behaves exactly the same with this line instead.
and i still get [cvs server: M unrecognized request `'] in the =
end...
Clayton Harbour wrote:
=20
=20
Hi Thomas,
=20
I think this line:
FileInfo file =3D new FileInfo(pathdir + \\CVS =
<file://%5C%5CCVS> <file://%5C%5CCVS>);
should be:
DirectoryInfo dir =3D new DirectoryInfo(Path.Combine(pathdir,
"CVS");
=20
I am surprised that you don't get an error when you do an
Entries entries =3D Entries.Load(file);
=20
There is no CvsFileNotFoundException being thrown? Are you sure
you are not trapping this error silently?
=20
-----Original Message-----
*From:* Thomas Guillemin [mailto:tg...@ja...]
*Sent:* December 2, 2004 8:12 AM
*To:* Clayton Harbour
*Cc:* sha...@li...
*Subject:* Re: [Sharpcvslib-users] Simple question
mh i'm not sure to understand...
here is my code:
(...stuff...)
wd =3D new WorkingDirectory(CVSRoot, wdirname, reldirname);
cnx =3D 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 =3D new FileInfo(pathdir + =
"\\CVS");
FileInfo reposfile =3D new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(file);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 =3D 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:
=20
=20
Hi Thomas,
The code would look something like this:
Folder folder =3D new Folder();
Entries entries =3D new Entries.Load(file);
Entry entry =3D 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
=20
=20
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
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=20
one file ?=20
(with UpdateCommand2/CommitCommand2)
Thanks
Thomas
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from=20
real users. Discover which products truly live up to the=20
hype. Start reading now.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
=20
=20
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list
Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
=20
=20
=20
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list
Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
|
|
From: Thomas G. <tg...@ja...> - 2004-12-13 18:19:56
|
Hi Clayton
I'm not sure of how to set the FileInfo object.
Here is what i do to replace vpath by a FileInfo (first line and last
line are the same so you can replace it in the precedent code part):
Entries entries = Entries.Load(dir);
FileInfo fi = new FileInfo(vpath);
TextReader tr = fi.OpenText();
string fstr = tr.ReadToEnd();
Entry entry = new Entry(fi, fstr);
folder.Entries.Add(pathdir, entry);
And here is what i get from execution: (message is in french but that's ok)
Une exception non gérée du type
'ICSharpCode.SharpCvsLib.FileSystem.EntryParseException' s'est produite
dans icsharpcode.sharpcvslib.dll
Informations supplémentaires : Too many tokens in entry
line.tokens.Length=[34]line=[<?xml version="1.0" encoding="utf-8" ?>
<Revision_Index>
<FileList>
<Filename>Test/App.config</Filename>
<Revision>1.4</Revision>
</FileList>
<FileList>
<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>]
So i don't really know the way i should do it.
Does that ring anything for you ?
Thanks
Thomas
Clayton Harbour wrote:
> Hi Thomas,
>
> I think you are correct the commandline option would be uglier.
> Further I think that what you have found here is a break of some sort
> and should be fixed. Having said that I believe that vpath is a
> string, am I correct? If a string is passed in the application will
> try to "guess" if the string is a File or Directory. I have added
> methods for most parts of the API to take either a FileInfo or
> DirectoryInfo object. Could you try changing your vpath to a FileInfo
> object (and use FileInfo.FullPath fo the folders Hashtable) and let me
> know if that gets you by the latest challenge? I will look into the
> actual cause of the break tonight.
>
>
> Cheers,
>
> Clayton
>
> -----Original Message-----
> *From:* Thomas Guillemin [mailto:tg...@ja...]
> *Sent:* December 13, 2004 2:32 AM
> *To:* Clayton Harbour
> *Cc:* sha...@li...
> *Subject:* Re: [Sharpcvslib-users] Simple question
>
> Hi
>
> The recent changes seem to have deeply changed the whole
> behaviour. First, the first part that was working quite fine now
> generates a file not found exception ; it looks for
> d:\dev\CVSTest\Test\Index.xml\CVS (still with that part of the code:
> DirectoryInfo dir = new
> DirectoryInfo(Path.Combine(pathdir, "CVS"));
> FileInfo reposfile = new FileInfo(pathdir +
> "\\CVS\\Repository");
> Folder folder = new Folder();
> folder.Repository = Repository.Load(reposfile);
> Entries entries = Entries.Load(dir);
> Entry entry = entries[vpath];
> folder.Entries.Add(pathdir, entry);
> wd.Folders.Add(pathdir, folder);
> cnx = new CVSServerConnection(wd);
> RegisterListenEvents(cnx);
> cnx.Connect(wd, userpass);
> CommitCommand2 cmd2 = new CommitCommand2(wd);
> cmd2.Execute(cnx);
> cnx.Close();
> knowing that pathdir = d:\dev\CVSTest\Test\, and vpath =
> d:\dev\CVSTest\Test\Index.xml)
> Any recommandation ? i'm not sure of what i should change or not
> change, now i feel like i understand the mechanism less and less...
> And for the second part (i'm currently on it so maybe i will find
> more today) i do:
> cnx = new CVSServerConnection(wd);
> cnx.Connect(wd, userpass);
> RegisterListenEvents(cnx);
> UpdateCommand2 cmd = new UpdateCommand2(wd);
> cmd.Execute(cnx);
> and nothing appears in my textbox (knowing that
> registerlistenevents starts the requests, responses and errors
> listening and that no internal error appears, every line is passed
> fine in trace mode). What do you think ?
>
> For your information, i'm working here until 24/12, then i quit.
> I'd like to give them something finished as for my other works ;
> and i also would like to send you this app that could be an
> example of how to use your lib. So if we can't be done for this
> date, i'm not sure of when i'll finish it, because i'm not sure of
> when i'll be programming again at all. And i'm also thinking that
> if you keep changing elements of the base structure after that,
> which is much probable, my example won't be of any use anymore,
> so, maybe i could just replace the stuff by a command-line maker
> that would do what i want, that's ugly, but tell me what you think.
>
> Thomas
>
> Clayton Harbour wrote:
>
>> Hi Thomas,
>>
>> I agree with making the Folders object the default. When I move
>> the Property I will make the accessor a Folders object (which is
>> backed by a Hashtable, but implements ICollection). That is
>> going to take awhile because I would like to refactor all
>> commands to have something like that...and won't be in right
>> away. For the immediate I will try to make sure changing the
>> Folders and FoldersToUpdate to use the same variable under the
>> covers which should accomplish some of what you need.
>>
>> Adding the -A should be rather simple. If you look at the Tag
>> property it is basically like you describe below. As far as I
>> remember the remove sticky tags always operates on an enumeration
>> of files (i.e. we are unable to pick and choose which file to
>> remove stickies unless you execute the command more than once).
>> So it should make sense to set the -A (on requested) for the
>> group of folders in the FoldersToUpdate...hopefully I am making
>> sense here :-). I will try to get this in tonight if I have
>> time, I have added it as issue ( 1082691 ).
>>
>>
>> Cheers,
>>
>> Clayton
>>
>> -----Original Message-----
>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>> *Sent:* December 9, 2004 7:43 AM
>> *To:* Clayton Harbour
>> *Cc:* sha...@li...
>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>
>> yeah that's great.
>> i'll have to wait for the cvs changes ; btw i think you
>> should also transform the class of FoldersToUpdate: it is a
>> Folder[], so one can't use the Add method, while Folders is a
>> FileSystem.Folders object (which is, i guess, some kind of an
>> ArrayList right ?) which is way more easy to use for our
>> purposes.
>> Another issue i'm thinking of is the sticky tags thing...
>> Personnally, when i want to remove some tags i just type an
>> 'update -A' command... but here for some people it could be
>> harmful. For the moment, i think the easiest way would be to
>> add a special property to the updatecommand class, so that
>> people would only use it when needed... but there could be
>> different possibilities (and i don't know cvs enough to be
>> able to enumerate them).
>> What do you think ?
>>
>> Thomas
>>
>> Clayton Harbour wrote:
>>
>>>Hi Thomas,
>>>
>>>Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate needs to be reworked actually. The basic idea was to store an entire list of the CVS Entries Folders in the Folders property and then filter that and put it in the FoldersToUpdate property. I have filed a bug on this (1082194) and the simple solution will probably be to just make the two properties equal if there are no issues anywhere else in the library.
>>>
>>>In the meantime though if you populate the FoldersToUpdate Property instead that should fix your issue.
>>>
>>>I have also added a check to see if the FoldersToUpdate is null and if so the method just returns which is better than the NullPointer.
>>>
>>>
>>>Cheers,
>>>
>>>
>>>Clayton
>>>
>>>-----Original Message-----
>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>Sent: Thu 12/9/2004 3:42 AM
>>>To: Clayton Harbour
>>>Cc: sha...@li...
>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>hi hi
>>>thanks for that you're great clayton, now my committing function seems
>>>to work fine.
>>>Now i'm still having problems with my update function, which begins with
>>>the update of one file (still the index.xml):
>>>if (File.Exists(IndexPath))
>>> {
>>> string pathdir = vpath.Substring(0,
>>>IndexPath.LastIndexOf("\\"));
>>> string wdirname = pathdir.Substring(0,
>>>pathdir.LastIndexOf("\\"));
>>>
>>> string reldirname =
>>>pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -
>>>pathdir.LastIndexOf("\\")-1);
>>> // We update the index file to the desired revision
>>> // (the last one by default)
>>> wd = new WorkingDirectory(cvsroot, wdirname, reldirname);
>>> if (Revision != "" && Revision != "Last Version")
>>> {
>>> wd.Revision = Revision;
>>> }
>>> DirectoryInfo dir = new
>>>DirectoryInfo(Path.Combine(pathdir, "CVS"));
>>> FileInfo reposfile = new FileInfo(pathdir +
>>>"\\CVS\\Repository");
>>> Folder folder = new Folder();
>>> folder.Repository = Repository.Load(reposfile);
>>> Entries entries = Entries.Load(dir);
>>> Entry entry = entries[vpath];
>>> folder.Entries.Add(pathdir, entry);
>>> wd.Folders.Add(pathdir, folder);
>>> //Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
>>> cnx = new CVSServerConnection(wd);
>>> cnx.Connect(wd, userpass);
>>> RegisterListenEvents(cnx);
>>> UpdateCommand2 cmd = new UpdateCommand2(wd);
>>> cmd.Execute(cnx);
>>>
>>>It crashes on UpdateCommand2.Execute():
>>>workingDirectory.FoldersToUpdate is NULL and so i get a
>>>nullreferenceexception...
>>>Do you know how i must proceed ?
>>>
>>>Thomas
>>>
>>>Clayton Harbour wrote:
>>>
>>>
>>>
>>>>Hi Thomas, just checking back in if you are still having an issue with this. I have been looking at the error message below and it looks like the Repository folder may have an extra empty line near the end. I added a trim on December 3rd that might take care if this if you could try it again.
>>>>
>>>>Cheers,
>>>>
>>>>Clayton
>>>>
>>>>
>>>>-----Original Message-----
>>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>>Sent: Mon 12/6/2004 7:43 AM
>>>>To: Clayton Harbour
>>>>Cc: sha...@li...
>>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>>i'm using the lib, updated last week (i'm waiting for sourceforge to be
>>>>up again and i'll update then), so no cvs.exe, and the server is a cvsnt
>>>>on windows xp, :pserver:.
>>>>I was only listening to response events, not the request ones. I have
>>>>added it, and here is what i get from my TextBox now:
>>>>REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry
>>>>Updated Created Merged Mod-time Removed Set-static-directory
>>>>Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
>>>> --> []
>>>>REQUEST: [valid-requests]
>>>> --> []
>>>>RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot
>>>>Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified
>>>>Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8
>>>>Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions
>>>>Set Rename VirtualRepository expand-modules ci co chown setowner setperm
>>>>chacl setacl lsacl passwd info update diff log rlog add remove
>>>>update-patches status ls rdiff tag rtag import admin export history
>>>>release watch-on watch-off watch-add watch-remove watchers editors init
>>>>annotate rannotate noop version Rootless-stream-modification
>>>>Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate
>>>>Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore
>>>>read-cvswrappers Error-If-Reader Valid-RcsOptions
>>>>- ( 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 /Index.xml/1.6/Mon Dec 6 16:32:25 2004+Fri Dec 3
>>>>12:03:15 2004//T1.6]
>>>> --> []
>>>>REQUEST: [Modified Index.xml]
>>>> --> [u=rw,g=rw,o=rw]
>>>> --> []
>>>>REQUEST: [Directory .]
>>>> --> [/CVSRep/Test
>>>>]
>>>> --> []
>>>> --> []
>>>>REQUEST: [Argument Index.xml]
>>>> --> []
>>>>REQUEST: [ci]
>>>> --> []
>>>>ERROR: cvs server: M unrecognized request `'
>>>>
>>>>does that put some light on the scene ?
>>>>
>>>>Clayton Harbour wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Which version of the client are you using Thomas? Also which version
>>>>>of server are you connecting to? If you are using the code from cvs
>>>>>could you do an update, sometimes it takes a while for sourceforge's
>>>>>development cvs server to replicate to the anonymous server. Also
>>>>>verify that you are handling the following events:
>>>>> serverConn.RequestMessageEvent +=
>>>>> new MessageEventHandler(Writer.WriteLine);
>>>>> serverConn.ResponseMessageEvent +=
>>>>> new MessageEventHandler(Writer.WriteLine);
>>>>>
>>>>>This will print out all requests and responses. What I am suspecting
>>>>>is that there is a CaseRequest being sent that the server does not
>>>>>like...at least that was an issue I came across l week. Let me know
>>>>>what you find out.
>>>>>
>>>>>
>>>>>Cheers,
>>>>>
>>>>>Clayton
>>>>>
>>>>> -----Original Message-----
>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>> *Sent:* December 6, 2004 1:53 AM
>>>>> *To:* Clayton Harbour
>>>>> *Cc:* sha...@li...
>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>
>>>>> hm, it behaves exactly the same with this line instead.
>>>>> and i still get [cvs server: M unrecognized request `'] in the end...
>>>>>
>>>>> Clayton Harbour wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi Thomas,
>>>>>>
>>>>>> I think this line:
>>>>>> FileInfo file = new FileInfo(pathdir + \\CVS <file://%5C%5CCVS>);
>>>>>> should be:
>>>>>> DirectoryInfo dir = new DirectoryInfo(Path.Combine(pathdir,
>>>>>> "CVS");
>>>>>>
>>>>>> I am surprised that you don't get an error when you do an
>>>>>> Entries entries = Entries.Load(file);
>>>>>>
>>>>>> There is no CvsFileNotFoundException being thrown? Are you sure
>>>>>> you are not trapping this error silently?
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>>> *Sent:* December 2, 2004 8:12 AM
>>>>>> *To:* Clayton Harbour
>>>>>> *Cc:* sha...@li...
>>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>>
>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>>-------------------------------------------------------
>>>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
>>>
>>>
>>>
|
|
From: Clayton H. <cla...@sp...> - 2004-12-13 14:33:29
|
Hi Thomas,
=20
I think you are correct the commandline option would be uglier. Further
I think that what you have found here is a break of some sort and should
be fixed. Having said that I believe that vpath is a string, am I
correct? If a string is passed in the application will try to "guess"
if the string is a File or Directory. I have added methods for most
parts of the API to take either a FileInfo or DirectoryInfo object.
Could you try changing your vpath to a FileInfo object (and use
FileInfo.FullPath fo the folders Hashtable) and let me know if that gets
you by the latest challenge? I will look into the actual cause of the
break tonight.
=20
=20
Cheers,
=20
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 13, 2004 2:32 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
Hi
The recent changes seem to have deeply changed the whole behaviour.
First, the first part that was working quite fine now generates a file
not found exception ; it looks for d:\dev\CVSTest\Test\Index.xml\CVS
(still with that part of the code:
DirectoryInfo dir =3D new
DirectoryInfo(Path.Combine(pathdir, "CVS"));
FileInfo reposfile =3D new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(dir);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx =3D new CVSServerConnection(wd);
RegisterListenEvents(cnx);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 =3D new CommitCommand2(wd);
cmd2.Execute(cnx);
cnx.Close();
knowing that pathdir =3D d:\dev\CVSTest\Test\, and vpath =3D
d:\dev\CVSTest\Test\Index.xml)
Any recommandation ? i'm not sure of what i should change or not change,
now i feel like i understand the mechanism less and less...
And for the second part (i'm currently on it so maybe i will find more
today) i do:
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
RegisterListenEvents(cnx);
UpdateCommand2 cmd =3D new UpdateCommand2(wd);
cmd.Execute(cnx);
and nothing appears in my textbox (knowing that registerlistenevents
starts the requests, responses and errors listening and that no internal
error appears, every line is passed fine in trace mode). What do you
think ?
For your information, i'm working here until 24/12, then i quit. I'd
like to give them something finished as for my other works ; and i also
would like to send you this app that could be an example of how to use
your lib. So if we can't be done for this date, i'm not sure of when
i'll finish it, because i'm not sure of when i'll be programming again
at all. And i'm also thinking that if you keep changing elements of the
base structure after that, which is much probable, my example won't be
of any use anymore, so, maybe i could just replace the stuff by a
command-line maker that would do what i want, that's ugly, but tell me
what you think.
Thomas
Clayton Harbour wrote:=20
Hi Thomas,
=20
I agree with making the Folders object the default. When I move the
Property I will make the accessor a Folders object (which is backed by a
Hashtable, but implements ICollection). That is going to take awhile
because I would like to refactor all commands to have something like
that...and won't be in right away. For the immediate I will try to make
sure changing the Folders and FoldersToUpdate to use the same variable
under the covers which should accomplish some of what you need.
=20
Adding the -A should be rather simple. If you look at the Tag property
it is basically like you describe below. As far as I remember the
remove sticky tags always operates on an enumeration of files (i.e. we
are unable to pick and choose which file to remove stickies unless you
execute the command more than once). So it should make sense to set the
-A (on requested) for the group of folders in the
FoldersToUpdate...hopefully I am making sense here :-). I will try to
get this in tonight if I have time, I have added it as issue ( 1082691
).
=20
=20
Cheers,
=20
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 9, 2004 7:43 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
yeah that's great.
i'll have to wait for the cvs changes ; btw i think you should also
transform the class of FoldersToUpdate: it is a Folder[], so one can't
use the Add method, while Folders is a FileSystem.Folders object (which
is, i guess, some kind of an ArrayList right ?) which is way more easy
to use for our purposes.
Another issue i'm thinking of is the sticky tags thing... Personnally,
when i want to remove some tags i just type an 'update -A' command...
but here for some people it could be harmful. For the moment, i think
the easiest way would be to add a special property to the updatecommand
class, so that people would only use it when needed... but there could
be different possibilities (and i don't know cvs enough to be able to
enumerate them).
What do you think ?
Thomas
Clayton Harbour wrote:
Hi Thomas,
Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate
needs to be reworked actually. The basic idea was to store an entire
list of the CVS Entries Folders in the Folders property and then filter
that and put it in the FoldersToUpdate property. I have filed a bug on
this (1082194) and the simple solution will probably be to just make the
two properties equal if there are no issues anywhere else in the
library. =20
In the meantime though if you populate the FoldersToUpdate Property
instead that should fix your issue.
I have also added a check to see if the FoldersToUpdate is null and if
so the method just returns which is better than the NullPointer.
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Thu 12/9/2004 3:42 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
hi hi
thanks for that you're great clayton, now my committing function seems=20
to work fine.
Now i'm still having problems with my update function, which begins with
the update of one file (still the index.xml):
if (File.Exists(IndexPath))
{
string pathdir =3D vpath.Substring(0,=20
IndexPath.LastIndexOf("\\"));
string wdirname =3D pathdir.Substring(0,=20
pathdir.LastIndexOf("\\"));
string reldirname =3D=20
pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -=20
pathdir.LastIndexOf("\\")-1);
// We update the index file to the desired revision
// (the last one by default)
wd =3D new WorkingDirectory(cvsroot, wdirname,
reldirname);
if (Revision !=3D "" && Revision !=3D "Last Version")
{
wd.Revision =3D Revision;
}
DirectoryInfo dir =3D new=20
DirectoryInfo(Path.Combine(pathdir, "CVS"));
FileInfo reposfile =3D new FileInfo(pathdir +=20
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(dir);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
//Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
RegisterListenEvents(cnx);
UpdateCommand2 cmd =3D new UpdateCommand2(wd);
cmd.Execute(cnx);
It crashes on UpdateCommand2.Execute(): =20
workingDirectory.FoldersToUpdate is NULL and so i get a=20
nullreferenceexception...
Do you know how i must proceed ?
Thomas
Clayton Harbour wrote:
=20
Hi Thomas, just checking back in if you are still having an issue with
this. I have been looking at the error message below and it looks like
the Repository folder may have an extra empty line near the end. I
added a trim on December 3rd that might take care if this if you could
try it again.
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Mon 12/6/2004 7:43 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
i'm using the lib, updated last week (i'm waiting for sourceforge to be=20
up again and i'll update then), so no cvs.exe, and the server is a cvsnt
on windows xp, :pserver:.
I was only listening to response events, not the request ones. I have=20
added it, and here is what i get from my TextBox now:
REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry=20
Updated Created Merged Mod-time Removed Set-static-directory=20
Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
--> []
REQUEST: [valid-requests]
--> []
RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot=20
Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified=20
Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8=20
Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions=20
Set Rename VirtualRepository expand-modules ci co chown setowner setperm
chacl setacl lsacl passwd info update diff log rlog add remove=20
update-patches status ls rdiff tag rtag import admin export history=20
release watch-on watch-off watch-add watch-remove watchers editors init=20
annotate rannotate noop version Rootless-stream-modification=20
Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate=20
Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore=20
read-cvswrappers Error-If-Reader Valid-RcsOptions
- ( 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 /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 unrecognized request `'
does that put some light on the scene ?
Clayton Harbour wrote:
=20
=20
Which version of the client are you using Thomas? Also which version=20
of server are you connecting to? If you are using the code from cvs=20
could you do an update, sometimes it takes a while for sourceforge's=20
development cvs server to replicate to the anonymous server. Also=20
verify that you are handling the following events:
serverConn.RequestMessageEvent +=3D
new MessageEventHandler(Writer.WriteLine);
serverConn.ResponseMessageEvent +=3D
new MessageEventHandler(Writer.WriteLine);
This will print out all requests and responses. What I am suspecting=20
is that there is a CaseRequest being sent that the server does not=20
like...at least that was an issue I came across l week. Let me know=20
what you find out.
Cheers,
Clayton
-----Original Message-----
*From:* Thomas Guillemin [mailto:tg...@ja...]
*Sent:* December 6, 2004 1:53 AM
*To:* Clayton Harbour
*Cc:* sha...@li...
*Subject:* Re: [Sharpcvslib-users] Simple question
hm, it behaves exactly the same with this line instead.
and i still get [cvs server: M unrecognized request `'] in the
end...
Clayton Harbour wrote:
=20
=20
Hi Thomas,
=20
I think this line:
FileInfo file =3D new FileInfo(pathdir + \\CVS =
<file://%5C%5CCVS>
<file://%5C%5CCVS>);
should be:
DirectoryInfo dir =3D new DirectoryInfo(Path.Combine(pathdir,
"CVS");
=20
I am surprised that you don't get an error when you do an
Entries entries =3D Entries.Load(file);
=20
There is no CvsFileNotFoundException being thrown? Are you sure
you are not trapping this error silently?
=20
-----Original Message-----
*From:* Thomas Guillemin [mailto:tg...@ja...]
*Sent:* December 2, 2004 8:12 AM
*To:* Clayton Harbour
*Cc:* sha...@li...
*Subject:* Re: [Sharpcvslib-users] Simple question
mh i'm not sure to understand...
here is my code:
(...stuff...)
wd =3D new WorkingDirectory(CVSRoot, wdirname, reldirname);
cnx =3D 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 =3D new FileInfo(pathdir + =
"\\CVS");
FileInfo reposfile =3D new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(file);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 =3D 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:
=20
=20
Hi Thomas,
The code would look something like this:
Folder folder =3D new Folder();
Entries entries =3D new Entries.Load(file);
Entry entry =3D 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
=20
=20
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
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=20
one file ?=20
(with UpdateCommand2/CommitCommand2)
Thanks
Thomas
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from=20
real users. Discover which products truly live up to the=20
hype. Start reading now.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
=20
=20
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list
Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
=20
=20
=20
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list
Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
|
|
From: Thomas G. <tg...@ja...> - 2004-12-13 10:34:04
|
Hi
The recent changes seem to have deeply changed the whole behaviour.
First, the first part that was working quite fine now generates a file
not found exception ; it looks for d:\dev\CVSTest\Test\Index.xml\CVS
(still with that part of the code:
DirectoryInfo dir = new
DirectoryInfo(Path.Combine(pathdir, "CVS"));
FileInfo reposfile = new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder = new Folder();
folder.Repository = Repository.Load(reposfile);
Entries entries = Entries.Load(dir);
Entry entry = entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx = new CVSServerConnection(wd);
RegisterListenEvents(cnx);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 = new CommitCommand2(wd);
cmd2.Execute(cnx);
cnx.Close();
knowing that pathdir = d:\dev\CVSTest\Test\, and vpath =
d:\dev\CVSTest\Test\Index.xml)
Any recommandation ? i'm not sure of what i should change or not change,
now i feel like i understand the mechanism less and less...
And for the second part (i'm currently on it so maybe i will find more
today) i do:
cnx = new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
RegisterListenEvents(cnx);
UpdateCommand2 cmd = new UpdateCommand2(wd);
cmd.Execute(cnx);
and nothing appears in my textbox (knowing that registerlistenevents
starts the requests, responses and errors listening and that no internal
error appears, every line is passed fine in trace mode). What do you think ?
For your information, i'm working here until 24/12, then i quit. I'd
like to give them something finished as for my other works ; and i also
would like to send you this app that could be an example of how to use
your lib. So if we can't be done for this date, i'm not sure of when
i'll finish it, because i'm not sure of when i'll be programming again
at all. And i'm also thinking that if you keep changing elements of the
base structure after that, which is much probable, my example won't be
of any use anymore, so, maybe i could just replace the stuff by a
command-line maker that would do what i want, that's ugly, but tell me
what you think.
Thomas
Clayton Harbour wrote:
> Hi Thomas,
>
> I agree with making the Folders object the default. When I move the
> Property I will make the accessor a Folders object (which is backed by
> a Hashtable, but implements ICollection). That is going to take
> awhile because I would like to refactor all commands to have something
> like that...and won't be in right away. For the immediate I will try
> to make sure changing the Folders and FoldersToUpdate to use the same
> variable under the covers which should accomplish some of what you need.
>
> Adding the -A should be rather simple. If you look at the Tag
> property it is basically like you describe below. As far as I
> remember the remove sticky tags always operates on an enumeration of
> files (i.e. we are unable to pick and choose which file to remove
> stickies unless you execute the command more than once). So it should
> make sense to set the -A (on requested) for the group of folders in
> the FoldersToUpdate...hopefully I am making sense here :-). I will
> try to get this in tonight if I have time, I have added it as issue (
> 1082691 ).
>
>
> Cheers,
>
> Clayton
>
> -----Original Message-----
> *From:* Thomas Guillemin [mailto:tg...@ja...]
> *Sent:* December 9, 2004 7:43 AM
> *To:* Clayton Harbour
> *Cc:* sha...@li...
> *Subject:* Re: [Sharpcvslib-users] Simple question
>
> yeah that's great.
> i'll have to wait for the cvs changes ; btw i think you should
> also transform the class of FoldersToUpdate: it is a Folder[], so
> one can't use the Add method, while Folders is a
> FileSystem.Folders object (which is, i guess, some kind of an
> ArrayList right ?) which is way more easy to use for our purposes.
> Another issue i'm thinking of is the sticky tags thing...
> Personnally, when i want to remove some tags i just type an
> 'update -A' command... but here for some people it could be
> harmful. For the moment, i think the easiest way would be to add a
> special property to the updatecommand class, so that people would
> only use it when needed... but there could be different
> possibilities (and i don't know cvs enough to be able to enumerate
> them).
> What do you think ?
>
> Thomas
>
> Clayton Harbour wrote:
>
>>Hi Thomas,
>>
>>Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate needs to be reworked actually. The basic idea was to store an entire list of the CVS Entries Folders in the Folders property and then filter that and put it in the FoldersToUpdate property. I have filed a bug on this (1082194) and the simple solution will probably be to just make the two properties equal if there are no issues anywhere else in the library.
>>
>>In the meantime though if you populate the FoldersToUpdate Property instead that should fix your issue.
>>
>>I have also added a check to see if the FoldersToUpdate is null and if so the method just returns which is better than the NullPointer.
>>
>>
>>Cheers,
>>
>>
>>Clayton
>>
>>-----Original Message-----
>>From: Thomas Guillemin [mailto:tg...@ja...]
>>Sent: Thu 12/9/2004 3:42 AM
>>To: Clayton Harbour
>>Cc: sha...@li...
>>Subject: Re: [Sharpcvslib-users] Simple question
>>hi hi
>>thanks for that you're great clayton, now my committing function seems
>>to work fine.
>>Now i'm still having problems with my update function, which begins with
>>the update of one file (still the index.xml):
>>if (File.Exists(IndexPath))
>> {
>> string pathdir = vpath.Substring(0,
>>IndexPath.LastIndexOf("\\"));
>> string wdirname = pathdir.Substring(0,
>>pathdir.LastIndexOf("\\"));
>>
>> string reldirname =
>>pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -
>>pathdir.LastIndexOf("\\")-1);
>> // We update the index file to the desired revision
>> // (the last one by default)
>> wd = new WorkingDirectory(cvsroot, wdirname, reldirname);
>> if (Revision != "" && Revision != "Last Version")
>> {
>> wd.Revision = Revision;
>> }
>> DirectoryInfo dir = new
>>DirectoryInfo(Path.Combine(pathdir, "CVS"));
>> FileInfo reposfile = new FileInfo(pathdir +
>>"\\CVS\\Repository");
>> Folder folder = new Folder();
>> folder.Repository = Repository.Load(reposfile);
>> Entries entries = Entries.Load(dir);
>> Entry entry = entries[vpath];
>> folder.Entries.Add(pathdir, entry);
>> wd.Folders.Add(pathdir, folder);
>> //Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
>> cnx = new CVSServerConnection(wd);
>> cnx.Connect(wd, userpass);
>> RegisterListenEvents(cnx);
>> UpdateCommand2 cmd = new UpdateCommand2(wd);
>> cmd.Execute(cnx);
>>
>>It crashes on UpdateCommand2.Execute():
>>workingDirectory.FoldersToUpdate is NULL and so i get a
>>nullreferenceexception...
>>Do you know how i must proceed ?
>>
>>Thomas
>>
>>Clayton Harbour wrote:
>>
>>
>>
>>>Hi Thomas, just checking back in if you are still having an issue with this. I have been looking at the error message below and it looks like the Repository folder may have an extra empty line near the end. I added a trim on December 3rd that might take care if this if you could try it again.
>>>
>>>Cheers,
>>>
>>>Clayton
>>>
>>>
>>>-----Original Message-----
>>>From: Thomas Guillemin [mailto:tg...@ja...]
>>>Sent: Mon 12/6/2004 7:43 AM
>>>To: Clayton Harbour
>>>Cc: sha...@li...
>>>Subject: Re: [Sharpcvslib-users] Simple question
>>>i'm using the lib, updated last week (i'm waiting for sourceforge to be
>>>up again and i'll update then), so no cvs.exe, and the server is a cvsnt
>>>on windows xp, :pserver:.
>>>I was only listening to response events, not the request ones. I have
>>>added it, and here is what i get from my TextBox now:
>>>REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry
>>>Updated Created Merged Mod-time Removed Set-static-directory
>>>Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
>>> --> []
>>>REQUEST: [valid-requests]
>>> --> []
>>>RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot
>>>Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified
>>>Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8
>>>Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions
>>>Set Rename VirtualRepository expand-modules ci co chown setowner setperm
>>>chacl setacl lsacl passwd info update diff log rlog add remove
>>>update-patches status ls rdiff tag rtag import admin export history
>>>release watch-on watch-off watch-add watch-remove watchers editors init
>>>annotate rannotate noop version Rootless-stream-modification
>>>Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate
>>>Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore
>>>read-cvswrappers Error-If-Reader Valid-RcsOptions
>>>- ( 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 /Index.xml/1.6/Mon Dec 6 16:32:25 2004+Fri Dec 3
>>>12:03:15 2004//T1.6]
>>> --> []
>>>REQUEST: [Modified Index.xml]
>>> --> [u=rw,g=rw,o=rw]
>>> --> []
>>>REQUEST: [Directory .]
>>> --> [/CVSRep/Test
>>>]
>>> --> []
>>> --> []
>>>REQUEST: [Argument Index.xml]
>>> --> []
>>>REQUEST: [ci]
>>> --> []
>>>ERROR: cvs server: M unrecognized request `'
>>>
>>>does that put some light on the scene ?
>>>
>>>Clayton Harbour wrote:
>>>
>>>
>>>
>>>
>>>
>>>>Which version of the client are you using Thomas? Also which version
>>>>of server are you connecting to? If you are using the code from cvs
>>>>could you do an update, sometimes it takes a while for sourceforge's
>>>>development cvs server to replicate to the anonymous server. Also
>>>>verify that you are handling the following events:
>>>> serverConn.RequestMessageEvent +=
>>>> new MessageEventHandler(Writer.WriteLine);
>>>> serverConn.ResponseMessageEvent +=
>>>> new MessageEventHandler(Writer.WriteLine);
>>>>
>>>>This will print out all requests and responses. What I am suspecting
>>>>is that there is a CaseRequest being sent that the server does not
>>>>like...at least that was an issue I came across l week. Let me know
>>>>what you find out.
>>>>
>>>>
>>>>Cheers,
>>>>
>>>>Clayton
>>>>
>>>> -----Original Message-----
>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>> *Sent:* December 6, 2004 1:53 AM
>>>> *To:* Clayton Harbour
>>>> *Cc:* sha...@li...
>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>
>>>> hm, it behaves exactly the same with this line instead.
>>>> and i still get [cvs server: M unrecognized request `'] in the end...
>>>>
>>>> Clayton Harbour wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Hi Thomas,
>>>>>
>>>>> I think this line:
>>>>> FileInfo file = new FileInfo(pathdir + \\CVS <file://%5C%5CCVS>);
>>>>> should be:
>>>>> DirectoryInfo dir = new DirectoryInfo(Path.Combine(pathdir,
>>>>> "CVS");
>>>>>
>>>>> I am surprised that you don't get an error when you do an
>>>>> Entries entries = Entries.Load(file);
>>>>>
>>>>> There is no CvsFileNotFoundException being thrown? Are you sure
>>>>> you are not trapping this error silently?
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>>> *Sent:* December 2, 2004 8:12 AM
>>>>> *To:* Clayton Harbour
>>>>> *Cc:* sha...@li...
>>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>>
>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>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
>>
>>
>>
|
|
From: Clayton H. <cla...@sp...> - 2004-12-10 05:19:12
|
Hi Thomas,
=20
I agree with making the Folders object the default. When I move the
Property I will make the accessor a Folders object (which is backed by a
Hashtable, but implements ICollection). That is going to take awhile
because I would like to refactor all commands to have something like
that...and won't be in right away. For the immediate I will try to make
sure changing the Folders and FoldersToUpdate to use the same variable
under the covers which should accomplish some of what you need.
=20
Adding the -A should be rather simple. If you look at the Tag property
it is basically like you describe below. As far as I remember the
remove sticky tags always operates on an enumeration of files (i.e. we
are unable to pick and choose which file to remove stickies unless you
execute the command more than once). So it should make sense to set the
-A (on requested) for the group of folders in the
FoldersToUpdate...hopefully I am making sense here :-). I will try to
get this in tonight if I have time, I have added it as issue ( 1082691
).
=20
=20
Cheers,
=20
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 9, 2004 7:43 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
yeah that's great.
i'll have to wait for the cvs changes ; btw i think you should also
transform the class of FoldersToUpdate: it is a Folder[], so one can't
use the Add method, while Folders is a FileSystem.Folders object (which
is, i guess, some kind of an ArrayList right ?) which is way more easy
to use for our purposes.
Another issue i'm thinking of is the sticky tags thing... Personnally,
when i want to remove some tags i just type an 'update -A' command...
but here for some people it could be harmful. For the moment, i think
the easiest way would be to add a special property to the updatecommand
class, so that people would only use it when needed... but there could
be different possibilities (and i don't know cvs enough to be able to
enumerate them).
What do you think ?
Thomas
Clayton Harbour wrote:
Hi Thomas,
Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate
needs to be reworked actually. The basic idea was to store an entire
list of the CVS Entries Folders in the Folders property and then filter
that and put it in the FoldersToUpdate property. I have filed a bug on
this (1082194) and the simple solution will probably be to just make the
two properties equal if there are no issues anywhere else in the
library. =20
In the meantime though if you populate the FoldersToUpdate Property
instead that should fix your issue.
I have also added a check to see if the FoldersToUpdate is null and if
so the method just returns which is better than the NullPointer.
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Thu 12/9/2004 3:42 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
hi hi
thanks for that you're great clayton, now my committing function seems=20
to work fine.
Now i'm still having problems with my update function, which begins with
the update of one file (still the index.xml):
if (File.Exists(IndexPath))
{
string pathdir =3D vpath.Substring(0,=20
IndexPath.LastIndexOf("\\"));
string wdirname =3D pathdir.Substring(0,=20
pathdir.LastIndexOf("\\"));
string reldirname =3D=20
pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -=20
pathdir.LastIndexOf("\\")-1);
// We update the index file to the desired revision
// (the last one by default)
wd =3D new WorkingDirectory(cvsroot, wdirname,
reldirname);
if (Revision !=3D "" && Revision !=3D "Last Version")
{
wd.Revision =3D Revision;
}
DirectoryInfo dir =3D new=20
DirectoryInfo(Path.Combine(pathdir, "CVS"));
FileInfo reposfile =3D new FileInfo(pathdir +=20
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(dir);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
//Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
RegisterListenEvents(cnx);
UpdateCommand2 cmd =3D new UpdateCommand2(wd);
cmd.Execute(cnx);
It crashes on UpdateCommand2.Execute(): =20
workingDirectory.FoldersToUpdate is NULL and so i get a=20
nullreferenceexception...
Do you know how i must proceed ?
Thomas
Clayton Harbour wrote:
=20
Hi Thomas, just checking back in if you are still having an issue with
this. I have been looking at the error message below and it looks like
the Repository folder may have an extra empty line near the end. I
added a trim on December 3rd that might take care if this if you could
try it again.
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Mon 12/6/2004 7:43 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
i'm using the lib, updated last week (i'm waiting for sourceforge to be=20
up again and i'll update then), so no cvs.exe, and the server is a cvsnt
on windows xp, :pserver:.
I was only listening to response events, not the request ones. I have=20
added it, and here is what i get from my TextBox now:
REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry=20
Updated Created Merged Mod-time Removed Set-static-directory=20
Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
--> []
REQUEST: [valid-requests]
--> []
RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot=20
Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified=20
Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8=20
Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions=20
Set Rename VirtualRepository expand-modules ci co chown setowner setperm
chacl setacl lsacl passwd info update diff log rlog add remove=20
update-patches status ls rdiff tag rtag import admin export history=20
release watch-on watch-off watch-add watch-remove watchers editors init=20
annotate rannotate noop version Rootless-stream-modification=20
Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate=20
Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore=20
read-cvswrappers Error-If-Reader Valid-RcsOptions
- ( 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 /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 unrecognized request `'
does that put some light on the scene ?
Clayton Harbour wrote:
=20
=20
Which version of the client are you using Thomas? Also which version=20
of server are you connecting to? If you are using the code from cvs=20
could you do an update, sometimes it takes a while for sourceforge's=20
development cvs server to replicate to the anonymous server. Also=20
verify that you are handling the following events:
serverConn.RequestMessageEvent +=3D
new MessageEventHandler(Writer.WriteLine);
serverConn.ResponseMessageEvent +=3D
new MessageEventHandler(Writer.WriteLine);
This will print out all requests and responses. What I am suspecting=20
is that there is a CaseRequest being sent that the server does not=20
like...at least that was an issue I came across l week. Let me know=20
what you find out.
Cheers,
Clayton
-----Original Message-----
*From:* Thomas Guillemin [mailto:tg...@ja...]
*Sent:* December 6, 2004 1:53 AM
*To:* Clayton Harbour
*Cc:* sha...@li...
*Subject:* Re: [Sharpcvslib-users] Simple question
hm, it behaves exactly the same with this line instead.
and i still get [cvs server: M unrecognized request `'] in the
end...
Clayton Harbour wrote:
=20
=20
Hi Thomas,
=20
I think this line:
FileInfo file =3D new FileInfo(pathdir + \\CVS =
<file://%5C%5CCVS>
<file://%5C%5CCVS>);
should be:
DirectoryInfo dir =3D new DirectoryInfo(Path.Combine(pathdir,
"CVS");
=20
I am surprised that you don't get an error when you do an
Entries entries =3D Entries.Load(file);
=20
There is no CvsFileNotFoundException being thrown? Are you sure
you are not trapping this error silently?
=20
-----Original Message-----
*From:* Thomas Guillemin [mailto:tg...@ja...]
*Sent:* December 2, 2004 8:12 AM
*To:* Clayton Harbour
*Cc:* sha...@li...
*Subject:* Re: [Sharpcvslib-users] Simple question
mh i'm not sure to understand...
here is my code:
(...stuff...)
wd =3D new WorkingDirectory(CVSRoot, wdirname, reldirname);
cnx =3D 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 =3D new FileInfo(pathdir + =
"\\CVS");
FileInfo reposfile =3D new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(file);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 =3D 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:
=20
=20
Hi Thomas,
The code would look something like this:
Folder folder =3D new Folder();
Entries entries =3D new Entries.Load(file);
Entry entry =3D 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
=20
=20
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
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=20
one file ?=20
(with UpdateCommand2/CommitCommand2)
Thanks
Thomas
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from=20
real users. Discover which products truly live up to the=20
hype. Start reading now.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
=20
=20
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list
Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
=20
=20
=20
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list
Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
|
|
From: Thomas G. <tg...@ja...> - 2004-12-09 15:44:21
|
yeah that's great.
i'll have to wait for the cvs changes ; btw i think you should also
transform the class of FoldersToUpdate: it is a Folder[], so one can't
use the Add method, while Folders is a FileSystem.Folders object (which
is, i guess, some kind of an ArrayList right ?) which is way more easy
to use for our purposes.
Another issue i'm thinking of is the sticky tags thing... Personnally,
when i want to remove some tags i just type an 'update -A' command...
but here for some people it could be harmful. For the moment, i think
the easiest way would be to add a special property to the updatecommand
class, so that people would only use it when needed... but there could
be different possibilities (and i don't know cvs enough to be able to
enumerate them).
What do you think ?
Thomas
Clayton Harbour wrote:
>Hi Thomas,
>
>Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate needs to be reworked actually. The basic idea was to store an entire list of the CVS Entries Folders in the Folders property and then filter that and put it in the FoldersToUpdate property. I have filed a bug on this (1082194) and the simple solution will probably be to just make the two properties equal if there are no issues anywhere else in the library.
>
>In the meantime though if you populate the FoldersToUpdate Property instead that should fix your issue.
>
>I have also added a check to see if the FoldersToUpdate is null and if so the method just returns which is better than the NullPointer.
>
>
>Cheers,
>
>
>Clayton
>
>-----Original Message-----
>From: Thomas Guillemin [mailto:tg...@ja...]
>Sent: Thu 12/9/2004 3:42 AM
>To: Clayton Harbour
>Cc: sha...@li...
>Subject: Re: [Sharpcvslib-users] Simple question
>hi hi
>thanks for that you're great clayton, now my committing function seems
>to work fine.
>Now i'm still having problems with my update function, which begins with
>the update of one file (still the index.xml):
>if (File.Exists(IndexPath))
> {
> string pathdir = vpath.Substring(0,
>IndexPath.LastIndexOf("\\"));
> string wdirname = pathdir.Substring(0,
>pathdir.LastIndexOf("\\"));
>
> string reldirname =
>pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -
>pathdir.LastIndexOf("\\")-1);
> // We update the index file to the desired revision
> // (the last one by default)
> wd = new WorkingDirectory(cvsroot, wdirname, reldirname);
> if (Revision != "" && Revision != "Last Version")
> {
> wd.Revision = Revision;
> }
> DirectoryInfo dir = new
>DirectoryInfo(Path.Combine(pathdir, "CVS"));
> FileInfo reposfile = new FileInfo(pathdir +
>"\\CVS\\Repository");
> Folder folder = new Folder();
> folder.Repository = Repository.Load(reposfile);
> Entries entries = Entries.Load(dir);
> Entry entry = entries[vpath];
> folder.Entries.Add(pathdir, entry);
> wd.Folders.Add(pathdir, folder);
> //Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
> cnx = new CVSServerConnection(wd);
> cnx.Connect(wd, userpass);
> RegisterListenEvents(cnx);
> UpdateCommand2 cmd = new UpdateCommand2(wd);
> cmd.Execute(cnx);
>
>It crashes on UpdateCommand2.Execute():
>workingDirectory.FoldersToUpdate is NULL and so i get a
>nullreferenceexception...
>Do you know how i must proceed ?
>
>Thomas
>
>Clayton Harbour wrote:
>
>
>
>>Hi Thomas, just checking back in if you are still having an issue with this. I have been looking at the error message below and it looks like the Repository folder may have an extra empty line near the end. I added a trim on December 3rd that might take care if this if you could try it again.
>>
>>Cheers,
>>
>>Clayton
>>
>>
>>-----Original Message-----
>>From: Thomas Guillemin [mailto:tg...@ja...]
>>Sent: Mon 12/6/2004 7:43 AM
>>To: Clayton Harbour
>>Cc: sha...@li...
>>Subject: Re: [Sharpcvslib-users] Simple question
>>i'm using the lib, updated last week (i'm waiting for sourceforge to be
>>up again and i'll update then), so no cvs.exe, and the server is a cvsnt
>>on windows xp, :pserver:.
>>I was only listening to response events, not the request ones. I have
>>added it, and here is what i get from my TextBox now:
>>REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry
>>Updated Created Merged Mod-time Removed Set-static-directory
>>Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
>> --> []
>>REQUEST: [valid-requests]
>> --> []
>>RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot
>>Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified
>>Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8
>>Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions
>>Set Rename VirtualRepository expand-modules ci co chown setowner setperm
>>chacl setacl lsacl passwd info update diff log rlog add remove
>>update-patches status ls rdiff tag rtag import admin export history
>>release watch-on watch-off watch-add watch-remove watchers editors init
>>annotate rannotate noop version Rootless-stream-modification
>>Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate
>>Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore
>>read-cvswrappers Error-If-Reader Valid-RcsOptions
>>- ( 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 /Index.xml/1.6/Mon Dec 6 16:32:25 2004+Fri Dec 3
>>12:03:15 2004//T1.6]
>> --> []
>>REQUEST: [Modified Index.xml]
>> --> [u=rw,g=rw,o=rw]
>> --> []
>>REQUEST: [Directory .]
>> --> [/CVSRep/Test
>>]
>> --> []
>> --> []
>>REQUEST: [Argument Index.xml]
>> --> []
>>REQUEST: [ci]
>> --> []
>>ERROR: cvs server: M unrecognized request `'
>>
>>does that put some light on the scene ?
>>
>>Clayton Harbour wrote:
>>
>>
>>
>>
>>
>>>Which version of the client are you using Thomas? Also which version
>>>of server are you connecting to? If you are using the code from cvs
>>>could you do an update, sometimes it takes a while for sourceforge's
>>>development cvs server to replicate to the anonymous server. Also
>>>verify that you are handling the following events:
>>> serverConn.RequestMessageEvent +=
>>> new MessageEventHandler(Writer.WriteLine);
>>> serverConn.ResponseMessageEvent +=
>>> new MessageEventHandler(Writer.WriteLine);
>>>
>>>This will print out all requests and responses. What I am suspecting
>>>is that there is a CaseRequest being sent that the server does not
>>>like...at least that was an issue I came across l week. Let me know
>>>what you find out.
>>>
>>>
>>>Cheers,
>>>
>>>Clayton
>>>
>>> -----Original Message-----
>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>> *Sent:* December 6, 2004 1:53 AM
>>> *To:* Clayton Harbour
>>> *Cc:* sha...@li...
>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>
>>> hm, it behaves exactly the same with this line instead.
>>> and i still get [cvs server: M unrecognized request `'] in the end...
>>>
>>> Clayton Harbour wrote:
>>>
>>>
>>>
>>>
>>>
>>>> Hi Thomas,
>>>>
>>>> I think this line:
>>>> FileInfo file = new FileInfo(pathdir + \\CVS <file://%5C%5CCVS>);
>>>> should be:
>>>> DirectoryInfo dir = new DirectoryInfo(Path.Combine(pathdir,
>>>> "CVS");
>>>>
>>>> I am surprised that you don't get an error when you do an
>>>> Entries entries = Entries.Load(file);
>>>>
>>>> There is no CvsFileNotFoundException being thrown? Are you sure
>>>> you are not trapping this error silently?
>>>>
>>>>
>>>> -----Original Message-----
>>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>>> *Sent:* December 2, 2004 8:12 AM
>>>> *To:* Clayton Harbour
>>>> *Cc:* sha...@li...
>>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>>
>>>> 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
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>-------------------------------------------------------
>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
>
>
>
|
|
From: Clayton H. <cla...@sp...> - 2004-12-09 15:27:57
|
Hi Thomas,
Yeah, that is a bit of ugliness. The whole Folders/ FoldersToUpdate =
needs to be reworked actually. The basic idea was to store an entire =
list of the CVS Entries Folders in the Folders property and then filter =
that and put it in the FoldersToUpdate property. I have filed a bug on =
this (1082194) and the simple solution will probably be to just make the =
two properties equal if there are no issues anywhere else in the =
library. =20
In the meantime though if you populate the FoldersToUpdate Property =
instead that should fix your issue.
I have also added a check to see if the FoldersToUpdate is null and if =
so the method just returns which is better than the NullPointer.
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Thu 12/9/2004 3:42 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
hi hi
thanks for that you're great clayton, now my committing function seems=20
to work fine.
Now i'm still having problems with my update function, which begins with =
the update of one file (still the index.xml):
if (File.Exists(IndexPath))
{
string pathdir =3D vpath.Substring(0,=20
IndexPath.LastIndexOf("\\"));
string wdirname =3D pathdir.Substring(0,=20
pathdir.LastIndexOf("\\"));
string reldirname =3D=20
pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -=20
pathdir.LastIndexOf("\\")-1);
// We update the index file to the desired revision
// (the last one by default)
wd =3D new WorkingDirectory(cvsroot, wdirname, =
reldirname);
if (Revision !=3D "" && Revision !=3D "Last Version")
{
wd.Revision =3D Revision;
}
DirectoryInfo dir =3D new=20
DirectoryInfo(Path.Combine(pathdir, "CVS"));
FileInfo reposfile =3D new FileInfo(pathdir +=20
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(dir);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
//Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
RegisterListenEvents(cnx);
UpdateCommand2 cmd =3D new UpdateCommand2(wd);
cmd.Execute(cnx);
It crashes on UpdateCommand2.Execute(): =20
workingDirectory.FoldersToUpdate is NULL and so i get a=20
nullreferenceexception...
Do you know how i must proceed ?
Thomas
Clayton Harbour wrote:
>Hi Thomas, just checking back in if you are still having an issue with =
this. I have been looking at the error message below and it looks like =
the Repository folder may have an extra empty line near the end. I =
added a trim on December 3rd that might take care if this if you could =
try it again.
>
>Cheers,
>
>Clayton
>
>
>-----Original Message-----
>From: Thomas Guillemin [mailto:tg...@ja...]
>Sent: Mon 12/6/2004 7:43 AM
>To: Clayton Harbour
>Cc: sha...@li...
>Subject: Re: [Sharpcvslib-users] Simple question
>i'm using the lib, updated last week (i'm waiting for sourceforge to be =
>up again and i'll update then), so no cvs.exe, and the server is a =
cvsnt=20
>on windows xp, :pserver:.
>I was only listening to response events, not the request ones. I have=20
>added it, and here is what i get from my TextBox now:
>REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry=20
>Updated Created Merged Mod-time Removed Set-static-directory=20
>Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
> --> []
>REQUEST: [valid-requests]
> --> []
>RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot=20
>Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified=20
>Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8=20
>Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions=20
>Set Rename VirtualRepository expand-modules ci co chown setowner =
setperm=20
>chacl setacl lsacl passwd info update diff log rlog add remove=20
>update-patches status ls rdiff tag rtag import admin export history=20
>release watch-on watch-off watch-add watch-remove watchers editors init =
>annotate rannotate noop version Rootless-stream-modification=20
>Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate=20
>Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore=20
>read-cvswrappers Error-If-Reader Valid-RcsOptions
> - ( 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 /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 unrecognized request `'
>
>does that put some light on the scene ?
>
>Clayton Harbour wrote:
>
> =20
>
>>Which version of the client are you using Thomas? Also which version=20
>>of server are you connecting to? If you are using the code from cvs=20
>>could you do an update, sometimes it takes a while for sourceforge's=20
>>development cvs server to replicate to the anonymous server. Also=20
>>verify that you are handling the following events:
>> serverConn.RequestMessageEvent +=3D
>> new MessageEventHandler(Writer.WriteLine);
>> serverConn.ResponseMessageEvent +=3D
>> new MessageEventHandler(Writer.WriteLine);
>>=20
>>This will print out all requests and responses. What I am suspecting=20
>>is that there is a CaseRequest being sent that the server does not=20
>>like...at least that was an issue I came across l week. Let me know=20
>>what you find out.
>>=20
>>=20
>>Cheers,
>>=20
>>Clayton
>>
>> -----Original Message-----
>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>> *Sent:* December 6, 2004 1:53 AM
>> *To:* Clayton Harbour
>> *Cc:* sha...@li...
>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>
>> hm, it behaves exactly the same with this line instead.
>> and i still get [cvs server: M unrecognized request `'] in the =
end...
>>
>> Clayton Harbour wrote:
>>
>> =20
>>
>>> Hi Thomas,
>>> =20
>>> I think this line:
>>> FileInfo file =3D new FileInfo(pathdir + \\CVS =
<file://%5C%5CCVS>);
>>> should be:
>>> DirectoryInfo dir =3D new DirectoryInfo(Path.Combine(pathdir,
>>> "CVS");
>>> =20
>>> I am surprised that you don't get an error when you do an
>>> Entries entries =3D Entries.Load(file);
>>> =20
>>> There is no CvsFileNotFoundException being thrown? Are you sure
>>> you are not trapping this error silently?
>>> =20
>>>
>>> -----Original Message-----
>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>> *Sent:* December 2, 2004 8:12 AM
>>> *To:* Clayton Harbour
>>> *Cc:* sha...@li...
>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>
>>> mh i'm not sure to understand...
>>> here is my code:
>>>
>>> (...stuff...)
>>> wd =3D new WorkingDirectory(CVSRoot, wdirname, reldirname);
>>> cnx =3D 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 =3D new FileInfo(pathdir + =
"\\CVS");
>>> FileInfo reposfile =3D new FileInfo(pathdir +
>>> "\\CVS\\Repository");
>>> Folder folder =3D new Folder();
>>> folder.Repository =3D =
Repository.Load(reposfile);
>>> Entries entries =3D Entries.Load(file);
>>> Entry entry =3D entries[vpath];
>>> folder.Entries.Add(pathdir, entry);
>>> wd.Folders.Add(pathdir, folder);
>>> cnx =3D new CVSServerConnection(wd);
>>> cnx.Connect(wd, userpass);
>>> CommitCommand2 cmd2 =3D 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:
>>>
>>> =20
>>>
>>>>Hi Thomas,
>>>>
>>>>The code would look something like this:
>>>> Folder folder =3D new Folder();
>>>> Entries entries =3D new Entries.Load(file);
>>>> Entry entry =3D 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
>>>>
>>>>=20
>>>>
>>>> =20
>>>>
>>>>>-----Original Message-----
>>>>>From: Thomas Guillemin [mailto:tg...@ja...]=20
>>>>>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=20
>>>>>one file ?=20
>>>>>(with UpdateCommand2/CommitCommand2)
>>>>>Thanks
>>>>>
>>>>>Thomas
>>>>>
>>>>>
>>>>>-------------------------------------------------------
>>>>>SF email is sponsored by - The IT Product Guide
>>>>>Read honest & candid reviews on hundreds of IT Products from=20
>>>>>real users. Discover which products truly live up to the=20
>>>>>hype. Start reading now.=20
>>>>>http://productguide.itmanagersjournal.com/
>>>>>_______________________________________________
>>>>>Sharpcvslib-users mailing list =
Sha...@li...
>>>>>https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
>>>>>
>>>>> =20
>>>>>
>>>>> =20
>>>>>
>>>>-------------------------------------------------------
>>>>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.=20
>>>>http://productguide.itmanagersjournal.com/
>>>>_______________________________________________
>>>>Sharpcvslib-users mailing list
>>>>Sha...@li...
>>>>https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
>>>>
>>>>=20
>>>>
>>>> =20
>>>>
>
>
>
>
> =20
>
|
|
From: Thomas G. <tg...@ja...> - 2004-12-09 11:45:00
|
hi hi
thanks for that you're great clayton, now my committing function seems
to work fine.
Now i'm still having problems with my update function, which begins with
the update of one file (still the index.xml):
if (File.Exists(IndexPath))
{
string pathdir = vpath.Substring(0,
IndexPath.LastIndexOf("\\"));
string wdirname = pathdir.Substring(0,
pathdir.LastIndexOf("\\"));
string reldirname =
pathdir.Substring(pathdir.LastIndexOf("\\")+1, pathdir.Length -
pathdir.LastIndexOf("\\")-1);
// We update the index file to the desired revision
// (the last one by default)
wd = new WorkingDirectory(cvsroot, wdirname, reldirname);
if (Revision != "" && Revision != "Last Version")
{
wd.Revision = Revision;
}
DirectoryInfo dir = new
DirectoryInfo(Path.Combine(pathdir, "CVS"));
FileInfo reposfile = new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder = new Folder();
folder.Repository = Repository.Load(reposfile);
Entries entries = Entries.Load(dir);
Entry entry = entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
//Debug.WriteLine(wd.FoldersToUpdate.Length.ToString());
cnx = new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
RegisterListenEvents(cnx);
UpdateCommand2 cmd = new UpdateCommand2(wd);
cmd.Execute(cnx);
It crashes on UpdateCommand2.Execute():
workingDirectory.FoldersToUpdate is NULL and so i get a
nullreferenceexception...
Do you know how i must proceed ?
Thomas
Clayton Harbour wrote:
>Hi Thomas, just checking back in if you are still having an issue with this. I have been looking at the error message below and it looks like the Repository folder may have an extra empty line near the end. I added a trim on December 3rd that might take care if this if you could try it again.
>
>Cheers,
>
>Clayton
>
>
>-----Original Message-----
>From: Thomas Guillemin [mailto:tg...@ja...]
>Sent: Mon 12/6/2004 7:43 AM
>To: Clayton Harbour
>Cc: sha...@li...
>Subject: Re: [Sharpcvslib-users] Simple question
>i'm using the lib, updated last week (i'm waiting for sourceforge to be
>up again and i'll update then), so no cvs.exe, and the server is a cvsnt
>on windows xp, :pserver:.
>I was only listening to response events, not the request ones. I have
>added it, and here is what i get from my TextBox now:
>REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry
>Updated Created Merged Mod-time Removed Set-static-directory
>Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
> --> []
>REQUEST: [valid-requests]
> --> []
>RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot
>Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified
>Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8
>Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions
>Set Rename VirtualRepository expand-modules ci co chown setowner setperm
>chacl setacl lsacl passwd info update diff log rlog add remove
>update-patches status ls rdiff tag rtag import admin export history
>release watch-on watch-off watch-add watch-remove watchers editors init
>annotate rannotate noop version Rootless-stream-modification
>Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate
>Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore
>read-cvswrappers Error-If-Reader Valid-RcsOptions
> - ( 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 /Index.xml/1.6/Mon Dec 6 16:32:25 2004+Fri Dec 3
>12:03:15 2004//T1.6]
> --> []
>REQUEST: [Modified Index.xml]
> --> [u=rw,g=rw,o=rw]
> --> []
>REQUEST: [Directory .]
> --> [/CVSRep/Test
>]
> --> []
> --> []
>REQUEST: [Argument Index.xml]
> --> []
>REQUEST: [ci]
> --> []
>ERROR: cvs server: M unrecognized request `'
>
>does that put some light on the scene ?
>
>Clayton Harbour wrote:
>
>
>
>>Which version of the client are you using Thomas? Also which version
>>of server are you connecting to? If you are using the code from cvs
>>could you do an update, sometimes it takes a while for sourceforge's
>>development cvs server to replicate to the anonymous server. Also
>>verify that you are handling the following events:
>> serverConn.RequestMessageEvent +=
>> new MessageEventHandler(Writer.WriteLine);
>> serverConn.ResponseMessageEvent +=
>> new MessageEventHandler(Writer.WriteLine);
>>
>>This will print out all requests and responses. What I am suspecting
>>is that there is a CaseRequest being sent that the server does not
>>like...at least that was an issue I came across l week. Let me know
>>what you find out.
>>
>>
>>Cheers,
>>
>>Clayton
>>
>> -----Original Message-----
>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>> *Sent:* December 6, 2004 1:53 AM
>> *To:* Clayton Harbour
>> *Cc:* sha...@li...
>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>
>> hm, it behaves exactly the same with this line instead.
>> and i still get [cvs server: M unrecognized request `'] in the end...
>>
>> Clayton Harbour wrote:
>>
>>
>>
>>> Hi Thomas,
>>>
>>> I think this line:
>>> FileInfo file = new FileInfo(pathdir + \\CVS <file://%5C%5CCVS>);
>>> should be:
>>> DirectoryInfo dir = new DirectoryInfo(Path.Combine(pathdir,
>>> "CVS");
>>>
>>> I am surprised that you don't get an error when you do an
>>> Entries entries = Entries.Load(file);
>>>
>>> There is no CvsFileNotFoundException being thrown? Are you sure
>>> you are not trapping this error silently?
>>>
>>>
>>> -----Original Message-----
>>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>>> *Sent:* December 2, 2004 8:12 AM
>>> *To:* Clayton Harbour
>>> *Cc:* sha...@li...
>>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>>
>>> 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
>>>>
>>>>
>>>>
>>>>
>>>>
>
>
>
>
>
>
|
|
From: Clayton H. <cla...@sp...> - 2004-12-09 06:24:52
|
Hi Thomas, just checking back in if you are still having an issue with =
this. I have been looking at the error message below and it looks like =
the Repository folder may have an extra empty line near the end. I =
added a trim on December 3rd that might take care if this if you could =
try it again.
Cheers,
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]
Sent: Mon 12/6/2004 7:43 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
i'm using the lib, updated last week (i'm waiting for sourceforge to be=20
up again and i'll update then), so no cvs.exe, and the server is a cvsnt =
on windows xp, :pserver:.
I was only listening to response events, not the request ones. I have=20
added it, and here is what i get from my TextBox now:
REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry=20
Updated Created Merged Mod-time Removed Set-static-directory=20
Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
--> []
REQUEST: [valid-requests]
--> []
RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot=20
Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified=20
Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8=20
Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions=20
Set Rename VirtualRepository expand-modules ci co chown setowner setperm =
chacl setacl lsacl passwd info update diff log rlog add remove=20
update-patches status ls rdiff tag rtag import admin export history=20
release watch-on watch-off watch-add watch-remove watchers editors init=20
annotate rannotate noop version Rootless-stream-modification=20
Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate=20
Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore=20
read-cvswrappers Error-If-Reader Valid-RcsOptions
- ( 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 /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 unrecognized request `'
does that put some light on the scene ?
Clayton Harbour wrote:
> Which version of the client are you using Thomas? Also which version=20
> of server are you connecting to? If you are using the code from cvs=20
> could you do an update, sometimes it takes a while for sourceforge's=20
> development cvs server to replicate to the anonymous server. Also=20
> verify that you are handling the following events:
> serverConn.RequestMessageEvent +=3D
> new MessageEventHandler(Writer.WriteLine);
> serverConn.ResponseMessageEvent +=3D
> new MessageEventHandler(Writer.WriteLine);
> =20
> This will print out all requests and responses. What I am suspecting=20
> is that there is a CaseRequest being sent that the server does not=20
> like...at least that was an issue I came across l week. Let me know=20
> what you find out.
> =20
> =20
> Cheers,
> =20
> Clayton
>
> -----Original Message-----
> *From:* Thomas Guillemin [mailto:tg...@ja...]
> *Sent:* December 6, 2004 1:53 AM
> *To:* Clayton Harbour
> *Cc:* sha...@li...
> *Subject:* Re: [Sharpcvslib-users] Simple question
>
> hm, it behaves exactly the same with this line instead.
> and i still get [cvs server: M unrecognized request `'] in the =
end...
>
> Clayton Harbour wrote:
>
>> Hi Thomas,
>> =20
>> I think this line:
>> FileInfo file =3D new FileInfo(pathdir + \\CVS =
<file://%5C%5CCVS>);
>> should be:
>> DirectoryInfo dir =3D new DirectoryInfo(Path.Combine(pathdir,
>> "CVS");
>> =20
>> I am surprised that you don't get an error when you do an
>> Entries entries =3D Entries.Load(file);
>> =20
>> There is no CvsFileNotFoundException being thrown? Are you sure
>> you are not trapping this error silently?
>> =20
>>
>> -----Original Message-----
>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>> *Sent:* December 2, 2004 8:12 AM
>> *To:* Clayton Harbour
>> *Cc:* sha...@li...
>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>
>> mh i'm not sure to understand...
>> here is my code:
>>
>> (...stuff...)
>> wd =3D new WorkingDirectory(CVSRoot, wdirname, reldirname);
>> cnx =3D 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 =3D new FileInfo(pathdir + =
"\\CVS");
>> FileInfo reposfile =3D new FileInfo(pathdir +
>> "\\CVS\\Repository");
>> Folder folder =3D new Folder();
>> folder.Repository =3D =
Repository.Load(reposfile);
>> Entries entries =3D Entries.Load(file);
>> Entry entry =3D entries[vpath];
>> folder.Entries.Add(pathdir, entry);
>> wd.Folders.Add(pathdir, folder);
>> cnx =3D new CVSServerConnection(wd);
>> cnx.Connect(wd, userpass);
>> CommitCommand2 cmd2 =3D 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 =3D new Folder();
>>> Entries entries =3D new Entries.Load(file);
>>> Entry entry =3D 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
>>>
>>> =20
>>>
>>>>-----Original Message-----
>>>>From: Thomas Guillemin [mailto:tg...@ja...]=20
>>>>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=20
>>>>one file ?=20
>>>>(with UpdateCommand2/CommitCommand2)
>>>>Thanks
>>>>
>>>>Thomas
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>SF email is sponsored by - The IT Product Guide
>>>>Read honest & candid reviews on hundreds of IT Products from=20
>>>>real users. Discover which products truly live up to the=20
>>>>hype. Start reading now.=20
>>>>http://productguide.itmanagersjournal.com/
>>>>_______________________________________________
>>>>Sharpcvslib-users mailing list =
Sha...@li...
>>>>https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
>>>>
>>>> =20
>>>>
>>>
>>>
>>>-------------------------------------------------------
>>>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
>>>
>>> =20
>>>
|
|
From: Thomas G. <tg...@ja...> - 2004-12-06 15:44:52
|
i'm using the lib, updated last week (i'm waiting for sourceforge to be
up again and i'll update then), so no cvs.exe, and the server is a cvsnt
on windows xp, :pserver:.
I was only listening to response events, not the request ones. I have
added it, and here is what i get from my TextBox now:
REQUEST: [Valid-responses ok error Valid-requests Checked-in New-entry
Updated Created Merged Mod-time Removed Set-static-directory
Clear-static-directory Set-sticky Clear-sticky Module-expansion M E MT]
--> []
REQUEST: [valid-requests]
--> []
RESPONSE: Root Valid-responses valid-requests Directory Max-dotdot
Static-directory Sticky Entry EntryExtra Kopt Checkin-time Modified
Is-modified UseUnchanged Unchanged Notify NotifyUser Questionable Utf8
Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions
Set Rename VirtualRepository expand-modules ci co chown setowner setperm
chacl setacl lsacl passwd info update diff log rlog add remove
update-patches status ls rdiff tag rtag import admin export history
release watch-on watch-off watch-add watch-remove watchers editors init
annotate rannotate noop version Rootless-stream-modification
Kerberos-encrypt Gssapi-encrypt Protocol-encrypt Gssapi-authenticate
Protocol-authenticate read-cvsrc read-cvsrc2 read-cvsignore
read-cvswrappers Error-If-Reader Valid-RcsOptions
- ( 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 /Index.xml/1.6/Mon Dec 6 16:32:25 2004+Fri Dec 3
12:03:15 2004//T1.6]
--> []
REQUEST: [Modified Index.xml]
--> [u=rw,g=rw,o=rw]
--> []
REQUEST: [Directory .]
--> [/CVSRep/Test
]
--> []
--> []
REQUEST: [Argument Index.xml]
--> []
REQUEST: [ci]
--> []
ERROR: cvs server: M unrecognized request `'
does that put some light on the scene ?
Clayton Harbour wrote:
> Which version of the client are you using Thomas? Also which version
> of server are you connecting to? If you are using the code from cvs
> could you do an update, sometimes it takes a while for sourceforge's
> development cvs server to replicate to the anonymous server. Also
> verify that you are handling the following events:
> serverConn.RequestMessageEvent +=
> new MessageEventHandler(Writer.WriteLine);
> serverConn.ResponseMessageEvent +=
> new MessageEventHandler(Writer.WriteLine);
>
> This will print out all requests and responses. What I am suspecting
> is that there is a CaseRequest being sent that the server does not
> like...at least that was an issue I came across l week. Let me know
> what you find out.
>
>
> Cheers,
>
> Clayton
>
> -----Original Message-----
> *From:* Thomas Guillemin [mailto:tg...@ja...]
> *Sent:* December 6, 2004 1:53 AM
> *To:* Clayton Harbour
> *Cc:* sha...@li...
> *Subject:* Re: [Sharpcvslib-users] Simple question
>
> hm, it behaves exactly the same with this line instead.
> and i still get [cvs server: M unrecognized request `'] in the end...
>
> Clayton Harbour wrote:
>
>> Hi Thomas,
>>
>> I think this line:
>> FileInfo file = new FileInfo(pathdir + \\CVS <file://%5C%5CCVS>);
>> should be:
>> DirectoryInfo dir = new DirectoryInfo(Path.Combine(pathdir,
>> "CVS");
>>
>> I am surprised that you don't get an error when you do an
>> Entries entries = Entries.Load(file);
>>
>> There is no CvsFileNotFoundException being thrown? Are you sure
>> you are not trapping this error silently?
>>
>>
>> -----Original Message-----
>> *From:* Thomas Guillemin [mailto:tg...@ja...]
>> *Sent:* December 2, 2004 8:12 AM
>> *To:* Clayton Harbour
>> *Cc:* sha...@li...
>> *Subject:* Re: [Sharpcvslib-users] Simple question
>>
>> 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
>>>
>>>
>>>
|
|
From: Clayton H. <cla...@sp...> - 2004-12-06 14:48:40
|
Which version of the client are you using Thomas? Also which version of
server are you connecting to? If you are using the code from cvs could
you do an update, sometimes it takes a while for sourceforge's
development cvs server to replicate to the anonymous server. Also
verify that you are handling the following events:
serverConn.RequestMessageEvent +=3D=20
new MessageEventHandler(Writer.WriteLine);
serverConn.ResponseMessageEvent +=3D=20
new MessageEventHandler(Writer.WriteLine);
=20
This will print out all requests and responses. What I am suspecting is
that there is a CaseRequest being sent that the server does not
like...at least that was an issue I came across l week. Let me know
what you find out.
=20
=20
Cheers,
=20
Clayton
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 6, 2004 1:53 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
hm, it behaves exactly the same with this line instead.
and i still get [cvs server: M unrecognized request `'] in the end...
Clayton Harbour wrote:
Hi Thomas,
=20
I think this line:
FileInfo file =3D new FileInfo(pathdir + \\CVS <file://%5C%5CCVS> );
should be:
DirectoryInfo dir =3D new DirectoryInfo(Path.Combine(pathdir, =
"CVS");
=20
I am surprised that you don't get an error when you do an
Entries entries =3D Entries.Load(file);
=20
There is no CvsFileNotFoundException being thrown? Are you sure you are
not trapping this error silently?
=20
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 2, 2004 8:12 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
mh i'm not sure to understand...
here is my code:
(...stuff...)
wd =3D new WorkingDirectory(CVSRoot, wdirname, reldirname);
cnx =3D 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 =3D new FileInfo(pathdir + "\\CVS");
FileInfo reposfile =3D new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(file);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 =3D 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:=20
Hi Thomas,
The code would look something like this:
Folder folder =3D new Folder();
Entries entries =3D new Entries.Load(file);
Entry entry =3D 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
=20
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
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=20
one file ?=20
(with UpdateCommand2/CommitCommand2)
Thanks
Thomas
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from=20
real users. Discover which products truly live up to the=20
hype. Start reading now.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list
Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
|
|
From: Thomas G. <tg...@ja...> - 2004-12-06 09:55:28
|
hm, it behaves exactly the same with this line instead. and i still get [cvs server: M unrecognized request `'] in the end... Clayton Harbour wrote: > Hi Thomas, > > I think this line: > FileInfo file = new FileInfo(pathdir + \\CVS <file://%5C%5CCVS>); > should be: > DirectoryInfo dir = new DirectoryInfo(Path.Combine(pathdir, "CVS"); > > I am surprised that you don't get an error when you do an > Entries entries = Entries.Load(file); > > There is no CvsFileNotFoundException being thrown? Are you sure you > are not trapping this error silently? > > > -----Original Message----- > *From:* Thomas Guillemin [mailto:tg...@ja...] > *Sent:* December 2, 2004 8:12 AM > *To:* Clayton Harbour > *Cc:* sha...@li... > *Subject:* Re: [Sharpcvslib-users] Simple question > > 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 >> >> >> |
|
From: Clayton H. <cla...@sp...> - 2004-12-03 14:52:07
|
Hi Thomas,
=20
I think this line:
FileInfo file =3D new FileInfo(pathdir + \\CVS);
should be:
DirectoryInfo dir =3D new DirectoryInfo(Path.Combine(pathdir, =
"CVS");
=20
I am surprised that you don't get an error when you do an
Entries entries =3D Entries.Load(file);
=20
There is no CvsFileNotFoundException being thrown? Are you sure you are
not trapping this error silently?
=20
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
Sent: December 2, 2004 8:12 AM
To: Clayton Harbour
Cc: sha...@li...
Subject: Re: [Sharpcvslib-users] Simple question
mh i'm not sure to understand...
here is my code:
(...stuff...)
wd =3D new WorkingDirectory(CVSRoot, wdirname, reldirname);
cnx =3D 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 =3D new FileInfo(pathdir + "\\CVS");
FileInfo reposfile =3D new FileInfo(pathdir +
"\\CVS\\Repository");
Folder folder =3D new Folder();
folder.Repository =3D Repository.Load(reposfile);
Entries entries =3D Entries.Load(file);
Entry entry =3D entries[vpath];
folder.Entries.Add(pathdir, entry);
wd.Folders.Add(pathdir, folder);
cnx =3D new CVSServerConnection(wd);
cnx.Connect(wd, userpass);
CommitCommand2 cmd2 =3D 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:=20
Hi Thomas,
The code would look something like this:
Folder folder =3D new Folder();
Entries entries =3D new Entries.Load(file);
Entry entry =3D 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
=20
-----Original Message-----
From: Thomas Guillemin [mailto:tg...@ja...]=20
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=20
one file ?=20
(with UpdateCommand2/CommitCommand2)
Thanks
Thomas
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from=20
real users. Discover which products truly live up to the=20
hype. Start reading now.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
-------------------------------------------------------
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.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Sharpcvslib-users mailing list
Sha...@li...
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users
=20
|
|
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
>
>
>
|
|
From: Clayton H. <cla...@sp...> - 2004-12-02 15:12:57
|
Hi Thomas, The code would look something like this: Folder folder =3D new Folder(); Entries entries =3D new Entries.Load(file); Entry entry =3D 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...]=20 > Sent: December 2, 2004 5:45 AM > To: sha...@li... > Subject: [Sharpcvslib-users] Simple question >=20 >=20 > Hi > Can someone show me how i must proceed to update/commit only=20 > one file ?=20 > (with UpdateCommand2/CommitCommand2) > Thanks >=20 > Thomas >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from=20 > real users. Discover which products truly live up to the=20 > hype. Start reading now.=20 > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Sharpcvslib-users mailing list Sha...@li... > https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users >=20 |
|
From: Thomas G. <tg...@ja...> - 2004-12-02 13:46:49
|
Hi Can someone show me how i must proceed to update/commit only one file ? (with UpdateCommand2/CommitCommand2) Thanks Thomas |
|
From: Clayton H. <cla...@sp...> - 2004-10-01 15:29:29
|
=20 |