# HG changeset patch # User Denis Laxalde # Date 1465894890 -7200 # Node ID 4b6afd1b445ad6b4aba92054e14db1e77f69fc71 # Parent 9c37df3474859af03d1ea8d07e71514bc4ea7d23 hgweb: add links to diff and changeset in hover-box on annotate view diff -r 9c37df347485 -r 4b6afd1b445a mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map Tue Jun 28 11:42:42 2016 +0200 +++ b/mercurial/templates/gitweb/map Tue Jun 14 11:01:30 2016 +0200 @@ -104,6 +104,8 @@
{node|short}: {desc|escape|firstline}
parents: {parents%annotateparent}
+ diff + changeset
{linenumber}
diff -r 9c37df347485 -r 4b6afd1b445a mercurial/templates/monoblue/map --- a/mercurial/templates/monoblue/map Tue Jun 28 11:42:42 2016 +0200 +++ b/mercurial/templates/monoblue/map Tue Jun 14 11:01:30 2016 +0200 @@ -100,6 +100,8 @@
{node|short}: {desc|escape|firstline}
parents: {parents%annotateparent}
+ diff + changeset
diff -r 9c37df347485 -r 4b6afd1b445a mercurial/templates/paper/map --- a/mercurial/templates/paper/map Tue Jun 28 11:42:42 2016 +0200 +++ b/mercurial/templates/paper/map Tue Jun 14 11:01:30 2016 +0200 @@ -85,6 +85,8 @@
{node|short}: {desc|escape|firstline}
parents: {parents%annotateparent}
+ diff + changeset
{linenumber} {line|escape} diff -r 9c37df347485 -r 4b6afd1b445a mercurial/templates/spartan/map --- a/mercurial/templates/spartan/map Tue Jun 28 11:42:42 2016 +0200 +++ b/mercurial/templates/spartan/map Tue Jun 14 11:01:30 2016 +0200 @@ -63,6 +63,8 @@
{node|short}: {desc|escape|firstline}
parents: {parents%annotateparent}
+ diff + changeset
diff -r 9c37df347485 -r 4b6afd1b445a tests/test-hgweb-symrev.t --- a/tests/test-hgweb-symrev.t Tue Jun 28 11:42:42 2016 +0200 +++ b/tests/test-hgweb-symrev.t Tue Jun 14 11:01:30 2016 +0200 @@ -191,8 +191,12 @@ 43c799df6e75 9d8c40cba617 + diff + changeset 0 + diff + changeset $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=paper' | egrep $REVLINKS
  • log
  • @@ -380,8 +384,12 @@ 43c799df6e75 9d8c40cba617 + diff + changeset 0 + diff + changeset $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=coal' | egrep $REVLINKS
  • log
  • @@ -619,8 +627,12 @@ 9d8c40cba617 + diff + changeset 0 + diff + changeset $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=gitweb' | egrep $REVLINKS files | @@ -836,8 +848,12 @@ 9d8c40cba617 + diff + changeset 0 + diff + changeset $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=monoblue' | egrep $REVLINKS
  • graph
  • @@ -1034,8 +1050,12 @@ 9d8c40cba617 + diff + changeset 0 + diff + changeset $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=spartan' | egrep $REVLINKS changelog diff -r 9c37df347485 -r 4b6afd1b445a tests/test-highlight.t --- a/tests/test-highlight.t Tue Jun 28 11:42:42 2016 +0200 +++ b/tests/test-highlight.t Tue Jun 14 11:01:30 2016 +0200 @@ -296,6 +296,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    1 #!/usr/bin/env python @@ -306,6 +308,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    2 @@ -316,6 +320,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    3 """Fun with generators. Corresponding Haskell implementation: @@ -326,6 +332,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    4 @@ -336,6 +344,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    5 primes = 2 : sieve [3, 5..] @@ -346,6 +356,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    6 where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0] @@ -356,6 +368,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    7 """ @@ -366,6 +380,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    8 @@ -376,6 +392,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    9 from itertools import dropwhile, ifilter, islice, count, chain @@ -386,6 +404,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    10 @@ -396,6 +416,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    11 def primes(): @@ -406,6 +428,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    12 """Generate all primes.""" @@ -416,6 +440,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    13 def sieve(ns): @@ -426,6 +452,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    14 p = ns.next() @@ -436,6 +464,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    15 # It is important to yield *here* in order to stop the @@ -446,6 +476,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    16 # infinite recursion. @@ -456,6 +488,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    17 yield p @@ -466,6 +500,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    18 ns = ifilter(lambda n: n % p != 0, ns) @@ -476,6 +512,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    19 for n in sieve(ns): @@ -486,6 +524,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    20 yield n @@ -496,6 +536,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    21 @@ -506,6 +548,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    22 odds = ifilter(lambda i: i % 2 == 1, count()) @@ -516,6 +560,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    23 return chain([2], sieve(dropwhile(lambda n: n < 3, odds))) @@ -526,6 +572,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    24 @@ -536,6 +584,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    25 if __name__ == "__main__": @@ -546,6 +596,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    26 import sys @@ -556,6 +608,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    27 try: @@ -566,6 +620,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    28 n = int(sys.argv[1]) @@ -576,6 +632,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    29 except (ValueError, IndexError): @@ -586,6 +644,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    30 n = 10 @@ -596,6 +656,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    31 p = primes() @@ -606,6 +668,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    32 print "The first %d primes: %s" % (n, list(islice(p, n))) @@ -616,6 +680,8 @@
    06824edf55d0: a
    parents:
    + diff + changeset
    33