##// END OF EJS Templates
rebase: skip resolved but emptied revisions...
rebase: skip resolved but emptied revisions When rebasing, if a conflict occurs and is resolved in a way the rebased revision becomes empty, it is not skipped, unlike revisions being emptied without conflicts. The reason is: - File 'x' is merged and resolved, merge.update() marks it as 'm' in the dirstate. - rebase.concludenode() calls localrepo.commit(), which calls localrepo.status() which calls dirstate.status(). 'x' shows up as 'm' and is unconditionnally added to the modified files list, instead of being checked again. - localrepo.commit() detects 'x' as changed an create a new revision where only the manifest parents and linkrev differ. Marking 'x' as modified without checking it makes sense for regular merges. But in rebase case, the merge looks normal but the second parent is usually discarded. When this happens, 'm' files in dirstate are a bit irrelevant and should be considered 'n' possibly dirty instead. That is what the current patch does. Another approach, maybe more efficient, would be to pass another flag to merge.update() saying the 'branchmerge' is a bit of a lie and recordupdate() should call dirstate.normallookup() instead of merge(). It is also tempting to add this logic to dirstate.setparents(), moving from two to one parent is what invalidates the 'm' markers. But this is a far bigger change to make. v2: succumb to the temptation and move the logic in dirstate.setparents(). mpm suggested trying _filecommit() first but it is called by commitctx() which knows nothing about the dirstate and comes too late into the game. A second approach was to rewrite the 'm' state into 'n' on the fly in dirstate.status() which failed for graft in the following case: $ hg init repo $ cd repo $ echo a > a $ hg ci -qAm0 $ echo a >> a $ hg ci -m1 $ hg up 0 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg mv a b $ echo c > b $ hg ci -m2 created new head $ hg graft 1 --tool internal:local grafting revision 1 $ hg --config extensions.graphlog= glog --template '{rev} {desc|firstline}\n' @ 3 1 | o 2 2 | | o 1 1 |/ o 0 0 $ hg log -r 3 --debug --patch --git --copies changeset: 3:19cd7d1417952af13161b94c32e901769104560c tag: tip phase: draft parent: 2:b5c505595c9e9a12d5dd457919c143e05fc16fb8 parent: -1:0000000000000000000000000000000000000000 manifest: 3:3d27ce8d02241aa59b60804805edf103c5c0cda4 user: test date: Thu Jan 01 00:00:00 1970 +0000 extra: branch=default extra: source=a03df74c41413a75c0a42997fc36c2de97b26658 description: 1 Here, revision 3 is created because there is a copy record for 'b' in the dirstate and thus 'b' is considered modified. But this information is discarded at commit time since 'b' content is unchanged. I do not know if discarding this information is correct or not, but at this time we cannot represent it anyway. This patch therefore implements the last solution of moving the logic into dirstate.setparents(). It does not sound crazy as 'm' files makes no sense with only one parent. It also makes dirstate.merge() calls .lookupnormal() if there is one parent, to preserve the invariant. I am a bit concerned about introducing this kind of stateful behaviour to existing code which historically treated setparents() as a basic setter without side-effects. And doing that during the code freeze.

File last commit:

