Code review comment for lp:~bzr/bzr/iter-entries-norecurse

Revision history for this message
John A Meinel (jameinel) wrote :

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

Ian Clatworthy wrote:
>> I'll note that if you use 'iter_entries_by_dir()' you don't have to
>> worry about passing 'no_recurse=True', you can just stop iterating once
>> you find you are no longer in that directory. Just a thought.
>
> That's true but it seems more fragile to me. (I'm not confident that all implementations of iter_entries_by_dir() will strictly implement the ordering in the future.) By making it a parameter, the behaviour is more explicit and easier to test IMO.

iter_entries_by_dir has strictly enforced ordering so that you can walk
iterators side-by-side. The ordering *is* part of the api.

That said, a flag certainly seems a bit more obvious.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoRcDIACgkQJdeBCYSNAAO0IQCeIrf3ZdqZxV92gtyU+VoDSjxh
XP4An0TuM9IpJceLtusMBFa/RaJGay6K
=NRKc
-----END PGP SIGNATURE-----

« Back to merge proposal