[RFC] _iter_changes want_unversioned should also expand out across renames
John Arbash Meinel
john at arbash-meinel.com
Thu Aug 30 18:20:37 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> At the moment when one passes in want_unversioned, only unversioned
> files directly in the specified paths given are found.
>
> I think this has a failure mode - if I have
> /
> /dir
>
> and then rename it:
> /
> /newdirname
>
> and add a unversioned file
>
> /
> /newdirname/unversioned
>
> In our as-yet unimplemented 'commit -A dir' I would expect, and I think
> users would too, that when we commit newdirname (because its 'dir
> renamed'), we would include its contents - which is the file
> unversioned.
>
> If this makes sense I'll file a bug on _iter_changes.
>
> -Rob
>
>
Well, "commit -A dir" needs to force recursing into unversioned directories.
Because if we do that all the time, then we re-introduce Aaron's bug. Where he
has an (empty) versioned directory, which has an unversioned subdir. And in
that subdir he has files that cannot be read (restricted to a different user).
There are a few specific reasons why we don't want to descend. One of them was
performance (recursing into the 10 test000X directories I used to have lying
around is a *huge* performance kill, consider a 'build/*' directory). The other
was correctness (if I'm not versioning a subdir, I shouldn't care if it has bad
filenames/fifos/files owned by other users).
I can see having a flag which might switch on "recurse_into_unversioned". But
it should be off by default for commands like commit/status/etc. (--auto could
turn it on).
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG1vxkJdeBCYSNAAMRAnEMAKCmZtHngIG2gQ/DZGPmEqkGmFdQTwCcDm4j
jrL/42rcfER0VNJ6KiSG2GQ=
=kUhU
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list