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:
Message
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@jacqueson.net]
Sent: December 13, 2004 10:18 AM
To: Clayton Harbour
Cc: sharpcvslib-users@lists.sourceforge.net
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@jacqueson.net]
Sent: December 13, 2004 2:32 AM
To: Clayton Harbour
Cc: sharpcvslib-users@lists.sourceforge.net
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@jacqueson.net]
Sent: December 9, 2004 7:43 AM
To: Clayton Harbour
Cc: sharpcvslib-users@lists.sourceforge.net
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@jacqueson.net]
Sent:	Thu 12/9/2004 3:42 AM
To:	Clayton Harbour
Cc:	sharpcvslib-users@lists.sourceforge.net
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@jacqueson.net]
Sent:	Mon 12/6/2004 7:43 AM
To:	Clayton Harbour
Cc:	sharpcvslib-users@lists.sourceforge.net
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@jacqueson.net]
   *Sent:* December 6, 2004 1:53 AM
   *To:* Clayton Harbour
   *Cc:* sharpcvslib-users@lists.sourceforge.net
   *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@jacqueson.net]
       *Sent:* December 2, 2004 8:12 AM
       *To:* Clayton Harbour
       *Cc:* sharpcvslib-users@lists.sourceforge.net
       *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@jacqueson.net] 
Sent: December 2, 2004 5:45 AM
To: sharpcvslib-users@lists.sourceforge.net
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 Sharpcvslib-users@lists.sourceforge.net
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
Sharpcvslib-users@lists.sourceforge.net
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
Sharpcvslib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpcvslib-users