[M3devel] LogManager.EmptyLog FS.Status(nm) vs. FS.Status(logfn(nm))

Tony Hosking hosking at cs.purdue.edu
Fri Jan 15 22:20:03 CET 2010


Aha!  Weird!  I'll leave it alone.

On 15 Jan 2010, at 15:53, Jay K wrote:

> I know. But see here from 2001:
>  
> http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-db/stable/src/LogManager.m3.diff?r1=1.1.1.1;r2=1.1.1.2
> 
> 
> Something is wierd here, I agree. I think I somehow had the 1.1.1.2 version (odd), and if you look through all the other uses of TestFile, I think it is more correct.
>  
> It seems some of the 4.1/5.1 changes never made it from a branch to head??
> 
>  - Jay
> 
>  
> > From: hosking at cs.purdue.edu
> > Date: Fri, 15 Jan 2010 10:04:48 -0500
> > To: jkrell at elego.de
> > CC: m3commit at elegosoft.com
> > Subject: Re: [M3commit] CVS Update: cm3
> > 
> > Here's the diff between 1.1 and 1.2, which you committed. You seem to have changed the meaning. I don't understand the change.
> > 
> > *** LogManager.m3.~1.1~ Thu Jan 14 13:56:42 2010
> > --- LogManager.m3.~1.2~ Fri Jan 15 09:59:41 2010
> > ***************
> > *** 236,241 ****
> > --- 236,242 ----
> > 
> > PROCEDURE EmptyLog (lm: Default; nm: Pathname.T): BOOLEAN
> > RAISES {OSError.E} =
> > + VAR log: TEXT;
> > BEGIN
> > IF NOT lm.recoverable(nm) THEN
> > RAISE OSError.E(
> > ***************
> > *** 243,253 ****
> > Atom.FromText(
> > "no checkpointfile for log in " & nm)));
> > END;
> > ! IF TestFile(lm.logfn(nm)) THEN
> > ! RETURN FS.Status(nm).size > 0
> > ! ELSE
> > ! RETURN TRUE
> > ! END;
> > END EmptyLog;
> > 
> > PROCEDURE Dispose (lm: Default; nm: Pathname.T) RAISES {OSError.E} =
> > --- 244,251 ----
> > Atom.FromText(
> > "no checkpointfile for log in " & nm)));
> > END;
> > ! log := lm.logfn(nm);
> > ! RETURN (NOT TestFile(log)) OR (FS.Status(log).size = 0L);
> > END EmptyLog;
> > 
> > PROCEDURE Dispose (lm: Default; nm: Pathname.T) RAISES {OSError.E} =
> > 
> > 
> > On 15 Jan 2010, at 13:03, Jay Krell wrote:
> > 
> > > CVSROOT: /usr/cvs
> > > Changes by: jkrell at birch. 10/01/15 13:03:10
> > > 
> > > Modified files:
> > > cm3/m3-db/stable/src/: LogManager.m3 
> > > 
> > > Log message:
> > > something is broken in the history here: put my version back, there is a semantic difference as to which file path is passed to FS.Status and I didn't invent the 'obfuscated' form, though the history is indeed confusing (did somebody mention that cvs and cvsweb don't work well?)
> > 




More information about the M3devel mailing list