[MERGE] Faster local branching, checkout

Aaron Bentley aaron at aaronbentley.com
Mon Jun 9 05:12:54 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Clatworthy wrote:
> The 'inventory_delta is not None' test can be moved higher up into the
> 'if trans_id in self._removed_id:' check. There's no need to work out the
> file-id at all unless we're going to build the inventory delta.

Yes.  On the other hand, it doesn't make a difference except when
computing removal of large numbers of files, so I was lazy at first.
Changed now.

>> +        entries = self._tree.iter_entries_by_dir(new_path_file_ids.values())
>> +        old_paths = dict((e.file_id, p) for p, e in entries)
> 
> It looks like old_paths is only used when calculating the inventory entries?
> If so, we could only generate these things above when inventory_delta is not None.

Another case where there wasn't a significant performance impact to
changing it.  Still, fixed as you asked.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFITK3G0F+nu1YWqI0RAshHAJ469VgOxV6EqYIVHkhQJyXhCr3howCeJGhA
Tr/hdgSWO8HBAc+CEOfCvUw=
=5nMY
-----END PGP SIGNATURE-----



More information about the bazaar mailing list