Greg Hudson <ghudson@MIT.EDU> writes:
> Something I wanted to mention in the commit here (vi exited on me at
> the wrong time) is that the XML editor currently produces very lame
> output for text deltas, because we're still waiting on Branko's work.
> Basically, you'll see:
>
> <text-delta>[vcdiff window]</text-delta>
>
> If push comes to shove, I can make it handle windows with one "insert
> new" instruction and spit out pseudo-vcdiff output like we do in test
> deltas. That might be useful for milestone 1.
I think that's a very good idea. We don't have to support full vcdiff
in all its hairy glory in milestone 1 -- and I doubt we're going to,
as that's the sort of change that tends to need a while to debug after
it's been made.
Supporting a trivial subset of vcdiff, whereby *all* our vcdiffs
consist of one "insert new" instruction, is a good way of getting the
framework up and running... And, of course, we don't lose any ability
to represent changes, we just represent them less efficiently than a
complete vcdiff implementation would.
> I'm also not doing any indentation, because it was significantly
> easier that way. (Though I've thought about how to make indentation
> happen.) Here's the output from my exerciser program, so that people
> can see the resulting ugliness:
Oh, indentation is probably not necessary for the xml delta outputter.
I indent the working copy adm files only because the indentation
levels there are static -- the code knows the depth of every xml form
in advance.
> egyptian-gods% ./xml-output-test
> <?xml version='1.0' encoding='utf-8'?>
> <delta-pkg>
> <tree-delta>
> <replace name='foo'><dir ancestor='aaa' ver='2'>
> <tree-delta>
> <replace name='bar'><file>
> <text-delta>[vcdiff window]</text-delta>
> </file></replace>
> <replace name='baz'><file>
> <prop-delta>
> <set name='bbb'>ccc</set>
> <delete name='aaa'/>
> </prop-delta>
> <text-delta-ref id='1'>
> </file></replace>
> </tree-delta>
> </dir></replace>
> <prop-delta>
> <set name='ccc'>bbb</set>
> </prop-delta>
> </dir>
> <text-delta id='1'></text-delta>
> </delta-pkg>
Looks good. For my taste, a newline before independent closing tags
would be nice, but it's your call.
-K
Received on Sat Oct 21 14:36:10 2006