Skip to content
Snippets Groups Projects
  1. Oct 07, 2015
  2. Oct 06, 2015
  3. Oct 07, 2015
  4. Oct 06, 2015
  5. 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
  6. 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
  7. Oct 05, 2015
  8. Oct 07, 2015
  9. Oct 05, 2015
  10. Oct 02, 2015
  11. Oct 07, 2015
  12. Oct 08, 2015
  13. 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
    • Katsunori FUJIWARA's avatar
      bookmarks: use recordchange instead of writing if transaction is active · 46dec89fe888
      Katsunori FUJIWARA authored
      Before this patch, 'bmstore.write()' always write in-memory bookmark
      changes into '.hg/bookmarks' regardless of transaction activity.
      
      If 'bmstore.write()' is invoked inside a transaction and it writes
      changes into '.hg/bookmarks', then:
      
        - original bookmarks aren't restored at failure of that transaction
      
          This breaks "all or nothing" policy of the transaction.
      
          BTW, "hg rollback" can restore bookmarks successfully even before
          this patch, because original bookmarks are saved into
          '.hg/journal.bookmarks' at the beginning of the transaction, and
          it (actually renamed as '.hg/undo.bookmarks') is used by "hg
          rollback".
      
        - uncommitted bookmark changes are visible to other processes
      
          This is a kind of "dirty read"
      
      For example, 'rebase.rebase()' implies 'bmstore.write()', and it may
      be executed inside the transaction of "hg unshelve". Then, intentional
      aborting at the end of "hg unshelve" transaction doesn't restore
      original bookmarks (this is obviously a bug).
      
      This patch uses 'bmstore.recordchange()' instead of actual writing by
      'bmstore._writerepo()', if any transaction is active
      
      This patch also removes meaningless restoring bmstore explicitly at
      the end of "hg shelve".
      
      This patch doesn't choose fixing each 'bmstore.write()' callers as
      like below, because writing similar code here and there is very
      redundant.
      
        before:
          bmstore.write()
      
        after:
          tr = repo.currenttransaction()
          if tr:
              bmstore.recordchange(tr)
          else:
              bmstore.write()
      
      Even though 'bmstore.write()' itself may have to be discarded by
      putting bookmark operations into transaction scope, this patch chose
      fixing it to implement "transactional dirstate" at first.
      46dec89fe888
    • Siddharth Agarwal's avatar
      filemerge: run symlink check for :merge3 · 48476c6129a2
      Siddharth Agarwal authored
      Just like :merge, :merge3 doesn't support merging symlinks.
      48476c6129a2
    • Siddharth Agarwal's avatar
      filemerge: print correct name of tool for symlink checks · a77679d0b887
      Siddharth Agarwal authored
      Earlier we'd print ':merge' even if the tool was something else like ':union'.
      That's clearly a bug.
      a77679d0b887
    • Siddharth Agarwal's avatar
      filemerge: normalize 'internal:foo' names to ':foo' · d8463a743d7d
      Siddharth Agarwal authored
      In upcoming patches we're going to present these names in the UI -- it would be
      good not to present deprecated names.
      d8463a743d7d
Loading