Skip to content
Snippets Groups Projects
  1. Oct 06, 2015
  2. Oct 04, 2015
    • Katsunori FUJIWARA's avatar
      keyword: make restrict mode False while updating files for rollback · b3188339
      Katsunori FUJIWARA authored
      This is a preparation for using 'repo.rollback()' instead of aborting
      a current running transaction for "shelve" and "unshelve".
      
      Before this patch, updating files as a part of 'repo.rollback()'
      overridden by keyword extension always follows 'restrict' mode of the
      command currently executed.
      
      "merge", "unshelve" and so on should be 'restrict'-ed, because keyword
      expansion may cause unexpected conflicts at merging while these
      commands.
      
      But, if 'repo.rollback()' is invoked while executing 'restrict'-ed
      commands, modified files in the working directory are marked as
      "CLEAN" unexpectedly by code path below:
      
              # 'lookup' below is True at updating modified files for rollback
              kwcmd = self.restrict and lookup # kwexpand/kwshrink
                  :
                      if kwcmd:
                          self.repo.dirstate.normal(f)
      
      On the other hand, "rollback" command isn't 'restrict'-ed, because
      rollbacking itself doesn't imply merging.
      
      Therefore, disabling 'restrict' mode while updating files as a part of
      'repo.rollback()' regardless of current 'restrict' mode should be
      reasonable.
      b3188339
  3. Oct 03, 2015
    • Yuya Nishihara's avatar
      pager: recreate stdout to make it line-buffered · 62c5e937
      Yuya Nishihara authored
      We want to see partial command results as soon as possible. But the buffering
      mode of stdout (= pager's stdin) was set to fully-buffered because it isn't
      associated with a tty. So, this patch recreates new stdout object to force its
      buffering mode.
      
      Because two file objects are associated with the same stdout fd and their
      destructors will call close(), one of them must be closed carefully. Python
      expects that the stdout fd never be closed even after sys.stdout.close() [1],
      but newstdout has no such hack. So this patch calls newstdout.close()
      immediately before duplicating the original stdout fd to sys.stdout.
      
        operation              sys.stdout  newstdout  fd
        ---------------------  ----------  ---------  --------
        newstdout.close()      open        closed     closed
        os.dup2(stdoutfd, ..)  open        closed     open
        del sys.stdout         closed      closed     open [1]
      
       [1]: https://hg.python.org/cpython/file/v2.7.10/Python/sysmodule.c#l1391
      62c5e937
    • Yuya Nishihara's avatar
      pager: rename variables of backup fds · 1a257841
      Yuya Nishihara authored
      The next patch will add backup file objects, so the original variable names
      would be confusing.
      1a257841
    • Yuya Nishihara's avatar
      pager: inline _pagersubprocess() into _runpager() · 499d5c98
      Yuya Nishihara authored
      We don't need _pagersubprocess() because the fork version was removed
      at 59d794154e8d.
      499d5c98
  4. Oct 01, 2015
  5. Sep 30, 2015
  6. Sep 26, 2015
  7. Sep 24, 2015
  8. Sep 15, 2015
    • Laurent Charignon's avatar
      rebase: don't rebase obsolete commit whose successor is already rebased · 92409f8d
      Laurent Charignon authored
      This patch avoids unnecessary conflicts to resolve during rebase for the users
      of changeset evolution.
      
      This patch modifies rebase to skip obsolete commits if they are being rebased on
      their successors.
      It introduces a new rebase state 'revprecursor' for these revisions that are
      being skipped and a new message to inform the user of what is happening.
      This feature is gated behind the config flag experimental.rebaseskipobsolete
      
      When an obsolete commit is skipped, the output is:
      not rebasing 14:9ad579b4a5de "I", already in destination as 17:fc37a630c901 "K"
      92409f8d
  9. Sep 24, 2015
  10. Sep 17, 2015
  11. Sep 20, 2015
  12. Sep 16, 2015
    • Anton Shestakov's avatar
      highlight: add highlightfiles config option which takes a fileset (issue3005) · 3166bcc0
      Anton Shestakov authored
      Highlight extension lacked a way to limit files by size, by extension, and/or
      by any other part of file path. A good solution would be to use a fileset,
      since it can check file path, extension and size (and more) in one expression.
      So this change introduces such an option, highlighfiles, which takes a fileset
      and on each request decides if the requested file should be highlighted.
      
      The default "size('<5M')" is, in a way, suggested in issue3005.
      
      checkfctx() limits the amount of work to just one file (subset kwarg in
      fileset.matchctx()).
      
      Monkey-patching works around issue4568, otherwise using filesets here while
      running hgweb in directory mode would say, for example, "Abort: **.py not under
      root", but this fix is very local and probably far from ideal. I suspect there
      to be a way to fix this for the whole hgweb and resolve the issue, but I don't
      know how to do it.
      3166bcc0
  13. Aug 27, 2015
    • Augie Fackler's avatar
      histedit: use one editor when multiple folds happen in a row (issue3524) (BC) · bf81b696
      Augie Fackler authored
      This was the first ever feature request for histedit, originally filed
      back on April 4, 2009. Finally fixed.
      
      In the future we'll probably want to make it possible for other
      preprocessing steps to be added to the list, but for now we're
      skipping that because it's unclear what the API should look like
      without a proposed consumer.
      bf81b696
  14. Sep 10, 2015
    • Matt Harbison's avatar
      extdiff: enable -I/-X with --patch · d1530c6e
      Matt Harbison authored
      Not sure how useful this really is, but it's trivial to add and ignoring the
      existing arguments supported seems like a bad UI.
      d1530c6e
    • Matt Harbison's avatar
      extdiff: add a --patch argument for diffing changeset deltas · 0fd20a71
      Matt Harbison authored
      One of the things I missed the most when transitioning from versioned MQ to
      evolve was the loss of being able to check that rebase conflicts were properly
      resolved by:
      
        $ hg ci --mq -m "before"
        $ hg rebase -s qbase -d tip
        $ hg bcompare --mq
      
      The old csets stay in the tree with evolve, but a straight diff includes all of
      the other changes that were pulled in, obscuring the code that was rebased.
      Diffing deltas can be confusing, but unless radical changes were made during the
      resolve, it is very clear when individual hunks are added, dropped or modified.
      Unlike the MQ technique, this can only compare a single pair of csets/patches at
      a time.  Like the MQ method, this also highlights changes in the commit comment
      and other metadata.
      
      I originally tried monkey patching from the evolve extension, but that is too
      complicated given that it depends on the order the two different extensions are
      loaded.  This functionality is also useful when comparing grafts however, so
      implementing it in the core is more than just convenience.
      
      The --change argument doesn't make much sense for this, but it isn't harmful so
      I didn't bother blocking it.  The -I/-X options are ignored because of a
      limitation of cmdutil.export().  We'll fix that next.
      0fd20a71
    • Matt Harbison's avatar
      extdiff: prepare sections of dodiff() for conditionalizing · 611ba118
      Matt Harbison authored
      This is purely indenting under an unconditional branch, so that the actual
      changes in the next patch are clear.  Feel free to fold them if desired.
      611ba118
  15. Sep 09, 2015
  16. Sep 07, 2015
    • Durham Goode's avatar
      blackbox: add pid to output · e8f9dffc
      Durham Goode authored
      This adds the process id to the line header for the blackbox output. This is
      useful for distinguishing processes when using the blackbox on a server and many
      processes are writing to the blackbox at once.
      e8f9dffc
  17. Aug 28, 2015
  18. Sep 01, 2015
    • liscju's avatar
      rebase: fix warning about ignoring tool option on rebase continue (issue4698) · 927c0d84
      liscju authored
      Before this patch rebase --continue with specified --tool option outputs
      warnings "tool option will be ignored". It is false statement because
      in case of any merge conflicts it uses specified tool to resolve it.
      
      This patch makes this warning appears only when user specified --tool
      when running rebase --abort , in this case tool doesn't have any
      sense
      927c0d84
  19. Sep 03, 2015
  20. Aug 28, 2015
  21. Aug 25, 2015
    • Durham Goode's avatar
      convert: fix syncing deletes from p2 merge commit · 5ca58734
      Durham Goode authored
      Recently we fixed converting merges to correctly sync changes from p2. We missed
      the case of deletes though (so p2 deleted a file that p1 had not yet deleted,
      and the file does not belong to the source).
      
      The fix is to detect when p2 doesn't have the file, so we just sync it as a
      delete to p1 in the merge.
      
      Updated the test, and verified it failed before the fix.
      5ca58734
Loading