Skip to content
Snippets Groups Projects
  1. Jun 28, 2019
  2. Jun 08, 2019
    • Taapas Agrawal's avatar
      statecheck: added support for STATES · 12243f15
      Taapas Agrawal authored
      This removes `STATES` from `state.py` and adds support to
      `statecheck` class to handle its features.
      `getrepostate()` function is modified accordingly.
      
      This adds a method 'cmdutil.addunfinished()' for appending to
      the unfinishedstate list so as to keep 'merge' and 'bisect' at the last.
      
      This also makes two separate message formats for `checkunfinished()` and
      `getrepostate()` as there were previously present.
      
      Results of test changed are shown.
      
      Differential Revision: https://phab.mercurial-scm.org/D6503
      12243f15
  3. Jun 24, 2019
  4. Jun 26, 2019
  5. Jun 27, 2019
    • sliquister's avatar
      update: fix spurious unclean status bug shown by previous commit · d29db0a0
      sliquister authored
      The crux of the problem is:
      - the dirstate is corrupted (the sizes/dates are assigned to the wrong files)
      - because when worker.worker is used with a return value (batchget in
        merge.py here), the return value when worker.worker effectively parallelizes
        is permuted
      - this is because worker.worker's partition of input and combination of output
        values are not inverses of one another: it split [1,2,3,4,5,6] into
        [[1,3,5],[2,4,6]], but combines that into [1,3,5,2,4,6].
      
      Given that worker.worker doesn't call its function argument on contiguous
      chunks on the input arguments, sticking with lists means we'd need to
      know the relation between the inputs of worker.worker function argument
      (for instance, requiring that every input element is mapped to exactly
      one output element). It seems better to instead switch return values to
      dicts, which can combined reliably with a straighforward restriction.
      
      Differential Revision: https://phab.mercurial-scm.org/D6581
      d29db0a0
    • sliquister's avatar
      64a873ca
  6. Jun 24, 2019
  7. Jun 23, 2019
  8. Jun 21, 2019
  9. Jun 22, 2019
  10. Jun 21, 2019
    • Pierre-Yves David's avatar
      bookmarks: actual fix for race condition deleting bookmark · 044045dc
      Pierre-Yves David authored
      This is a simple but efficient fix to prevent the issue tested in
      `test-bookmarks-corner-case.t`. It might be worth pursuing a more generic
      approach where filecache learn to depend on each other, but that would not be
      suitable for stable.
      
      The issue is complicated enough that I documented the race and its current
      solution as inline comment. See this comment for details on the fix.
      044045dc
  11. Jun 19, 2019
  12. Apr 15, 2019
  13. Jun 17, 2019
  14. Apr 19, 2019
    • Martin von Zweigbergk's avatar
      copies: don't filter out copy targets created on other side of merge commit · 35d674a3
      Martin von Zweigbergk authored
      If file X is copied to Y on one side of merge and the other side
      creates Y (no copy), we would not mark that as copy. In the
      changeset-centric pathcopies() version, that was done by checking if
      the copy target existed on the other branch. Even though merge commits
      are pretty uncommon, it still turned out to be too expensive to load
      the manifest of the parents of merge commits. In a repo of
      mozilla-unified converted to storing copies in changesets, about 2m30s
      of `hg debugpathcopies FIREFOX_BETA_59_END FIREFOX_BETA_60_BASE` is
      spent on this check of merge commits.
      
      I tried to think of a way of storing more information in the
      changesets in order to cheaply detect these cases, but I couldn't
      think of a solution. So this patch simply removes those checks.
      
      For reference, these extra copies are reported from the aforementioned
      command after this patch:
      
        browser/base/content/sanitize.js -> browser/modules/Sanitizer.jsm
        testing/mozbase/mozprocess/tests/process_normal_finish_python.ini -> testing/mozbase/mozprocess/tests/process_normal_finish.ini
        testing/mozbase/mozprocess/tests/process_waittimeout_python.ini -> testing/mozbase/mozprocess/tests/process_waittimeout.ini
        testing/mozbase/mozprocess/tests/process_waittimeout_10s_python.ini -> testing/mozbase/mozprocess/tests/process_waittimeout_10s.ini
      
      Since these copies were created on one side of some merge, it still
      seems reasonable to include them, so I'm not even sure it's worse than
      filelog pathcopies(), just different.
      
      Differential Revision: https://phab.mercurial-scm.org/D6420
      35d674a3
  15. Jun 16, 2019
  16. Oct 04, 2018
    • Matt Harbison's avatar
      cat: don't prefetch files unless the output requires it · 561cd02c
      Matt Harbison authored
      It's a waste to cache lfs blobs when cat'ing the raw data at best, but a hassle
      debugging when the blob is missing.  I'm not sure if there are other commands
      that have '{data}' for output, and if there's a general way to prefetch on that
      keyword.
      
      It's interesting that the verbose output seems to leak into the JSON output, but
      that seems like an existing bug.
      561cd02c
  17. Jun 14, 2019
  18. May 27, 2019
    • sliquister's avatar
      merge: fix race that could cause wrong size in dirstate · 87a34c76
      sliquister authored
      The problem is that hg merge/update/etc work the following way:
      1. figure out what files to update
      2. apply the update to disk
      3. apply the update to in-memory dirstate
      4. write dirstate
      
      where step3 looks at the filesystem and assumes it sees the result of
      step2. If a file is changed between step2 and step3, step3 will record
      incorrect information in the dirstate.
      
      I avoid this by passing the size step3 needs directly from step2, for
      the common path (not implemented for change/delete conflicts for
      instance).
      
      I didn't fix the same race for the exec bit for now, because it's less
      likely to be problematic and I had trouble due to the fact that the
      dirstate stores the permissions differently from the manifest (st_mode
      vs '' 'l' 'x'), in combination with tests that pretend that symlinks
      are not supported.
      
      However, I moved the lstat from step3 to step2, which should tighten
      the race window markedly, both for the exec bit and for the mtime.
      
      Differential Revision: https://phab.mercurial-scm.org/D6475
      87a34c76
  19. May 19, 2019
  20. Jun 13, 2019
  21. Jun 12, 2019
    • Ian Moody's avatar
      phabricator: use parents.set to always set dependencies · c19d259f
      Ian Moody authored
      Now that Mercurial's Phabricator instance has been updated to a version that
      supports the parents.set transaction on revision.edit we can use that to set
      dependency relationships in patch stacks instead of abusing the summary.
      This has the advantage that we can use it on every `phabsend` so commit
      reordering is picked up without spamming changes like abusing the summary would,
      and using parents.set will clear previous parents unlike parents.add.
      
      Differential Revision: https://phab.mercurial-scm.org/D6514
      c19d259f
  22. Jun 11, 2019
    • Ian Moody's avatar
      phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings · d3c81439
      Ian Moody authored
      Currently when making VCR recordings one needs to manually sanitise sensitive
      credentials before committing and submitting them as part of tests. It is easy
      to imagine this being accidentally missed one time by a fallible human and said
      credentials being leaked. It is also possible that it wouldn't be noticed to
      alert the user to the leak since the recording files are so large and
      practically unreviewable. Thus do so automatically, so the only place that needs
      checking is in the test-phabricator.t file.
      
      Differential Revision: https://phab.mercurial-scm.org/D6513
      d3c81439
  23. Jun 09, 2019
  24. Jun 07, 2019
  25. Jun 05, 2019
  26. Jun 06, 2019
  27. May 22, 2019
  28. Jun 04, 2019
    • Yuya Nishihara's avatar
      root: add template variables pointing to repository directories · 69883775
      Yuya Nishihara authored
      These paths are useful for GUI applications to detect changes. A GUI process
      typically monitors .hg and .hg/store directories so that it will be notified
      on lock/wlock deletion.
      
      Alternatively, maybe we can add debugpaths command if we don't want to extend
      the root command. I'm not sure which will be nicer.
      69883775
Loading