@@ -32,6 +32,7 @@ from .. import (
pathutil,
pycompat,
templatefilters,
+ templatekw,
ui as uimod,
util,
)
@@ -351,6 +352,9 @@ def linerange(req):
def formatlinerange(fromline, toline):
return '%d:%d' % (fromline + 1, toline)
+def succsandmarkers(repo, ctx):
+ return templatekw.showsuccsandmarkers(repo, ctx)
+
def commonentry(repo, ctx):
node = ctx.node()
return {
@@ -362,6 +366,7 @@ def commonentry(repo, ctx):
'extra': ctx.extra(),
'phase': ctx.phasestr(),
'obsolete': ctx.obsolete(),
+ 'succsandmarkers': lambda **x: succsandmarkers(repo, ctx),
'instabilities': [{"instability": i} for i in ctx.instabilities()],
'branch': nodebranchnodefault(ctx),
'inbranch': nodeinbranch(repo, ctx),
@@ -44,6 +44,7 @@ changeset |
<td>changeset {rev}</td>
<td style="font-family:monospace"><a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
</tr>
+{if(obsolete, '<tr><td>obsolete</td><td>{succsandmarkers%obsfateentry}</td></tr>')}
{ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)}
{child%changesetchild}
</table></div>
@@ -271,6 +271,10 @@ branchtag = '<span class="branchtag" tit
inbranchtag = '<span class="inbranchtag" title="{name|escape}">{name|escape}</span> '
bookmarktag = '<span class="bookmarktag" title="{name|escape}">{name|escape}</span> '
alltags = '<span class="logtags">{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span>'
+obsfatesuccessors = '{if(successors, ' as ')}{join(successors, ', ')}'
+obsfateverb = '{obsfateverb(successors, markers)}'
+obsfateoperations = '{if(obsfateoperations(markers), ' using {join(obsfateoperations(markers), ', ')}')}'
+obsfateentry = '{obsfateverb}{obsfateoperations}{obsfatesuccessors}'
shortlogentry = '
<tr class="parity{parity}">
<td class="age"><i class="age">{date|rfc822date}</i></td>
@@ -48,6 +48,7 @@
{branch%changesetbranch}
<dt>changeset {rev}</dt>
<dd><a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
+ {if(obsolete, '<dt>obsolete</dt><dd>{succsandmarkers%obsfateentry}</dd>')}
{ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)}
{child%changesetchild}
</dl>
@@ -229,6 +229,10 @@ branchtag = '<span class="branchtag" tit
inbranchtag = '<span class="inbranchtag" title="{name|escape}">{name|escape}</span> '
bookmarktag = '<span class="bookmarktag" title="{name|escape}">{name|escape}</span> '
alltags = '<span class="logtags">{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span>'
+obsfatesuccessors = '{if(successors, ' as ')}{join(successors, ', ')}'
+obsfateverb = '{obsfateverb(successors, markers)}'
+obsfateoperations = '{if(obsfateoperations(markers), ' using {join(obsfateoperations(markers), ', ')}')}'
+obsfateentry = '{obsfateverb}{obsfateoperations}{obsfatesuccessors}'
shortlogentry = '
<tr class="parity{parity}">
<td class="nowrap age">{date|rfc822date}</td>
@@ -49,6 +49,10 @@
<th class="date">date</th>
<td class="date age">{date|rfc822date}</td>
</tr>
+{if(obsolete, '<tr>
+ <th>obsolete</th>
+ <td>{succsandmarkers%obsfateentry}</td>
+</tr>')}
<tr>
<th class="author">parents</th>
<td class="author">{ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)}</td>
@@ -209,6 +209,11 @@ changelogbranchhead = '<span class="bran
changelogbranchname = '<span class="branchname">{name|escape}</span> '
alltags = '{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}{bookmarks%changelogtag}'
+obsfatesuccessors = '{if(successors, ' as ')}{join(successors, ', ')}'
+obsfateverb = '{obsfateverb(successors, markers)}'
+obsfateoperations = '{if(obsfateoperations(markers), ' using {join(obsfateoperations(markers), ', ')}')}'
+obsfateentry = '{obsfateverb}{obsfateoperations}{obsfatesuccessors}'
+
filediffparent = '
<tr>
<th class="parent">parent {rev}:</th>
@@ -24,7 +24,7 @@
</tr>')}
{if(obsolete, '<tr>
<th class="obsolete">obsolete:</th>
- <td class="obsolete">yes</td>
+ <td class="obsolete">{succsandmarkers%obsfateentry}</td>
</tr>')}
{ifeq(count(instabilities), '0', '', '<tr>
<th class="instabilities">instabilities:</th>
@@ -39,7 +39,7 @@
</tr>')}
{if(obsolete, '<tr>
<th class="obsolete">obsolete:</th>
- <td class="obsolete">yes</td>
+ <td class="obsolete">{succsandmarkers%obsfateentry}</td>
</tr>')}
{ifeq(count(instabilities), '0', '', '<tr>
<th class="instabilities">instabilities:</th>
@@ -166,6 +166,10 @@ branchentry = '
diffblock = '<pre class="parity{parity}">{lines}</pre>'
changelogtag = '<tr><th class="tag">tag:</th><td class="tag">{tag|escape}</td></tr>'
changesettag = '<tr><th class="tag">tag:</th><td class="tag">{tag|escape}</td></tr>'
+obsfatesuccessors = '{if(successors, ' as ')}{join(successors, ', ')}'
+obsfateverb = '{obsfateverb(successors, markers)}'
+obsfateoperations = '{if(obsfateoperations(markers), ' using {join(obsfateoperations(markers), ', ')}')}'
+obsfateentry = '{obsfateverb}{obsfateoperations}{obsfatesuccessors}'
filediffparent = '
<tr>
<th class="parent">parent {rev}:</th>
@@ -902,6 +902,7 @@ Logs and changes
<th class="date">date</th>
<td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
</tr>
+
<tr>
<th class="author">parents</th>
<td class="author"></td>
@@ -103,6 +103,7 @@ revision
<th class="date">date</th>
<td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
</tr>
+
<tr>
<th class="author">parents</th>
<td class="author"></td>
@@ -381,6 +382,7 @@ revision
<th class="date">date</th>
<td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
</tr>
+
<tr>
<th class="author">parents</th>
<td class="author"></td>
@@ -84,6 +84,7 @@ revision
<th class="date">date</th>
<td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
</tr>
+
<tr>
<th class="author">parents</th>
<td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a> </td>
@@ -1032,7 +1032,19 @@ check obsolete changeset
<span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="obsoletetag" title="obsolete">obsolete</span> </span>
$ get-with-headers.py localhost:$HGPORT 'log?rev=first(obsolete())&style=spartan' | grep 'class="obsolete"'
<th class="obsolete">obsolete:</th>
- <td class="obsolete">yes</td>
+ <td class="obsolete">pruned</td>
+
+check an obsolete changeset that has been rewritten
+ $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=paper' | grep rewritten
+ <td>rewritten as 6:3de5eca88c00</td>
+ $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=coal' | grep rewritten
+ <td>rewritten as 6:3de5eca88c00</td>
+ $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=gitweb' | grep rewritten
+ <tr><td>obsolete</td><td>rewritten as 6:3de5eca88c00</td></tr>
+ $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=monoblue' | grep rewritten
+ <dt>obsolete</dt><dd>rewritten as 6:3de5eca88c00</dd>
+ $ get-with-headers.py localhost:$HGPORT 'rev/cda648ca50f5?style=spartan' | grep rewritten
+ <td class="obsolete">rewritten as 6:3de5eca88c00</td>
check changeset with instabilities