[PATCH 3 of 3] copies: do not track backward copies, only renames (issue3739)
Matt Mackall
mpm at selenic.com
Sat Dec 22 19:39:14 UTC 2012
On Fri, 2012-12-21 at 19:50 -0800, Siddharth Agarwal wrote:
> On 12/21/2012 03:42 PM, Matt Mackall wrote:
> > All of this is a long way of saying that I don't think your commit
> > comment is correct.
>
> Thanks for the correction. I agree that "ypoc" is something we should
> eventually handle, perhaps with a richer data structure that supports
> the full range of possibilities. What do you think of keeping the code
> the same, but updating the commit message to:
>
> copies: do not track backward copies, only renames (issue3739)
>
> The inverse of a rename is a rename, but the inverse of a copy is not a
> copy.
> Presenting it as such -- in particular, stuffing it into the same dict
> as real
> copies -- causes bugs because other code starts believing the inverse copies
> are real.
>
> The only test whose output changes is test-mv-cp-st-diff.t. When a backwards
> status -C command is run where a copy is involved, the inverse copy
> (which was
> hitherto presented as a real copy) is no longer displayed.
>
> Keeping track of inverse copies is useful in some situations --
> composability
> of diffs, for example, since a delete of "b" followed by an inverse copy "b"
> to "a" is equivalent to a rename "b" to "a". However, representing them
> would
> require a more complex data structure than the same dict in which real
> copies
> are also stored.
Seems fine.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list