git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Sep 1, 2008, 23:25 UTC
Message-ID
<94a0d4530809011625n772fdc58h3ce1c04e79fb116f@mail.gmail.com>
In-Reply-To
<7v63pftqmk.fsf@gitster.siamese.dyndns.org>
On Tue, Sep 2, 2008 at 2:04 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> 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.

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 17 in “fast-import: show a warning for non-existent files.”
  1. 1/1 fast-import: show a warning for non-existent files.Felipe Contreras, Sep 1, 2008
  2. Junio C HamanoSep 1, 2008
  3. Felipe ContrerasSep 1, 2008
  4. Shawn O. PearceSep 1, 2008
  5. Felipe ContrerasSep 1, 2008
  6. fast-import: add ignore non-existent files option.Felipe Contreras, Sep 1, 2008
  7. Shawn O. PearceSep 1, 2008
  8. Felipe ContrerasSep 1, 2008
  9. Shawn O. PearceSep 2, 2008
  10. Junio C HamanoSep 2, 2008
  11. Shawn O. PearceSep 2, 2008
  12. Junio C HamanoSep 2, 2008
  13. Felipe ContrerasSep 2, 2008
  14. Junio C HamanoSep 1, 2008
  15. Felipe ContrerasSep 1, 2008
  16. Junio C HamanoSep 2, 2008
  17. Felipe ContrerasSep 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.