tests/test-hgweb-diffs.t
changeset 16727 3e24ce3de5f1
parent 16722 7bf48bc7de23
child 16913 f2719b387380
equal deleted inserted replaced
16723:68da5ae6e470 16727:3e24ce3de5f1
    11   adding b
    11   adding b
    12 
    12 
    13 change permissions for git diffs
    13 change permissions for git diffs
    14 
    14 
    15   $ chmod +x a
    15   $ chmod +x a
       
    16   $ hg rm b
    16   $ hg ci -Amb
    17   $ hg ci -Amb
    17 
    18 
    18 set up hgweb
    19 set up hgweb
    19 
    20 
    20   $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
    21   $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
    88    <th class="author">parents</th>
    89    <th class="author">parents</th>
    89    <td class="author"></td>
    90    <td class="author"></td>
    90   </tr>
    91   </tr>
    91   <tr>
    92   <tr>
    92    <th class="author">children</th>
    93    <th class="author">children</th>
    93    <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
    94    <td class="author"> <a href="/rev/559edbd9ed20">559edbd9ed20</a></td>
    94   </tr>
    95   </tr>
    95   <tr>
    96   <tr>
    96    <th class="files">files</th>
    97    <th class="files">files</th>
    97    <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
    98    <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
    98   </tr>
    99   </tr>
   175   +b
   176   +b
   176   
   177   
   177 
   178 
   178 diff removed file
   179 diff removed file
   179 
   180 
   180   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
   181   $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/b'
   181   200 Script output follows
   182   200 Script output follows
   182   
   183   
   183   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   184   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
   184   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   185   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
   185   <head>
   186   <head>
   186   <link rel="icon" href="/static/hgicon.png" type="image/png" />
   187   <link rel="icon" href="/static/hgicon.png" type="image/png" />
   187   <meta name="robots" content="index, nofollow" />
   188   <meta name="robots" content="index, nofollow" />
   188   <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
   189   <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
   189   <script type="text/javascript" src="/static/mercurial.js"></script>
   190   <script type="text/javascript" src="/static/mercurial.js"></script>
   190   
   191   
   191   <title>test: a diff</title>
   192   <title>test: b diff</title>
   192   </head>
   193   </head>
   193   <body>
   194   <body>
   194   
   195   
   195   <div class="container">
   196   <div class="container">
   196   <div class="menu">
   197   <div class="menu">
   197   <div class="logo">
   198   <div class="logo">
   198   <a href="http://mercurial.selenic.com/">
   199   <a href="http://mercurial.selenic.com/">
   199   <img src="/static/hglogo.png" alt="mercurial" /></a>
   200   <img src="/static/hglogo.png" alt="mercurial" /></a>
   200   </div>
   201   </div>
   201   <ul>
   202   <ul>
   202   <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
   203   <li><a href="/shortlog/559edbd9ed20">log</a></li>
   203   <li><a href="/graph/78e4ebad7cdf">graph</a></li>
   204   <li><a href="/graph/559edbd9ed20">graph</a></li>
   204   <li><a href="/tags">tags</a></li>
   205   <li><a href="/tags">tags</a></li>
   205   <li><a href="/bookmarks">bookmarks</a></li>
   206   <li><a href="/bookmarks">bookmarks</a></li>
   206   <li><a href="/branches">branches</a></li>
   207   <li><a href="/branches">branches</a></li>
   207   </ul>
   208   </ul>
   208   <ul>
   209   <ul>
   209   <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
   210   <li><a href="/rev/559edbd9ed20">changeset</a></li>
   210   <li><a href="/file/78e4ebad7cdf">browse</a></li>
   211   <li><a href="/file/559edbd9ed20">browse</a></li>
   211   </ul>
   212   </ul>
   212   <ul>
   213   <ul>
   213   <li><a href="/file/78e4ebad7cdf/a">file</a></li>
   214   <li><a href="/file/559edbd9ed20/b">file</a></li>
   214   <li><a href="/file/tip/a">latest</a></li>
   215   <li><a href="/file/tip/b">latest</a></li>
   215   <li class="active">diff</li>
   216   <li class="active">diff</li>
   216   <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
   217   <li><a href="/annotate/559edbd9ed20/b">annotate</a></li>
   217   <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
   218   <li><a href="/log/559edbd9ed20/b">file log</a></li>
   218   <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
   219   <li><a href="/raw-file/559edbd9ed20/b">raw</a></li>
   219   </ul>
   220   </ul>
   220   <ul>
   221   <ul>
   221   <li><a href="/help">help</a></li>
   222   <li><a href="/help">help</a></li>
   222   </ul>
   223   </ul>
   223   </div>
   224   </div>
   224   
   225   
   225   <div class="main">
   226   <div class="main">
   226   <h2><a href="/">test</a></h2>
   227   <h2><a href="/">test</a></h2>
   227   <h3>diff a @ 1:78e4ebad7cdf</h3>
   228   <h3>diff b @ 1:559edbd9ed20</h3>
   228   
   229   
   229   <form class="search" action="/log">
   230   <form class="search" action="/log">
   230   <p></p>
   231   <p></p>
   231   <p><input name="rev" id="search1" type="text" size="30" /></p>
   232   <p><input name="rev" id="search1" type="text" size="30" /></p>
   232   <div id="hint">find changesets by author, revision,
   233   <div id="hint">find changesets by author, revision,
   244    <th>date</th>
   245    <th>date</th>
   245    <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
   246    <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
   246   </tr>
   247   </tr>
   247   <tr>
   248   <tr>
   248    <th>parents</th>
   249    <th>parents</th>
   249    <td></td>
   250    <td><a href="/file/0cd96de13884/b">0cd96de13884</a> </td>
   250   </tr>
   251   </tr>
   251   <tr>
   252   <tr>
   252    <th>children</th>
   253    <th>children</th>
   253    <td></td>
   254    <td></td>
   254   </tr>
   255   </tr>
   256   </table>
   257   </table>
   257   
   258   
   258   <div class="overflow">
   259   <div class="overflow">
   259   <div class="sourcefirst">   line diff</div>
   260   <div class="sourcefirst">   line diff</div>
   260   
   261   
   261   <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> <span class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   262   <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> <span class="minusline">--- a/b	Thu Jan 01 00:00:00 1970 +0000
   262   </span><a href="#l1.2" id="l1.2">     1.2</a> <span class="plusline">+++ b/a	Thu Jan 01 00:00:00 1970 +0000
   263   </span><a href="#l1.2" id="l1.2">     1.2</a> <span class="plusline">+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   263   </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="atline">@@ -0,0 +1,1 @@
   264   </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="atline">@@ -1,1 +0,0 @@
   264   </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="plusline">+a
   265   </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="minusline">-b
   265   </span></pre></div>
   266   </span></pre></div>
   266   </div>
   267   </div>
   267   </div>
   268   </div>
   268   </div>
   269   </div>
   269   
   270   
   348    <th class="author">parents</th>
   349    <th class="author">parents</th>
   349    <td class="author"></td>
   350    <td class="author"></td>
   350   </tr>
   351   </tr>
   351   <tr>
   352   <tr>
   352    <th class="author">children</th>
   353    <th class="author">children</th>
   353    <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
   354    <td class="author"> <a href="/rev/559edbd9ed20">559edbd9ed20</a></td>
   354   </tr>
   355   </tr>
   355   <tr>
   356   <tr>
   356    <th class="files">files</th>
   357    <th class="files">files</th>
   357    <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
   358    <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
   358   </tr>
   359   </tr>
   461   <div class="logo">
   462   <div class="logo">
   462   <a href="http://mercurial.selenic.com/">
   463   <a href="http://mercurial.selenic.com/">
   463   <img src="/static/hglogo.png" alt="mercurial" /></a>
   464   <img src="/static/hglogo.png" alt="mercurial" /></a>
   464   </div>
   465   </div>
   465   <ul>
   466   <ul>
   466   <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
   467   <li><a href="/shortlog/559edbd9ed20">log</a></li>
   467   <li><a href="/graph/78e4ebad7cdf">graph</a></li>
   468   <li><a href="/graph/559edbd9ed20">graph</a></li>
   468   <li><a href="/tags">tags</a></li>
   469   <li><a href="/tags">tags</a></li>
   469   <li><a href="/bookmarks">bookmarks</a></li>
   470   <li><a href="/bookmarks">bookmarks</a></li>
   470   <li><a href="/branches">branches</a></li>
   471   <li><a href="/branches">branches</a></li>
   471   </ul>
   472   </ul>
   472   <ul>
   473   <ul>
   473   <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
   474   <li><a href="/rev/559edbd9ed20">changeset</a></li>
   474   <li><a href="/file/78e4ebad7cdf">browse</a></li>
   475   <li><a href="/file/559edbd9ed20">browse</a></li>
   475   </ul>
   476   </ul>
   476   <ul>
   477   <ul>
   477   <li><a href="/file/78e4ebad7cdf/a">file</a></li>
   478   <li><a href="/file/559edbd9ed20/a">file</a></li>
   478   <li><a href="/file/tip/a">latest</a></li>
   479   <li><a href="/file/tip/a">latest</a></li>
   479   <li class="active">diff</li>
   480   <li class="active">diff</li>
   480   <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
   481   <li><a href="/annotate/559edbd9ed20/a">annotate</a></li>
   481   <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
   482   <li><a href="/log/559edbd9ed20/a">file log</a></li>
   482   <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
   483   <li><a href="/raw-file/559edbd9ed20/a">raw</a></li>
   483   </ul>
   484   </ul>
   484   <ul>
   485   <ul>
   485   <li><a href="/help">help</a></li>
   486   <li><a href="/help">help</a></li>
   486   </ul>
   487   </ul>
   487   </div>
   488   </div>
   488   
   489   
   489   <div class="main">
   490   <div class="main">
   490   <h2><a href="/">test</a></h2>
   491   <h2><a href="/">test</a></h2>
   491   <h3>diff a @ 1:78e4ebad7cdf</h3>
   492   <h3>diff a @ 1:559edbd9ed20</h3>
   492   
   493   
   493   <form class="search" action="/log">
   494   <form class="search" action="/log">
   494   <p></p>
   495   <p></p>
   495   <p><input name="rev" id="search1" type="text" size="30" /></p>
   496   <p><input name="rev" id="search1" type="text" size="30" /></p>
   496   <div id="hint">find changesets by author, revision,
   497   <div id="hint">find changesets by author, revision,
   520   </table>
   521   </table>
   521   
   522   
   522   <div class="overflow">
   523   <div class="overflow">
   523   <div class="sourcefirst">   line diff</div>
   524   <div class="sourcefirst">   line diff</div>
   524   
   525   
   525   <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> new file mode 100755
   526   <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> old mode 100644
   526   <a href="#l1.2" id="l1.2">     1.2</a> <span class="minusline">--- /dev/null
   527   <a href="#l1.2" id="l1.2">     1.2</a> new mode 100755
   527   </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="plusline">+++ b/a
   528   </pre></div>
   528   </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="atline">@@ -0,0 +1,1 @@
       
   529   </span><a href="#l1.5" id="l1.5">     1.5</a> <span class="plusline">+a
       
   530   </span></pre></div>
       
   531   </div>
   529   </div>
   532   </div>
   530   </div>
   533   </div>
   531   </div>
   534   
   532   
   535   <script type="text/javascript">process_dates()</script>
   533   <script type="text/javascript">process_dates()</script>