diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map +++ b/mercurial/templates/gitweb/map @@ -104,6 +104,8 @@ annotateline = '
{node|short}: {desc|escape|firstline}
parents: {parents%annotateparent}
+ diff + changeset
{linenumber}
diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map --- a/mercurial/templates/monoblue/map +++ b/mercurial/templates/monoblue/map @@ -100,6 +100,8 @@ annotateline = '
{node|short}: {desc|escape|firstline}
parents: {parents%annotateparent}
+ diff + changeset
diff --git a/mercurial/templates/paper/map b/mercurial/templates/paper/map --- a/mercurial/templates/paper/map +++ b/mercurial/templates/paper/map @@ -85,6 +85,8 @@ annotateline = '
{node|short}: {desc|escape|firstline}
parents: {parents%annotateparent}
+ diff + changeset
{linenumber} {line|escape} diff --git a/mercurial/templates/spartan/map b/mercurial/templates/spartan/map --- a/mercurial/templates/spartan/map +++ b/mercurial/templates/spartan/map @@ -63,6 +63,8 @@ annotateline = '
{node|short}: {desc|escape|firstline}
parents: {parents%annotateparent}
+ diff + changeset
diff --git a/tests/test-hgweb-symrev.t b/tests/test-hgweb-symrev.t --- a/tests/test-hgweb-symrev.t +++ b/tests/test-hgweb-symrev.t @@ -191,8 +191,12 @@ Set up the repo 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 @@ Set up the repo 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 @@ Set up the repo 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 @@ Set up the repo 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 @@ Set up the repo 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 --git a/tests/test-highlight.t b/tests/test-highlight.t --- a/tests/test-highlight.t +++ b/tests/test-highlight.t @@ -296,6 +296,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    1 #!/usr/bin/env python @@ -306,6 +308,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    2 @@ -316,6 +320,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    3 """Fun with generators. Corresponding Haskell implementation: @@ -326,6 +332,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    4 @@ -336,6 +344,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    5 primes = 2 : sieve [3, 5..] @@ -346,6 +356,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    6 where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0] @@ -356,6 +368,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    7 """ @@ -366,6 +380,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    8 @@ -376,6 +392,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    9 from itertools import dropwhile, ifilter, islice, count, chain @@ -386,6 +404,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    10 @@ -396,6 +416,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    11 def primes(): @@ -406,6 +428,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    12 """Generate all primes.""" @@ -416,6 +440,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    13 def sieve(ns): @@ -426,6 +452,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    14 p = ns.next() @@ -436,6 +464,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    15 # It is important to yield *here* in order to stop the @@ -446,6 +476,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    16 # infinite recursion. @@ -456,6 +488,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    17 yield p @@ -466,6 +500,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    18 ns = ifilter(lambda n: n % p != 0, ns) @@ -476,6 +512,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    19 for n in sieve(ns): @@ -486,6 +524,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    20 yield n @@ -496,6 +536,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    21 @@ -506,6 +548,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    22 odds = ifilter(lambda i: i % 2 == 1, count()) @@ -516,6 +560,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    23 return chain([2], sieve(dropwhile(lambda n: n < 3, odds))) @@ -526,6 +572,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    24 @@ -536,6 +584,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    25 if __name__ == "__main__": @@ -546,6 +596,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    26 import sys @@ -556,6 +608,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    27 try: @@ -566,6 +620,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    28 n = int(sys.argv[1]) @@ -576,6 +632,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    29 except (ValueError, IndexError): @@ -586,6 +644,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    30 n = 10 @@ -596,6 +656,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    31 p = primes() @@ -606,6 +668,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    32 print "The first %d primes: %s" % (n, list(islice(p, n))) @@ -616,6 +680,8 @@ hgweb fileannotate, html
    06824edf55d0: a
    parents:
    + diff + changeset
    33