Skip to content
Snippets Groups Projects
  1. Oct 06, 2015
  2. Oct 07, 2015
  3. Oct 06, 2015
  4. Oct 07, 2015
  5. Oct 06, 2015
  6. Oct 05, 2015
    • Pierre-Yves David's avatar
      incoming: request a bundle2 when possible (BC) · 1e8e0b01faba
      Pierre-Yves David authored
      Incoming was using bundle1 in all cases, as bundle1 is restricted to
      changegroup1 and does not support general delta, this can lead to significant
      CPU overhead if the server is using general delta storage. We now properly
      request and store a bundle2 to disk.
      
      If the server include any output or error in the bundle, they will be stored on
      disk and replayed when the bundle is read. As 'hg incoming' is going to read the
      bundle right away, we call that 'good' enough and go back to the bigger plan of
      having general delta on by default.
      
      This was tracked as 4864
      1e8e0b01faba
    • Pierre-Yves David's avatar
      bundlerepo: indent some code to prepare next patch · a018cbabdb51
      Pierre-Yves David authored
      We are about to add a new condition. Code is indented in a separated patch for
      readability.
      a018cbabdb51
  7. Oct 08, 2015
    • Pierre-Yves David's avatar
      bundle2: add a way to just forward the bundle2 stream to another user · b87e4638dabf
      Pierre-Yves David authored
      There is use case for directly forward and bundle2 stream from the peer to a
      file (eg: 'hg incoming --bundle'), However ssh peers have no way to know the
      'getbundle' is over except for actually interpreting the bundle. So we need to
      have the unbundle do the interpreting and forward job.
      
      The function is marked as private to highlight that this is terrible and that we
      are sorry.
      b87e4638dabf
  8. Oct 05, 2015
  9. Oct 07, 2015
  10. Oct 05, 2015
  11. Oct 02, 2015
  12. Oct 07, 2015
  13. Oct 08, 2015
  14. Oct 07, 2015
    • Siddharth Agarwal's avatar
      filemerge: switch trymerge boolean to mergetype enum · 7fa3560443fd
      Siddharth Agarwal authored
      trymerge = False becomes mergetype = nomerge, and trymerge = True becomes
      mergetype = fullmerge or mergeonly, depending on whether a premerge happens.
      7fa3560443fd
    • Siddharth Agarwal's avatar
      filemerge: add some merge types · abc2327e382a
      Siddharth Agarwal authored
      We're going to turn the 'trymerge' boolean into a 'mergetype' enum with these
      three possible values.
      abc2327e382a
    • Katsunori FUJIWARA's avatar
      shelve: restore unshelved dirstate explicitly after aborting transaction · 61c295d9d402
      Katsunori FUJIWARA authored
      Before this patch, "hg unshelve" uses aborting a current transaction
      to discard temporary changes while unshelving.
      
      This assumes that dirstate changes in a transaction scope are kept
      even after aborting it. But this assumption will be broken by
      "transactional dirstate". See the wiki page below for detail about it.
      
          https://mercurial.selenic.com/wiki/DirstateTransactionPlan
      
      This patch explicitly saves shelved dirstate just before aborting
      current transaction, and restore dirstate with it after aborting by
      utility function '_aborttransaction()' added by previous patch.
      61c295d9d402
    • Katsunori FUJIWARA's avatar
      shelve: restore shelved dirstate explicitly after aborting transaction · 1d23bf6cd90a
      Katsunori FUJIWARA authored
      Before this patch, "hg shelve" uses aborting a current transaction to
      discard temporary changes while shelving.
      
      This assumes that dirstate changes in a transaction scope are kept
      even after aborting it. But this assumption will be broken by
      "transactional dirstate". See the wiki page below for detail about it.
      
          https://mercurial.selenic.com/wiki/DirstateTransactionPlan
      
      This patch explicitly saves shelved dirstate just before aborting
      current transaction, and restore dirstate with it after aborting by
      utility function '_aborttransaction()' added by previous patch.
      
      This patch replaces 'if tr: tr.abort()' by 'lockmod.release(tr)',
      because the former is already done in '_aborttransaction()' (and the
      latter has no effect), if current transaction is aborted in it
      successfully. Otherwise, the latter is enough to trigger aborting.
      1d23bf6cd90a
    • Katsunori FUJIWARA's avatar
      shelve: add utility to abort current transaction but keep dirstate · 10f14bb22950
      Katsunori FUJIWARA authored
      "hg shelve" and "hg unshelve" use aborting a current transaction to
      discard temporary changes while (un)shelving.
      
      This assumes that dirstate changes in a transaction scope are kept
      even after aborting it. But this assumption will be broken by
      "transactional dirstate". See the wiki page below for detail about it.
      
          https://mercurial.selenic.com/wiki/DirstateTransactionPlan
      
      This patch adds utility function "_aborttransaction()" to abort
      current transaction but keep dirstate changes for (un)shelving.
      
      'dirstate.invalidate()' just after aborting a transaction should be
      removed soon by subsequent patch, which writes or discards in-memory
      dirstate changes at releasing transaction according to the result of
      it.
      
      BTW, there are some other ways below, which (seem to, at first glance)
      resolve this issue. But this patch chose straightforward way for ease
      of review and future refactorring.
      
        - commit transaction at first, and then rollback it
      
          It causes unintentional "dirty read" of running transaction to
          other processes at committing it.
      
        - use dirstateguard to save and restore shelved dirstate
      
          After DirstateTransactionPlan, making 'dirstate.write()' write
          in-memory changes into actual file requires
          'transaction.writepending()' while transaction running.
      
          It causes meaningless writing other in-memory changes out, even
          though they are never referred.
      
          In addition to it, it isn't desirable that scope of dirstateguard
          and transaction intersects each other.
      
        - get list of files changed from the parent, keep it in memory, and
          emulate that changes after aborting transaction
      
          This additional memory consumption may block aborting transaction
          in large repository (on small resource environment).
      10f14bb22950
    • Katsunori FUJIWARA's avatar
      dirstate: split write to write changes into files other than .hg/dirstate · 3f41e28a16d8
      Katsunori FUJIWARA authored
      '_writedirstate()' is used mainly for "transactional dirstate". See
      the wiki page below for detail about it.
      
          https://mercurial.selenic.com/wiki/DirstateTransactionPlan
      3f41e28a16d8
Loading