[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Changing ID
From: |
Miles Bader |
Subject: |
Re: [Gnu-arch-users] Changing ID |
Date: |
Wed, 21 Apr 2004 19:09:49 -0400 |
User-agent: |
Mutt/1.3.28i |
On Wed, Apr 21, 2004 at 04:07:00PM -0400, Stefan Monnier wrote:
> I wish there was a way for tla to say "hmmm, let's represent this
> remove+add on the same file name as an ID-change operation". The ID-change
> operation would of course be accompagnied with a diff of the content of the
> file has changed (which is basically always the case if you're using
> taglines).
Yeah, this has always been something I've wanted (I was mostly thinking of
cases where the user _wants_ to change an explicit id to a tagline or
vice-versa, but it's always annoying to see tagline correction changesets
being so large, and prone to cause conflicts).
Since it probably requires changing the way changesets are handled a bit, it
has the new-archive-version-required problem that seems a good way to kill
any further discussion (I think this is one reason similar topics always
seemed to end up with people saying "just live with the add+delete").
As for the actual representation, it seems like the current changeset format
could actually represent this nicely:
A normal changeset represents a patch like:
old-id-mapping: ID_TAG OLD_FILENAME
new-id-mapping: ID_TAG NEW_FILENAME
if both mappings exist for a given ID_TAG:
patch-file: patches/NEW_FILENAME.patch
else if only the old-id-mapping exists:
old-file: old-files/OLD_FILENAME
else
new-file: new-files/NEW_FILENAME
Currently, an id change in RETAGGED_FILE looks like:
old-id-mapping: OLD_ID_TAG RETAGGED_FILE
new-id-mapping: NEW_ID_TAG RETAGGED_FILE
old-file: old-files/RETAGGED_FILE
new-file: new-files/RETAGGED_FILE
So it seems like you could just change the `if' test above to something like
`if both mappings exist for a given ID_TAG _or_ both mappings exist for a
given FILENAME', and then use the obvious:
old-id-mapping: OLD_ID_TAG RETAGGED_FILE
new-id-mapping: NEW_ID_TAG RETAGGED_FILE
patch-file: patches/RETAGGED_FILE.patch
instead.
-Miles
--
.Numeric stability is probably not all that important when you're guessing.