r15375:fe9d36a6 stable
r16509:eab9119c stable
Show More
map
240 lines | 10.1 KiB | text/plain | TextLexer
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 default = 'summary'
mimetype = 'text/html; charset={encoding}'
header = header.tmpl
footer = footer.tmpl
search = search.tmpl
changelog = changelog.tmpl
summary = summary.tmpl
error = error.tmpl
notfound = notfound.tmpl
Augie Fackler
web: add a help view for getting hg help output
r12666
help = help.tmpl
helptopics = helptopics.tmpl
helpentry = '<tr><td><a href="{url}help/{topic|escape}{sessionvars%urlparameter}">{topic|escape}</a></td><td>{summary|escape}</td></tr>'
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a>'
filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
filenodelink = '
<tr class="parity{parity}">
<td><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td>
<td></td>
<td>
<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
</td>
</tr>'
filenolink = '
<tr class="parity{parity}">
Steven Brown
monoblue: improve readability of the filenolink template...
r14307 <td><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td>
<td></td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <td>
Steven Brown
monoblue: improve readability of the filenolink template...
r14307 file |
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 annotate |
<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
</td>
</tr>'
Nicolas Dumazet
hgweb: changenav: separate pages before and after the current position...
r10254
nav = '{before%naventry} {after%naventry}'
navshort = '{before%navshortentry}{after%navshortentry}'
navgraph = '{before%navgraphentry}{after%navgraphentry}'
filenav = '{before%filenaventry}{after%filenaventry}'
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 fileellipses = '...'
changelogentry = changelogentry.tmpl
searchentry = changelogentry.tmpl
changeset = changeset.tmpl
manifest = manifest.tmpl
direntry = '
<tr class="parity{parity}">
<td>drwxr-xr-x</td>
<td></td>
<td></td>
<td><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td>
<td><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></td>
</tr>'
fileentry = '
<tr class="parity{parity}">
<td>{permissions|permissions}</td>
<td>{date|isodate}</td>
<td>{size}</td>
<td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td>
<td>
<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
</td>
</tr>'
filerevision = filerevision.tmpl
fileannotate = fileannotate.tmpl
filediff = filediff.tmpl
filelog = filelog.tmpl
fileline = '
<div style="font-family:monospace" class="parity{parity}">
<pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</pre>
</div>'
annotateline = '
<tr class="parity{parity}">
<td class="linenr">
<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#{targetline}"
Augie Fackler
web: add a help view for getting hg help output
r12666 title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </td>
<td class="lineno">
<a href="#{lineid}" id="{lineid}">{linenumber}</a>
</td>
<td class="source">{line|escape}</td>
</tr>'
difflineplus = '<span style="color:#008800;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
difflineminus = '<span style="color:#cc0000;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
difflineat = '<span style="color:#990099;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
diffline = '<span><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
changelogparent = '
<tr>
<th class="parent">parent {rev}:</th>
<td class="parent">
<a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
</td>
</tr>'
changesetbranch = '<dt>branch</dt><dd>{name}</dd>'
changesetparent = '
<dt>parent {rev}</dt>
<dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
filerevbranch = '<dt>branch</dt><dd>{name}</dd>'
filerevparent = '
<dt>parent {rev}</dt>
<dd>
<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
{rename%filerename}{node|short}
</a>
</dd>'
filerename = '{file|escape}@'
filelogrename = '| <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">base</a>'
fileannotateparent = '
<dt>parent {rev}</dt>
<dd>
<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
{rename%filerename}{node|short}
</a>
</dd>'
changelogchild = '
<dt>child {rev}:</dt>
<dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
changesetchild = '
<dt>child {rev}</dt>
<dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
filerevchild = '
<dt>child {rev}</dt>
<dd>
<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
</dd>'
fileannotatechild = '
<dt>child {rev}</dt>
<dd>
<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
</dd>'
tags = tags.tmpl
tagentry = '
<tr class="parity{parity}">
Brodie Rao
hgweb: fix dynamic date calculation not working under Safari...
r15375 <td class="nowrap age">{date|rfc822date}</td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{tag|escape}</a></td>
<td class="nowrap">
<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
<a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
Yuya Nishihara
hgweb: add separate bookmarks listing to monoblue theme (based on 38c9837b1f75)
r13860 bookmarks = bookmarks.tmpl
bookmarkentry = '
<tr class="parity{parity}">
Brodie Rao
hgweb: fix dynamic date calculation not working under Safari...
r15375 <td class="nowrap date">{date|rfc822date}</td>
Yuya Nishihara
hgweb: add separate bookmarks listing to monoblue theme (based on 38c9837b1f75)
r13860 <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{bookmark|escape}</a></td>
<td class="nowrap">
<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
<a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 branches = branches.tmpl
branchentry = '
<tr class="parity{parity}">
Brodie Rao
hgweb: fix dynamic date calculation not working under Safari...
r15375 <td class="nowrap age">{date|rfc822date}</td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <td><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
<td class="{status}">{branch|escape}</td>
<td class="nowrap">
<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
<a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
diffblock = '<pre>{lines}</pre>'
filediffparent = '
<dt>parent {rev}</dt>
<dd><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></dd>'
filelogparent = '
<tr>
<td align="right">parent {rev}:&nbsp;</td>
<td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
</tr>'
filediffchild = '
<dt>child {rev}</dt>
<dd><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></dd>'
filelogchild = '
<tr>
<td align="right">child {rev}:&nbsp;</td>
<td><a href="{url}file{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
</tr>'
shortlog = shortlog.tmpl
tagtag = '<span class="tagtag" title="{name}">{name}</span> '
branchtag = '<span class="branchtag" title="{name}">{name}</span> '
inbranchtag = '<span class="inbranchtag" title="{name}">{name}</span> '
Yuya Nishihara
hgweb: add bookmark labels to monoblue theme (based on 270f57d35525)
r13794 bookmarktag = '<span class="bookmarktag" title="{name}">{name}</span> '
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 shortlogentry = '
<tr class="parity{parity}">
Brodie Rao
hgweb: fix dynamic date calculation not working under Safari...
r15375 <td class="nowrap age">{date|rfc822date}</td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <td>{author|person}</td>
<td>
<a href="{url}rev/{node|short}{sessionvars%urlparameter}">
{desc|strip|firstline|escape|nonempty}
Yuya Nishihara
hgweb: add bookmark labels to monoblue theme (based on 270f57d35525)
r13794 <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </a>
</td>
<td class="nowrap">
<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
</td>
</tr>'
filelogentry = '
<tr class="parity{parity}">
Brodie Rao
hgweb: fix dynamic date calculation not working under Safari...
r15375 <td class="nowrap age">{date|rfc822date}</td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></td>
<td class="nowrap">
<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>&nbsp;|&nbsp;<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>&nbsp;|&nbsp;<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
{rename%filelogrename}
</td>
</tr>'
archiveentry = '<li><a href="{url}archive/{node|short}{extension}">{type|escape}</a></li>'
indexentry = '
<tr class="parity{parity}">
<td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
<td>{description}</td>
<td>{contact|obfuscate}</td>
Brodie Rao
hgweb: fix dynamic date calculation not working under Safari...
r15375 <td class="age">{lastchange|rfc822date}</td>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <td class="indexlinks">{archives%indexarchiveentry}</td>
<td>
<div class="rss_logo">
<a href="{url}rss-log">RSS</a>
<a href="{url}atom-log">Atom</a>
</div>
</td>
</tr>\n'
indexarchiveentry = '<a href="{url}archive/{node|short}{extension}">{type|escape}</a> '
index = index.tmpl
urlparameter = '{separator}{name}={value|urlescape}'
hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
graph = graph.tmpl