[RFC] Versioned data, revisited

Jan Hudec bulb at ucw.cz
Thu Feb 9 21:58:31 GMT 2006


On Thu, Feb 09, 2006 at 22:34:40 +0100, Jan Hudec wrote:
> lines could get 'cross-matched'(1), so the annotation of inventory.weave is

The missing footnote:
cross-matched(1): It often happens when you add a some code, that the lines
    diff considers as addition don't coincide with what the addition
    logically is. For example if you have a source that contains:

	int setFoo(int x)
	{
	    foo = x;
	    return x;
	}

    and you change it to:

	int setFoo(int x)
	{
	    foo = x;
	    return x;
	}

	int setBar(int x)
	{
	    bar = x;
	    return x;
	}

    the diff will probably read:

	  int setFoo(int x)
	  {
	      foo = x;
	+     return x;
	+ }
        +
	+ int setBar(int x)
	+ {
	+     bar = x;
	      return x;
	  }

    even though logically it should add the second return and closing brace.
    So the diff crossed the logical units when matching the texts. Same thing
    could happen to inventory, if two entries next to each other contained
    similar properties. Considering weave anotation for each of them
    separately could then lead to bogus results.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060209/b3004c45/attachment.pgp 


More information about the bazaar mailing list