Skip to content
Snippets Groups Projects
  1. Sep 14, 2016
    • Augie Fackler's avatar
      help: mark boolean flags with [no-] to explain that they can be negated · f3c4edfd35e1
      Augie Fackler authored
      That is, help gets tweaked thus:
      
        global options ([+] can be repeated):
         -v --[no-]verbose      enable additional output
      
      
      Other proposals have included:
      
        global options ([+] can be repeated, options marked [?] are boolean flags):
         -v --verbose[?]        enable additional output
      
      and
      
        global options ([+] can be repeated, options marked [^] are boolean flags):
         -v --verbose[^]        enable additional output
      
      which avoid the unfortunate visual noise in this patch. In this
      version's favor, it's consistent with what I'm used to seeing in man
      pages and similar documentation venues.
      f3c4edfd35e1
  2. Sep 27, 2016
  3. Sep 26, 2016
  4. Sep 27, 2016
  5. Sep 26, 2016
  6. Sep 24, 2016
    • Gregory Szorc's avatar
      perf: add perfchangegroupchangelog command · bd6df07ccc24
      Gregory Szorc authored
      This command can be used for testing the performance of producing the
      changelog portion of a changegroup.
      
      We could use additional perf* commands for testing other parts of
      changegroup. Those can be written another time, when they are needed.
      (And those may want to refactor the changegroup generation API so code
      can be reused.) Speaking of code reuse, yes, this command does reinvent
      a small wheel. I didn't want to scope bloat to change the changegroup
      API because that will invite bikeshedding.
      bd6df07ccc24
    • Gregory Szorc's avatar
      perf: add --reverse to perfrevlog · 973cf6c3de30
      Gregory Szorc authored
      It can be useful to know how fast we can read revisions from a revlog
      in reverse. This operation tends to occur in `hg log` commands,
      for example.
      973cf6c3de30
    • Yuya Nishihara's avatar
      log: copy the way of ancestor traversal to --follow matcher (issue5376) · 2963fba2d18a
      Yuya Nishihara authored
      We can't use fctx.linkrev() because follow() revset tries hard to simulate
      the traversal of changelog DAG, not filelog DAG. This patch fixes
      _makefollowlogfilematcher() to walk file ancestors in the same way as
      revset._follow().
      
      I'll factor out a common function in future patches.
      2963fba2d18a
    • Yuya Nishihara's avatar
      log: unroll loop that populates file paths for --patch --follow matcher · 96b2dd3b184d
      Yuya Nishihara authored
      We can't handle the first fctx in the same manner as its ancestors. Also,
      I think the original code was too tricky.
      96b2dd3b184d
  7. Sep 25, 2016
  8. Aug 25, 2016
  9. Sep 23, 2016
    • Hannes Oldenburg's avatar
      templates: add built-in files() function · e83f89d3b1f7
      Hannes Oldenburg authored
      We already support multiple primitive for listing files, which were
      affected by the current changeset.
      This patch adds files() which returns files of the current changeset
      matching a given pattern or fileset query via the "set:" prefix.
      e83f89d3b1f7
  10. Sep 17, 2016
    • Xidorn Quan's avatar
      rebase: rebase changesets in topo order (issue5370) (BC) · aca0954d3739
      Xidorn Quan authored
      There are two reasons that rebase should be done this way:
      1. This would make rebasing faster because it would minimize the total
         number of files to be checked out in the process, as it don't need
         to switch back and forth between branches.
      2. It makes resolving conflicts easier as user has a better context.
      
      This commit changes the behavior in "Test multiple root handling" of
      test-rebase-obsolete.t. It is an expected change which reflects the new
      behavior that commits in a branch are grouped together when rebased.
      aca0954d3739
  11. Sep 22, 2016
    • Arun Kulshreshtha's avatar
      dispatch: make hg --profile wrap reposetup · b19c2679289c
      Arun Kulshreshtha authored
      Move profiling.maybeprofile() from _runcommand to _dispatch() so that
      profiler output will include reposetup.
      b19c2679289c
    • Arun Kulshreshtha's avatar
      dispatch: change indentation level in _dispatch() · dfd97e60044c
      Arun Kulshreshtha authored
      Add an if True: placeholder for a profiling context manager that
      will be added in the next commit, for the purpose of reducing size
      of the diff due to trivial indentation changes.
      
      This change should be a no-op.
      dfd97e60044c
    • Yuya Nishihara's avatar
      log: drop outdated optimization to walk revisions in reverse order · 5aaa3d6b7e92
      Yuya Nishihara authored
      Since revset is computed lazily, there would be no (or little) benefit to
      reverse 'revs' temporarily.
      5aaa3d6b7e92
    • Yuya Nishihara's avatar
      graphlog: preserve topo sort even if additional filter options specified · 46825334f270
      Yuya Nishihara authored
      Use ordered=revset.followorder instead. This change is logically the same
      as fa5e4f58dfbc.
      46825334f270
    • Katsunori FUJIWARA's avatar
      transaction: open a file with checkambig=True to avoid file stat ambiguity · 599912a62ff6
      Katsunori FUJIWARA authored
      Before this patch, if steps below occurs at "the same time in sec",
      all of mtime, ctime and size are same between (1) and (3).
      
        1. append data to revlog-style file (and close transaction)
        2. discard appended data by truncation of rollback
        3. append same size but different data to revlog-style file again
      
      Therefore, cache validation doesn't work after (3) as expected.
      
      To avoid file stat ambiguity around truncation, this patch opens a
      file with checkambig=True.
      
      This is a part of ExactCacheValidationPlan.
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      599912a62ff6
    • Katsunori FUJIWARA's avatar
      repair: open a file with checkambig=True to avoid file stat ambiguity · e38d85be978f
      Katsunori FUJIWARA authored
      Before this patch, if steps below occurs at "the same time in sec",
      all of mtime, ctime and size are same between (1) and (3).
      
        1. append data to revlog-style file (and close transaction)
        2. discard appended data by truncation of strip
        3. append same size but different data to revlog-style file again
      
      Therefore, cache validation doesn't work after (3) as expected.
      
      To avoid such file stat ambiguity around truncation, this patch opens
      a file with checkambig=True.
      
      This patch also introduces "with" statement style, to ensure immediate
      invocation of close() after truncation, because closing file is the
      only trigger to check (and get rid of) file stat ambiguity.
      
      This is a part of ExactCacheValidationPlan.
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      e38d85be978f
    • Katsunori FUJIWARA's avatar
      changelog: specify checkambig=True to revlog.__init__, to avoid ambiguity · 557454ce854a
      Katsunori FUJIWARA authored
      If steps below occurs at "the same time in sec", all of mtime, ctime
      and size are same between (1) and (3).
      
        1. append data to 00changelog.i (and close transaction)
        2. discard appended data by truncation (strip or rollback)
        3. append same size but different data to 00changelog.i again
      
      Therefore, cache validation doesn't work after (3) as expected.
      
      To avoid such file stat ambiguity around truncation, this patch
      specifies checkambig=True to revlog.__init__(). This makes revlog
      write changes out with checkambig=True.
      
      Even though changes of 00changelog.i themselves are written out at
      changelog._finalize(), this checkambig=True is needed, because
      revlog.checkinlinesize(), which is invoked at the end of
      changelog._finalize(), might replace already changed 00changelog.i by
      converted one.
      
      Even after this patch, avoiding file stat ambiguity of 00changelog.i
      around truncation isn't yet completed, because truncation side isn't
      aware of this issue.
      
      This is a part of ExactCacheValidationPlan.
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      557454ce854a
    • Katsunori FUJIWARA's avatar
      changelog: specify checkambig=True to avoid ambiguity around truncation · 003c41edc5f5
      Katsunori FUJIWARA authored
      If steps below occurs at "the same time in sec", all of mtime, ctime
      and size are same between (1) and (3).
      
        1. append data to 00changelog.i (and close transaction)
        2. discard appended data by truncation (strip or rollback)
        3. append same size but different data to 00changelog.i again
      
      Therefore, cache validation doesn't work after (3) as expected.
      
      To avoid such file stat ambiguity around truncation, this patch
      specifies checkambig=True for renaming or opening to write changes out
      at finalization.
      
      Even after this patch, avoiding file stat ambiguity of 00changelog.i
      around truncation isn't yet completed, because truncation side isn't
      aware of this issue.
      
      This is a part of ExactCacheValidationPlan.
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      003c41edc5f5
    • Katsunori FUJIWARA's avatar
      manifest: specify checkambig=True to revlog.__init__, to avoid ambiguity · 14ad8e2a4abe
      Katsunori FUJIWARA authored
      If steps below occurs at "the same time in sec", all of mtime, ctime
      and size are same between (1) and (3).
      
        1. append data to 00manifest.i (and close transaction)
        2. discard appended data by truncation (strip or rollback)
        3. append same size but different data to 00manifest.i again
      
      Therefore, cache validation doesn't work after (3) as expected.
      
      To avoid such file stat ambiguity around truncation, this patch
      specifies checkambig=True to revlog.__init__(). This makes revlog
      write changes out with checkambig=True.
      
      Even after this patch, avoiding file stat ambiguity of 00manifest.i
      around truncation isn't yet completed, because truncation side isn't
      aware of this issue.
      
      This is a part of ExactCacheValidationPlan.
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      14ad8e2a4abe
    • Katsunori FUJIWARA's avatar
      revlog: specify checkambig at writing to avoid file stat ambiguity · b5e5ddf48bd2
      Katsunori FUJIWARA authored
      This allows revlog-style files to be written out with checkambig=True
      easily.
      
      Because avoiding file stat ambiguity is needed only for filecache-ed
      manifest and changelog, this patch does:
      
        - use False for default value of checkambig
        - focus only on writing changes of index file out
      
      This patch also adds optional argument checkambig to _divert/_delay
      for changelog, to safely accept checkambig specified in revlog
      layer. But this argument can be fully ignored, because:
      
        - changes are written into other than index file, if name != target
        - changes are never written into index file, otherwise
          (into pending file by _divert, or into in-memory buffer by _delay)
      
      This is a part of ExactCacheValidationPlan.
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      b5e5ddf48bd2
    • Katsunori FUJIWARA's avatar
      vfs: use checkambigatclosing in checkambig=True but atomictemp=False case · 9766d88c2465
      Katsunori FUJIWARA authored
      In Mercurial source tree, opening a file in "a"/"a+" mode like below
      doesn't specify atomictemp=True for vfs, and this avoids file stat
      ambiguity check by atomictempfile.
      
        - writing changes out in revlog layer uses "a+" mode
        - truncation in repair.strip() uses "a" mode
        - truncation in transaction._playback() uses "a" mode
      
      If steps below occurs at "the same time in sec", all of mtime, ctime
      and size are same between (1) and (3).
      
        1. append data to revlog-style file (and close transaction)
        2. discard appended data by truncation (strip or rollback)
        3. append same size but different data to revlog-style file again
      
      Therefore, cache validation doesn't work after (3) as expected.
      
      This patch uses checkambigatclosing in checkambig=True but
      atomictemp=False case, to check (and get rid of) file stat ambiguity
      at closing.
      
      This is a part of ExactCacheValidationPlan.
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      9766d88c2465
    • Katsunori FUJIWARA's avatar
      scmutil: add file object wrapper class to check ambiguity at closing · 57830bd0e787
      Katsunori FUJIWARA authored
      In Mercurial source tree, opening a file in "a"/"a+" mode like below
      doesn't specify atomictemp=True for vfs, and this avoids file stat
      ambiguity check by atomictempfile.
      
        - writing changes out in revlog layer uses "a+" mode
        - truncation in repair.strip() uses "a" mode
        - truncation in transaction._playback() uses "a" mode
      
      If steps below occurs at "the same time in sec", all of mtime, ctime
      and size are same between (1) and (3).
      
        1. append data to revlog-style file (and close transaction)
        2. discard appended data by truncation (strip or rollback)
        3. append same size but different data to revlog-style file again
      
      Therefore, cache validation doesn't work after (3) as expected.
      
      This patch adds file object wrapper class checkambigatclosing to check
      (and get rid of) ambiguity at closing. It is used by vfs in subsequent
      patch.
      
      This is a part of ExactCacheValidationPlan.
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      
      BTW, checkambigatclosing is tested in test-filecache.py, even though
      it doesn't use filecache itself, because filecache assumes that file
      stat ambiguity never occurs (and there is no another test-*.py related
      to filecache).
      57830bd0e787
    • Katsunori FUJIWARA's avatar
      scmutil: factor out common logic of delayclosedfile to reuse it · 0c40e64d6154
      Katsunori FUJIWARA authored
      This is a preparation for the subsequent patch, which adds another
      proxy class for a file object.
      0c40e64d6154
    • Anton Shestakov's avatar
      spartan: remove unused templates · 041a77a223ca
      Anton Shestakov authored
      041a77a223ca
    • Anton Shestakov's avatar
      monoblue: remove unused templates · 9ed9b12d150c
      Anton Shestakov authored
      9ed9b12d150c
    • Anton Shestakov's avatar
      gitweb: remove unused templates · a816857b88b9
      Anton Shestakov authored
      a816857b88b9
    • Anton Shestakov's avatar
      paper: remove unused templates · 266c2195651e
      Anton Shestakov authored
      266c2195651e
  12. Sep 21, 2016
Loading