[M3devel] Revert cm3 to version 6 days ago

Jay jayk123 at hotmail.com
Mon Feb 25 09:13:50 CET 2008


Here is an unnecessarily complete explanation:
 
The problem was 
 Given "a../..", M3Path.FixPath wasn't doing anything. I wanted to fix that.
   It would collapse "a/.." or ".a/.." or "a./.." correctly, but not "a../.."
   I know people will disagree as to what is "correct" due to symlinks, but this was/is the behavior.
 
Given input like "../.." it should also leave that alone, because "there is nowhere for it to go".
 
In fixing "a../.." to collapse to nothing or ".", I also broke leaving "../.." alone.
 
I thought the check for "is the element prior to ".." also ".."?" wasn't needed, since they get removed, left to right, and the scan is restarted for every change, but they aren't removed if "there is nowhere to go", so the check is valid. But the check wasn't right. It didn't check for a ".." element, it checked for an element ending in "..".
 
NOW it should be treating them both correctly, as well as not indexing out of bounds for other input as it was doing.
I added a check that the previous element is of length 2, and "ends" "..".
 
Yes, I realize that elements ending in ".." but not equal to ".." are rare and not particularly interesting.
Windows even has trouble with them:
 
  C:\>mkdir a..  
  C:\>dir a*    02/25/2008  12:11 AM    <DIR>          a  
  Huh?  
 
  C:\>mkdir \\?\c:\a..  
  C:\>dir a*    02/25/2008  12:11 AM    <DIR>          a   02/25/2008  12:12 AM    <DIR>          a..  
 
  C:\>rmdir a..  
  C:\>dir a*    02/25/2008  12:12 AM    <DIR>          a.. 
 
  Huh? 
 
 - Jay
 



From: jayk123 at hotmail.comTo: wagner at elegosoft.comDate: Sun, 24 Feb 2008 15:58:20 +0000CC: m3devel at elegosoft.comSubject: Re: [M3devel] Revert cm3 to version 6 days ago


Ok, I see:http://modula3.elegosoft.com/cm3/logs/cm3-pkg-report-FreeBSD4.html#tr_m3-db-odbcIt really must be:http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-sys/cm3/src/M3Path.m3.diff?r1=1.14;r2=1.15 The error is  unable to open "/pub/users/m3/work/cm3-ws/new.elego.de-2008-02-24-13-13-31/cm3/m3-db/odbc/test/src/../odbc/FreeBSD4/.M3EXPORTS" but it should be trying to open: "/pub/users/m3/work/cm3-ws/new.elego.de-2008-02-24-13-13-31/cm3/m3-db/odbc/test/src/../../../odbc/FreeBSD4/.M3EXPORTS" or, fixed up:  "/pub/users/m3/work/cm3-ws/new.elego.de-2008-02-24-13-13-31/cm3/m3-db/odbc/FreeBSD4/.M3EXPORTS" My change is making it remove two instances of .. at once or something like that.I still am not reading it fully, but this must be it. Overrides are often/usually "built down" from ROOT, but in this case they are "built up". Anyway I'm off to debug:== package C:\dev2\cm3.2\m3-obliq\obliqrt == +++ ['cm3.exe -build -keep -DROOT=/cygdrive/C/dev2/cm3.2 -DCM3_VERSION_TEXT=d5.6.0 -DCM3_VERSION_NUMBER=050600 -DCM3_LAST_CHANGED=2008-01-31 @M3novm', 'cm3.exe -ship -keep -DROOT=/cygdrive/C/dev2/cm3.2 -DCM3_VERSION_TEXT=d5.6.0 -DCM3_VERSION_NUMBER=050600 -DCM3_LAST_CHANGED=2008-01-31 @M3novm'] +++--- building in NT386GNU ---ignoring ../src/m3overrides/cygdrive/C/cm3/bin/shobjcodegen -o ObValue -p -so ObValue.ReplObjStd -i ObValueRep -T.M3IMPTAB/cygdrive/C/cm3/bin/shobjcodegen: Processing ObValue.ReplObjStd"/cygdrive/C/cm3/pkg/sharedobj/src/sharedobj.tmpl", line 49: quake runtime error: exit 35584: /cygdrive/C/cm3/bin/shobjcodegen -o ObValue -p -so ObValue.ReplObjStd -i ObValueRep -T.M3IMPTAB and I have guests coming soon too. :)  - Jay



> Date: Sun, 24 Feb 2008 16:32:05 +0100> From: wagner at elegosoft.com> To: jayk123 at hotmail.com> CC: m3devel at elegosoft.com> Subject: RE: Revert cm3 to version 6 days ago> > Quoting Jay <jayk123 at hotmail.com>:> > > Oh darn, inevitably that is not my final answer..> > more like attached..> > Jay,> > the files seem to work OK on my FreeBSD system. But the tinderbox> tests on birch and new have failed, in spite of my CVS revert;> so please don't commit anything until I have found out what is wrong.> It may take some time, because I'm expecting guests soon and won't> be able to do much until tomorrow evening.> > Olaf> > > - Jay> >> > From: jayk123 at hotmail.comTo: wagner at elegosoft.comSubject: RE: Revert > > cm3 to version 6 days agoDate: Sun, 24 Feb 2008 14:20:03 +0000> >> >> > Olaf can you try the attached? Thanks, - Jay> -- > Olaf Wagner -- elego Software Solutions GmbH> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95> http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194> 



Helping your favorite cause is as easy as instant messaging. You IM, we give. Learn more. 
_________________________________________________________________
Helping your favorite cause is as easy as instant messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080225/2e98d0b8/attachment-0002.html>


More information about the M3devel mailing list