Skip to content
Snippets Groups Projects
  1. Oct 08, 2015
    • Mads Kiilerich's avatar
      context: don't hex encode all unknown 20 char revision specs (issue4890) · a3fcc8e3
      Mads Kiilerich authored
      d3908c911d5e introduced nice hexified display of missing nodes. It did however
      also make missing 20 character revision specifications be shown as hex - very
      confusing.
      
      Users are often wrong and somehow specify revisions that don't exist. Nodes
      will however rarely be missing ... and they will only look like a user provided
      revision specification and be all ascii in 1 of 4*10**9.
      
      With this change, missing revisions will only be hexified if they really look
      like binary nodes. This change will thus improve the error reporting UI in the
      common case and only very rarely make it confusing in the opposite direction of
      how it was before.
      a3fcc8e3
  2. Oct 12, 2015
  3. Oct 09, 2015
  4. Oct 12, 2015
  5. Oct 09, 2015
  6. Oct 12, 2015
  7. Oct 07, 2015
    • Emanuele Giaquinta's avatar
      cvsps: fix computation of parent revisions when log caching is on · c60dfcc0
      Emanuele Giaquinta authored
      cvsps computes the parent revisions of log entries by walking the cvs log
      sorted by (rcs, revision) and by iteratively maintaining a 'versions'
      dictionary which maps a (rcs, branch) pair onto the last revision seen for that
      pair. When log caching is on and a log cache exists, cvsps fails to set the
      parent revisions of new log entries because it does not iterate over the log
      cache in the parents computation. A complication is that a file rcs can change
      (move to/from the attic), with respect to its value in the log cache, if the
      file is removed/added back. This patch adds an iteration over the log cache to
      update the rcs of cached log entries, if changed, and to properly populate the
      'versions' dictionary.
      c60dfcc0
  8. Oct 06, 2015
  9. Oct 11, 2015
  10. Oct 08, 2015
  11. Oct 06, 2015
  12. Oct 05, 2015
    • Christian Delahousse's avatar
      histedit: delete histedit statefile on any exception during abort · e2810240
      Christian Delahousse authored
      When an user aborts a histedit, many things could go wrong. At a minimum, after
      a histedit abort failure, their repository should be out of that state. We've
      found situations where the user could not exit the histedit state without
      manually deleting the histedit state file. This patch ensures that if any
      exception happens during an abort, the histedit statefile will be deleted so
      that users are out of the histedit state and can at least manually get the repo
      back to a workable condition.
      e2810240
  13. Oct 06, 2015
    • Christian Delahousse's avatar
      histedit: check presence of statefile before deleting it · 49b568a4
      Christian Delahousse authored
      When the histeditstate class instance has it's clear() method called, there is
      nothing to check to see if the state file exists before deleting it. It may not
      exist, which would create an exception. This patch allows clear to be called at
      any time.
      
      This will be needed for the following patch.
      49b568a4
  14. Oct 05, 2015
  15. Oct 08, 2015
    • Katsunori FUJIWARA's avatar
      commands: use dirstateguard instead of begin/end-parentchange for backout · 6e715040
      Katsunori FUJIWARA authored
      Before this patch, "hg backout" uses 'begin'/'end'-'parentchange()'
      of 'dirstate' class to avoid writing incomplete dirstate changes out
      at failure.
      
      But this framework doesn't work as expected, if 'dirstate.write()' is
      invoked between them. In fact, in-memory dirstate changes may be
      written out at 'repo.status()' implied by 'merge.update()', even
      before this patch.
      
      To restore dirstate as expected at failure of "hg backout", this patch
      uses 'dirstateguard' instead of 'begin'/'end'-'parentchange()'.
      6e715040
    • Katsunori FUJIWARA's avatar
      commands: make "hg import" use dirstateguard only for --no-commit · 4688945f
      Katsunori FUJIWARA authored
      Previous patch made dirstate changes in a transaction scope "all or
      nothing". Therefore, 'dirstateguard' is meaningless, if its scope is
      as same as one of the related transaction.
      
      Before this patch, "hg import" uses 'dirstateguard' always, but
      transaction is also started if '--no-commit' isn't specified.
      
      To avoid redundancy, this patch makes "hg import" use dirstateguard
      only if transaction isn't started (= '--no-commit' is specified).
      
      In this patch, 'if dsguard' can be examined safely, because 'dsguard'
      is initialized (with None) before outermost 'try'.
      4688945f
    • Katsunori FUJIWARA's avatar
      cmdutil: stop tryimportone from using dirstateguard (BC) · dc2b8c00
      Katsunori FUJIWARA authored
      There is no user of 'cmdutil.tryimportone()' other than
      'commands.import_()', which can restore dirstate at failure of
      applying patches by transaction or dirstateguard.
      
      Therefore, it is reasonable to stop 'tryimportone()' from using
      redundant 'dirstateguard', even though it changes behavior of
      'tryimportone()'.
      
      After this patch, 3rd party extensions should use 'dirstateguard' or
      so explicitly, if they want to restore dirstate at failure of
      importing a patch.
      dc2b8c00
    • Katsunori FUJIWARA's avatar
      dirstate: remove meaningless dirstateguard · 8bd2759f
      Katsunori FUJIWARA authored
      Previous patch made dirstate changes in a transaction scope "all or
      nothing". Therefore, 'dirstateguard' is meaningless, if its scope is
      as same as one of the related transaction.
      
      This patch removes such meaningless 'dirstateguard' usage.
      8bd2759f
    • Katsunori FUJIWARA's avatar
      localrepo: execute appropriate actions for dirstate at releasing transaction · 8f2ff40f
      Katsunori FUJIWARA authored
      Before this patch, in-memory dirstate changes are still kept over a
      transaction scope boundary regardless of the result of it.
      
      For "all or nothing" policy of the transaction, in-memory dirstate
      changes should be:
      
        - written out at successful closing a transaction, because
          subsequent 'dirstate.invalidate()' can lose them
      
        - discarded at failure of a transaction, because outer
          'wlock.release()' or so may write them out
      
      To discard all changes in a transaction completely, this patch also
      restores '.hg/dirstate' by '.hg/journal.dirstate' at failure, because
      'transaction' itself does nothing for files related to '.hg/journal.*'
      in such case (therefore, renaming in this patch is safe enough).
      
      This is a part of preparations for "transactional dirstate". See also
      the wiki page below for detail about it.
      
          https://mercurial.selenic.com/wiki/DirstateTransactionPlan
      
      This patch also removes redundant 'dirstate.invalidate()' just before
      aborting a transaction for shelve/unshelve.
      8f2ff40f
    • Katsunori FUJIWARA's avatar
      transaction: add releasefn to notify the end of a transaction scope · 9e0aaac0
      Katsunori FUJIWARA authored
      'releasefn' is used by subsequent patch, to do appropriate action
      according to the result of it at the end of a transaction scope.
      
      To ensure that 'releasefn' is invoked only once, this patch invokes it
      after assignment 'self.journal = None', because such assignment
      prevents from invoked 'transaction._abort()' again via '__del__()'.
      
          def __del__(self):
              if self.journal:
                  self._abort()
      9e0aaac0
    • Siddharth Agarwal's avatar
      filemerge: move post-merge checks into a separate function · d6081566
      Siddharth Agarwal authored
      This makes the overall filemerge function easier to follow, and makes upcoming
      work simpler.
      d6081566
    • Siddharth Agarwal's avatar
      filemerge._xmerge: drop no longer necessary 'if r:' check · f82cb7df
      Siddharth Agarwal authored
      Cleanup from an earlier patch to make premerge be directly called from the main
      filemerge function.
      f82cb7df
    • Siddharth Agarwal's avatar
      filemerge._idump: drop no longer necessary 'if r:' check · a875773c
      Siddharth Agarwal authored
      Cleanup from an earlier patch to make premerge be directly called from the main
      filemerge function.
      a875773c
    • Siddharth Agarwal's avatar
      filemerge._merge: drop no longer necessary 'if r:' check · c7850af6
      Siddharth Agarwal authored
      Cleanup from an earlier patch to make premerge be directly called from the main
      filemerge function.
      c7850af6
  16. Oct 05, 2015
  17. Sep 29, 2015
  18. Oct 05, 2015
    • Pierre-Yves David's avatar
      update: move default destination computation to a function · 2aeeef1d
      Pierre-Yves David authored
      We ultimately want this to be accessible through a revset, but there is too
      much complexity here for that to work. Especially we'll have to return more
      than just the destination to control the behavior (eg: bookmarks to activate,
      etc).
      
      To prevent cycle, a new module is created, it will receive other
      destination/behavior function in the future.
      2aeeef1d
  19. Oct 08, 2015
    • Gregory Szorc's avatar
      worker: restore old countcpus code (issue4869) · c0501c26
      Gregory Szorc authored
      This is a backout of d29859cfcfc2. The stdlib implementation of
      multiprocessing.cpu_count() attempts to invoke a process on BSD and
      Darwin platforms (at least on 2.7). Under certain conditions (such as
      cwd being removed) this could raise. Our old code was silently catching
      the exception.
      
      The old code was more robust, so restore it.
      c0501c26
    • Siddharth Agarwal's avatar
      filemerge: call premerge directly from main merge function · f18646cf
      Siddharth Agarwal authored
      The merge code currently does (in pseudocode):
      
      for f in tomerge:
          premerge f
          merge f
      
      We'd like to change this to look more like:
      
      for f in tomerge:
          premerge f
      
      for f in tomerge:
          merge f
      
      This makes sure as many files are resolved as possible before prompting for the
      others. This restructuring is also necessary for custom merge drivers.
      
      This function separates out the premerge step from the merge step. In future
      patches we'll actually turn these into separate steps in the merge driver.
      
      The 'if r:' occurrences will be cleaned up in subsequent patches.
      f18646cf
  20. Oct 05, 2015
    • Durham Goode's avatar
      bundle2: allow lazily acquiring the lock · 58880acd
      Durham Goode authored
      In the external pushrebase extension, it is valuable to be able to do some work
      without taking the lock (like running expensive hooks). This enables
      significantly higher commit throughput.
      
      This patch adds an option to lazily acquire the lock. It means that all bundle2
      part handlers that require writing to the repo must first call
      op.gettransction(), when in this mode.
      58880acd
  21. Oct 06, 2015
Loading