MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why does mathematica randomly rewrite notebooks?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54879] Re: [mg54838] Why does mathematica randomly rewrite notebooks?
  • From: jmt <jmt at dxdydz.net>
  • Date: Sat, 5 Mar 2005 01:34:24 -0500 (EST)
  • References: <200503041007.FAA12985@smc.vnet.net>
  • Reply-to: jmt at dxdydz.net
  • Sender: owner-wri-mathgroup at wolfram.com

A few remarks :

1 - CVS is line oriented, and lines MUST be less than 80 characters long, 
while Mathematica notebooks make no assumptions on line length. This might 
explain the changes you have noticed.

2 - Mathematica uses a cache, handling this cache in a versioning system can 
be viewed as non-sense. The company "Analog Insydes" discusses this point and 
provides a set of utilities for handling notebooks with CVS : 
http://www.analog-insydes.de/ai/utilities/
I have used these utilities up to version 5.0 without trouble of any kind.

3 - When notebooks contain some information that can be modified by the 
versioning system, the FrontEnd will report a warning. If this warning can 
oftenly be ignored, users might nevertheless have some doubt about the 
versioning strategy, and there is no way to avoid this with CVS.

4 - After using CVS for some years, I switched to subversion. This system is 
much more adequate for revision control than CVS is, especially for files 
like mathematica notebooks. I do not modify the notebooks before storing them 
in the repository (meaning I do NOT strip the cache off, even if this can be 
viewed as a loss of disk resource), because disk space is no longer a problem 
and because Mathematica projects seldom span over hundreds of files. If I 
have no experience in migrating a project from CVS to subversion, all new 
projects are now handled by subversion.

jmt


On 2005 03 04 11:07, Josef Karthauser wrote:
  > I'm trying to manage mathematica notebooks in a revision control system
  > and it is really bugging me that mathematica writes notebooks with
  > trivial changes seemingly randomly.  Does anyone know why?
  >
  > Here's an example:
  >
  > @@ -860,7 +862,7 @@
  >      \(Tuu[i, j] Xd[j] // ToFlavor[natbasis]\), "\n",
  >      \(\(\(% /.
  >        x : Xd[_] \[RuleDelayed] \(TransformIndexFlavor[
  > -            natbasis,
  > {\[Lambda]form}]\)[x]\)\(\n\)\(\[IndentingNewLine]\) +           
  > natbasis, {\[Lambda]form}]\)[x]\)\(\[IndentingNewLine]\)\(\n\) \)
  > (*\[IndentingNewLine]\(% // SumExpansion[natbasis /@ {i, j}]\) //
  > SumExpansion[\[Lambda]form[k]]\[IndentingNewLine]%%\[IndentingNewLine]*)
  > \), "\
  >
  > The line starting with '-' shows what was there, and the line starting
  > with '+' shows that change that mathematica made at the last save.
  >
  > Notice the at the order of the \n and the IndentingNewLine have been
  > reversed.  This appears to happen at random.
  >
  > WRI, is there anything I can do to prevent this, or is it a bug/feature?
  >
  > Joe
  > --
  > Josef Karthauser (joe at tao.org.uk)        http://www.josef-k.net/
  > FreeBSD (cvs meister, admin and hacker)     http://www.uk.FreeBSD.org/
  > Physics Particle Theory (student)   http://www.pact.cpes.sussex.ac.uk/

-- 
Puissance d'un coton-tige : deux ouates ...


  • Prev by Date: Re: Why does mathematica randomly rewrite notebooks?
  • Next by Date: Re: Re: Re: Re: Bug in Import?
  • Previous by thread: Re: Why does mathematica randomly rewrite notebooks?
  • Next by thread: Re: Re: Why does mathematica randomly rewrite notebooks?