Can Bazaar call external XML diff/patch programs?
David Clymer
david at zettazebra.com
Tue Sep 18 23:15:22 BST 2007
Please remember to include the list in your replies ;o)
On Tue, 2007-09-18 at 10:44 -0700, Rocky Kahn wrote:
> Thanks...Darcs was only temporarily down and I've been exploring it
> since it came back up.
>
> I think Stephen Ward's diff is for viewing changes between revs as
> opposed to generating the diff that gets stored in the revision
> history. I'm interested in calculating the invertable delta myself
> and working with a version control system that will let me use these
> deltas instead of its native, line-based diffs. The academics
> referred to in original email chose darcs because it was easy to
> modify. Might Bazaar be similarly easy? It seems that Bazaar is more
> robustly supported than darcs (more developer postings, etc).
>
> Here's how more "atomic" diffs/patches can avoid unnecessary
> conflicts:
> Let's say the document is XML and each paragraph has its own
> (sometimes very long) line in the file. Two users modify the same
> paragraph in parallel. Since most version control systems use
> line-based diff, these two changes will register as a conflict...even
> though the changes don't overlap and therefore could be merged.
>
> original line: Elephants are white. Cereal is a grain.
> user A's change: Elephants are grey. Cereal is a grain.
> user B's change: Elephants are white. Cereal is for breakfast.
> merged line: Elephants are grey. Cereal is for breakfast.
>
> If instead I calculate a character-based diff, conflicts would occur
> less frequently. This is all assuming that Bazaar uses only the
> standard, line-based diff...does it? Is there anyone in particular
> who would know where the "hooks" in the code are to change out the
> diff/patch routines?
I'm sure there are many here that can answer this better than I.
However, if you want to modify the sequence matching behavior of bazaar,
you could probably modify or replace
bzrlib.patiencediff.PatienceSequenceMatcher
I don't know how hard it would be to provide the functionality you want
while keeping compatibility with the PatienceSquenceMatcher interface
though. If you have to break away from that, it could be fairly
complex.
IANA bazaar expert.
-davidc
--
gpg-key: http://www.zettazebra.com/files/key.gpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070918/09622347/attachment-0001.pgp
More information about the bazaar
mailing list