Proper tracking of file-level operations: rename, directories, merges
Martin Geisler
mg at lazybytes.net
Wed Oct 26 10:32:53 UTC 2011
"Matthew D. Fuller" <fullermd at over-yonder.net> writes:
> On Fri, Oct 21, 2011 at 09:16:56AM +0200 I heard the voice of
> Martin Geisler, and lo! it spake thus:
>>
>> Yes, that is true -- directory renames are *defined* to mean "all
>> files in foo/ was moved to bar/". As far as I can see, this is
>> equivalent to actually tracking directories.
>
> As Vincent alluded to in another mail, the problem is that you're
> aliasing here. If you defined directory renames to mean something
> like "a spork landed on the moon", that would be OK (_you_ may not be,
> but _it_ would ;), since that's a presumably unique event.
>
> But there are two distinct operations a person can do; they can rename
> a directory to another name, OR they can rename all the files in a
> directory into another directory. But you only have a single
> representation for those, so you can't tell the difference between
> them. But to the user, they're definitely at least potentially very
> different expressions of intent.
>
> To construct one strawman of where it could matter, imagine a tree
> where you have two dirs like "unchecked/" and "checked/", and you
> move the files from one to the other after a person has examined them.
> If you track as hg does, and somebody checks and moves all the files
> from one to the other for the first time, then any later merges would
> wind up moving new files in unchecked/ right into checked/ without the
> user having checked them (or even possibly noticing it's happened).
Yeah, that would be bad. A small wringle is that checked/ cannot exist
when you do "hg rename unchecked/* checked/", since the move doesn't
count as a directory rename otherwise.
Throughout this thread, I've been looking for examples where you make
some steps in Mercurial within its boundaries (so no empty directories)
and then end up in a mess. Bazaar can clearly express more scenarios
with its tracking of (empty) directories.
--
Martin Geisler
Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20111026/52108123/attachment.pgp>
More information about the bazaar
mailing list