git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Felipe Contreras" <felipe.contreras@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] fast-import: add ignore non-existent files option.
Date: Mon, 01 Sep 2008 19:07:51 -0700	[thread overview]
Message-ID: <7vk5dvs3k8.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <94a0d4530809011625n772fdc58h3ce1c04e79fb116f@mail.gmail.com> (Felipe Contreras's message of "Tue, 2 Sep 2008 02:25:14 +0300")

"Felipe Contreras" <felipe.contreras@gmail.com> writes:

> On Tue, Sep 2, 2008 at 2:04 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>>> This is useful for SCMs that don't have proper changesets in each
>>> revision (monotone).
>>
>> I am still not convinced this is a proper workaround for the issue.  Why
>> shouldn't the feeder of fast-import be able to do this?
>
> If I could get a list of the files that changed on each revision from
> monotone I would, but that's not possible (I've asked in their mailing
> list). Apparently there's a way to feed the right data, but it's
> complicated.

Ok, I did not realize that you are not keeping track of what the parents'
trees look like when processing a merge commit.

But it raises a bigger question.  You earlier said:

    In monotone you can have something like:

     A
    / \
    B D
    | |
    C E
    \ /
     F

    If you do a 'delete foo' in B, and a 'delete bar' in F, you will get
    this stored in the merge revision (F):

    old_revision [C]
    delete "foo"
    delete "bar"

    old_revision [E]
    delete "bar"

    All the changes of the merged branches are stored again in the merge revision.

Now, does it talk about C and E because they are immediate parents of B
and D, or because they are immediate child of the common ancestor F?  I am
guessing it is the latter (what I mean is if it still talks aobut C and E
if you had more intermediate commits between B and C).  What the merge at
A records is not relative to B/D but relative to immediate child of the
fork point.

If that is the case, ignoring a delete that deletes already deleted path
is fine; I think it is the least of your problem.  The above description
makes me wonder what they say about modification.  Do they talk about the
same modification that happened between B and C when talking about A?  If
that is the case, it would be a far larger problem.  You cannot just say
"ignore any modification recorded in a merge, because they have been
already done on the branches being merged (i.e. up to B and up to D)", as
A may have to be an evil merge.

I have to wonder if you can "mark" the tree object of C, and when you
process merge A, represent A's tree by starting from that marked tree,
applying only the description to bring the state of "old_revision [C]"
to that of A (delete "foo" and delete "bar" in your illustration), and
recording that tree with parents B and D.

>>> @@ -1993,8 +1994,15 @@ static void file_change_cr(struct branch *b, int rename)
>>> ...
>>
>> Also what happened to the missing warning() for 'D'elete codepath?
>
> I'm not interested in it.

If I were asking for an unrelated "feature" when you are developing some
other feature, it would have been different, but I do not think that is a
good answer in this particular case.

Your --tolerant (or --ignore-errors) is about customizing strictness of
the error handling, and you know of a case where the error handling is not
strict enough in the existing code.  In other words, your "not interested"
is _not_ saying "It is an unrelated feature that I am not interested in";
it is saying "I am not interested in making my patch self consistent; a
half-baked hack that happens to solve my case is good enough for me."

  reply	other threads:[~2008-09-02  2:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01 13:20 [PATCH 1/1] fast-import: show a warning for non-existent files Felipe Contreras
2008-09-01 19:04 ` Junio C Hamano
2008-09-01 21:58   ` Felipe Contreras
2008-09-01 19:25 ` Shawn O. Pearce
2008-09-01 22:01   ` Felipe Contreras
2008-09-01 22:30     ` [PATCH] fast-import: add ignore non-existent files option Felipe Contreras
2008-09-01 22:38       ` Shawn O. Pearce
2008-09-01 22:52         ` Felipe Contreras
2008-09-02  4:39           ` Shawn O. Pearce
2008-09-02  4:53             ` Junio C Hamano
2008-09-02  5:35               ` Shawn O. Pearce
2008-09-02  7:36                 ` Junio C Hamano
2008-09-02  7:48                   ` Felipe Contreras
2008-09-01 23:04       ` Junio C Hamano
2008-09-01 23:25         ` Felipe Contreras
2008-09-02  2:07           ` Junio C Hamano [this message]
2008-09-02  7:57             ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vk5dvs3k8.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).