Re: [PATCH] fast-import: add ignore non-existent files option.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 2, 2008 at 2:04 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Felipe Contreras <felipe.contreras@xxxxxxxxx> 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.

Just to give you a sense. Right now I'm simply parsing all the changes
in the revision and converting them to fast-import's format. I don't
need to check if the revision has multiple parents, or not.

Now, in order to feed the right data I would have to find the
old_revision markers, use a hash table to store the file changes per
revision, after the parsing find out if there's more than one parent.
If there's more than one parent then find out the duplicate actions
that are in all the parents and store them in a new list of actions.
If there's only one parent then simply use the list of actions of that
parent.

I can spend some time trying to get that working, but a) this
workaround is much simpler, and b) I'm thinking on writing the final
converter in C. I really don't want to mess with all this complexity
unless I absolutely must.

If you are interested in the current code: http://pastie.org/264209.

>> @@ -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.

I added it because I thought it was missing. Since apparently it's
more important to don't alter the old behaviour I prefer to scratch my
own itch and focus on what I need.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux