1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #2301 closed

Fetch + LargeFiles

Anonymous created an issue

Hello!

When using fetch and extension for large files handling (we still use our custom one, not a LargeFiles) we have the following performance issue: we often use fetch and since fetch always updates working copy to the newly pulled changes, all of the locally added/modified large files are removed, and then copied back during merge. Is it possible to change this behaviour somehow? For example, is it possible to make fetch just pull, do not update? Or use another extension?

Many thanks in advance, Dmitriy Iassenev

Comments (7)

  1. Yuya Nishihara

    is it possible to make fetch just pull, do not update?

    Why don't you use "pull" instead of "fetch" ?

    FWIW, if the performance issue is caused by the custom extension, there'll be few things we can do.

  2. iassenev

    Why don't you use "pull" instead of "fetch" ?

    I use fetch not only to pull changes but merge them with local changes if needed

    FWIW, if the performance issue is caused by the custom extension, there'll be few things we can do.

    Performance issue is caused because large files, which were added or modified locally, then committed but not pushed, are removed during update and then copied back after merge. this is because fetch use pull -u instead of simply pull before merge.

  3. Yuya Nishihara

    Okay, I got what you want, pull+update or pull+merge but no pull+update+merge.

    Try the following config:

    [defaults]
    fetch = --switch-parent
    

    (note: defaults section is not recommended, but there's no way to run hg fetch --switch-parent from TortoiseHg)

  4. iassenev

    --switch-parent - I've heard about this option, but I thought that it just changes the order in which files appear in merge dialog. But when I read more carefully, I found this is what I've been looking for, thank you!

    So, "hg fetch --switch-parent" does what I want, but when I add changes you proposed in mercurial.ini it doesn't change TortoiseHG behaviour :-(

    I tried to remove fetch from extensions section, but then the whole extension is disabled as expected. I tried to add --switch-parent in extensions section in fetch line, but then TortoiseHG doesn't see fetch extension.

    Is there any way to make TortoiseHG use --switch-parent when doing fetch?

  5. iassenev

    thanks a lot!

    P.S. A couple of minutes before I downloaded the latest fetch.py and made --switch-parent option on by default and then redirected fetch extension to my new reversed_fetch.py. But your proposal is much more elegant :-)

  6. Log in to comment