Skip to content
Snippets Groups Projects
  1. Mar 30, 2017
    • Pierre-Yves David's avatar
      run-tests: auto-replace 'TXNID' output · 728d3735
      Pierre-Yves David authored
      Hooks related to the transaction are aware of the transaction id. By definition
      this txn-id is unique and different for each transaction. As a result it can
      never be predicted in test and always needs matching. As a result, touching any
      like with this data is annoying. We solve the problem once and for all by
      installing an automatic replacement. In test, this will now show as:
      
        TXNID=TXN:$ID$
      728d3735
  2. Mar 31, 2017
  3. Mar 30, 2017
  4. Apr 01, 2017
    • Matt Harbison's avatar
      templatefilter: add support for 'long' to json() · 35eb8f11
      Matt Harbison authored
      When disabling the '#requires serve' check in test-hgwebdir.t and running it on
      Windows, several 500 errors popped up when querying '?style=json', with the
      following in the error log:
      
          File "...\\mercurial\\templater.py", line 393, in runfilter
            "keyword '%s'") % (filt.func_name, dt))
          Abort: template filter 'json' is not compatible with keyword 'lastchange'
      
      The swallowed exception at that point was:
      
          File "...\\mercurial\\templatefilters.py", line 242, in json
            raise TypeError('cannot encode type %s' % obj.__class__.__name__)
          TypeError: cannot encode type long
      
      This corresponds to 'lastchange' being populated by hgweb.common.get_stat(),
      which uses os.stat().st_mtime.  os.stat_float_times() is being disabled in util,
      so the type for the times is 'long' on Windows, and 'int' on Linux.
      35eb8f11
  5. Mar 30, 2017
    • Denis Laxalde's avatar
      hgweb: prefix line id by ctx shortnode in filelog when patches are shown · 6be6e4be
      Denis Laxalde authored
      When "patch" query parameter is present in requests to filelog view, line ids
      in patches diff are no longer unique in the page since several patches are
      shown on the same page. We now prefix line id by changeset shortnode when
      several patches are displayed in the same page to have unique line ids
      overall.
      6be6e4be
  6. Mar 29, 2017
  7. Mar 26, 2017
  8. Mar 30, 2017
    • Gregory Szorc's avatar
      minirst: remove redundant _admonitions set · bbf7a29d
      Gregory Szorc authored
      As Yuya pointed out during a review a month ago, _admonitions and
      _admonitiontitles are largely redundant. With the last commit, they
      are exactly redundant. So, remove _admonitions and use
      _admonitiontitles.keys() instead.
      bbf7a29d
    • Gregory Szorc's avatar
      minirst: remove "admonition" from _admonitions · 32a563a0
      Gregory Szorc authored
      The "admonition" rst primitive is split into "specific" admonitions
      ("attention," "caution," etc) and the "generic" admonition
      ("admonition"). For more, see
      http://docutils.sourceforge.net/docs/ref/rst/directives.html#admonitions
      
      The _admonitions set and keys of the _admonitiontitles dict
      overlap exactly except _admonitions has an "admonition" entry.
      Nowhere in Mercurial is the "admonition" admonition directive used.
      Even if it were, it doesn't have a title, so it wouldn't be rendered
      correctly.
      
      So, let's remove "admonition" from the set of recognized admonition
      directives.
      32a563a0
    • Gregory Szorc's avatar
      minirst: reindent _admonitiontitles · b3640334
      Gregory Szorc authored
      I don't like the verical indent.
      
      While I was here, I cleaned up some whitespace and added a trailing
      comma on the last element.
      b3640334
  9. Mar 28, 2017
  10. Mar 29, 2017
    • Denis Laxalde's avatar
      hgweb: fix diff hunks filtering by line range in webutil.diffs() · cbe0bea8
      Denis Laxalde authored
      The previous clause for filter out a diff hunk was too restrictive. We need to
      consider the following cases (assuming linerange=(lb, ub) and the @s2,l2
      hunkrange):
      
                  <-(s2)--------(s2+l2)->
            <-(lb)---(ub)->
                     <-(lb)---(ub)->
                                 <-(lb)---(ub)->
      
      previously on the first and last situations were considered.
      
      In test-hgweb-filelog.t, add a couple of lines at the beginning of file "b" so
      that the line range we will follow does not start at the beginning of file.
      This covers the change in aforementioned diff hunk filter clause.
      cbe0bea8
  11. Mar 25, 2017
Loading