Odd behaviour in Repository.get_revision_delta()
Jelmer Vernooij
jelmer at samba.org
Mon Oct 17 17:11:04 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/17/2011 06:40 PM, John Meinel wrote:
> Can you describe the circumstances? Is it that we log file foo/bar and
bar was added in rev X, but isn't in rev X-1. Which causes the filter
logic to include foo in X but not X-1?
The filter logic includes 'foo' as added in both X *and* X-1.
Unfiltered, 'foo' appears just as added in X-1 and not in X.
> IMO filter was a hack to try to make bzr log dir faster, which helped a
lot before 2a, but the new data just does it differently. There are bugs
about bzr log dir should be faster, where I've at least done analysis of
ways we could tweak it. (Essentially, we expect the number of entries in
a subdir to be more than the number of entries in each delta, so we
should do delta first, and filter second.)
>
> So, I don't think we are attached to current behaviour.
Cool, I'll see if I can fix that behaviour.
Cheers,
Jelmer
> On Oct 15, 2011 2:29 PM, "Jelmer Vernooij" <jelmer at samba.org> wrote:
>
>
> Repository.get_revision_delta() retrieves a TreeDelta object for a
> revision. It can, if requested filter out only the requested file ids.
>
> The docstring for specific_file_ids says:
>
> :param specific_fileids: if not None, the result is filtered
> so that only those file-ids, their parents and their
> children are included.
>
> However, in terms of actual behaviour this seems to mean that a parent
> can be in delta.added, even if it wasn't changed in the specified revision.
>
> This seems wrong to me, but we do actually have a test that verifies
> this behaviour (bzrlib/tests/per_repository/test_repository.py:297).
>
> Is the test correct, or should it be fixed to expect the parent to show
> up in .unchanged rather than .added?
>
> Cheers,
>
> Jelmer
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJOnGGnAAoJEACAbyvXKaRXDn0P/1C6R9OAVwQdeJTFCPI4PIw9
yQNJEPc60ztoE9jCSPbhuvRr23hNydeJpQnE0Z81EjPP92o32EVTY/MMqloLd3Nq
QcU6Vg8WWW9UMlvzPn+a8DP7QGmuSGeLb9A5mylAiJNn3ycBnc5pOCK6hVsL26Q3
t+YnEtigN0hJvIvZ8ZsE2pmNBb5fw6f2AyCADTf6DWE7iDW2Sl+K6Bh2Kzm+g/Hv
ijuJ6+ecSPkK+wr0k7htBKiwIsKnmSmykxiObow70uMVqWcGhpAnwAtCtvt/b+09
xRDjPf1Nl1CDjzxbgjG1CI94t6ZYoLdYNd5Sdmd52fo2rh+tEF1lJwvY+sfo6za+
qqdUolKfcQ/2vJW4ZBhim3me44CzeSl2Mo06dKscLBGxb6YcH3pwYp+xaBpEROpg
aRN7FACBhBFmNQg5EunzE2D0XD+lrnEvioyvWCy+JraYwGr6nBtVRhI8MXbvo8kk
FBbfPMbStjBCObN7lpnrgzi8X4OdgjFYWqvIXn+xoMqbRVFVXX5HBkQtDtrbmUR1
MVB6XIhzREtNBvYZbtl5a1c4yWycSE4MkYpfVazTufzGJq4OHT4eiSLoIxvqHRFS
ul1lvw26SEWc5nkZ8i9AOy3IC4zXLeq4xy6OwLDUgrNx/Vlfa9Ej9C55IQyJpv2C
6tL4aE4uKjoRLVBWuNh9
=i4Wn
-----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20111017/9667e5d5/attachment.html>
More information about the bazaar
mailing list