[RFC] _iter_changes want_unversioned should also expand out across renames
Robert Collins
robertc at robertcollins.net
Thu Aug 30 20:50:43 BST 2007
On Thu, 2007-08-30 at 12:20 -0500, John Arbash Meinel wrote:
> -----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.
...
> 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).
I think you missed the point here.
Its not about recursing into unversioned directories. Its about
detection of unversioned paths within versioned directories.
Dirstate detects unversioned paths in renamed dirs. The 'generic'
implementation doesn't.
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070831/b78cd935/attachment.pgp
More information about the bazaar
mailing list