[MERGE] RevisionSpec.as_revision_id()
Lukáš Lalinský
lalinsky at gmail.com
Sat Mar 29 10:56:48 GMT 2008
On So, 2008-03-29 at 12:23 +0200, John Arbash Meinel wrote:
> Aaron Bentley wrote:
> |> === modified file 'bzrlib/branch.py'
> |> --- bzrlib/branch.py 2008-03-14 10:55:37 +0000
> |> +++ bzrlib/branch.py 2008-03-20 17:28:10 +0000
> |> @@ -1375,8 +1375,8 @@
> |> """See Branch.set_revision_history."""
> |> if 'evil' in debug.debug_flags:
> |> mutter_callsite(3, "set_revision_history scales with history.")
> |> - self._clear_cached_state()
> |> self._write_revision_history(rev_history)
> |> + self._clear_cached_state()
> |
> | ^^^ what's the purpose of moving this? The previous position gave
> | write_revision_history the opportunity to populate the cache.
>
> This wasn't my code, I thought he had tested it and found it was important to do
> after. I'll try to check it.
If I remember correctly, I did this to avoid reading of revision-info in
_check_history_violation if the revision info is cached. Not a big real
in local branches, but in a checkout it means an extra network roundtrip
for nothing.
> However, you removed the next line which is:
>
> - - self._clear_cached_state()
> ~ self._write_revision_history(rev_history)
> + self._clear_cached_state()
> ~ self._cache_revision_history(rev_history)
> ~ for hook in Branch.hooks['set_rh']:
> ~ hook(self, rev_history)
>
> So this function is clearing the cached state and setting the final
> values at
> the end of it. While it is certainly possible that
> _write_revision_history()
> would be doing it, it may be that _write* should just write out the
> data, and
> this is the layer where it gets cached.
Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?ISO-8859-1?Q?digit=E1lne?=
=?ISO-8859-1?Q?_podp=EDsan=E1?= =?UTF-8?Q?_=C4=8Das=C5=A5?=
=?ISO-8859-1?Q?_spr=E1vy?=
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080329/3579919b/attachment.pgp
More information about the bazaar
mailing list