Merge with upstream.

This commit is contained in:
Thomas Arendsen Hein 2005-12-15 15:39:20 +01:00
commit 4df5e527eb
25 changed files with 612 additions and 23 deletions

View File

@ -66,7 +66,7 @@ def walkchangerevs(ui, repo, pats, opts):
window, we first walk forwards to gather data, then in the desired
order (usually backwards) to display it.
This function returns an (iterator, getchange) pair. The
This function returns an (iterator, getchange, matchfn) tuple. The
getchange function returns the changelog entry for a numeric
revision. The iterator yields 3-tuples. They will be of one of
the following forms:
@ -82,10 +82,11 @@ def walkchangerevs(ui, repo, pats, opts):
"iter", rev, None: in-order traversal of the revs earlier iterated
over with "add" - use to display data'''
if repo.changelog.count() == 0:
return [], False
files, matchfn, anypats, cwd = matchpats(repo, pats, opts)
if repo.changelog.count() == 0:
return [], False, matchfn
revs = map(int, revrange(ui, repo, opts['rev'] or ['tip:0']))
wanted = {}
slowpath = anypats
@ -153,7 +154,7 @@ def walkchangerevs(ui, repo, pats, opts):
yield 'add', rev, fns
for rev in nrevs:
yield 'iter', rev, None
return iterate(), getchange
return iterate(), getchange, matchfn
revrangesep = ':'
@ -1117,9 +1118,12 @@ def diff(ui, repo, *pats, **opts):
def doexport(ui, repo, changeset, seqno, total, revwidth, opts):
node = repo.lookup(changeset)
prev, other = repo.changelog.parents(node)
parents = [p for p in repo.changelog.parents(node) if p != nullid]
prev = (parents and parents[0]) or nullid
change = repo.changelog.read(node)
if opts['switch_parent']:
parents.reverse()
fp = make_file(repo, repo.changelog, opts['output'],
node=node, total=total, seqno=seqno,
revwidth=revwidth)
@ -1130,8 +1134,8 @@ def doexport(ui, repo, changeset, seqno, total, revwidth, opts):
fp.write("# User %s\n" % change[1])
fp.write("# Node ID %s\n" % hex(node))
fp.write("# Parent %s\n" % hex(prev))
if other != nullid:
fp.write("# Parent %s\n" % hex(other))
if len(parents) > 1:
fp.write("# Parent %s\n" % hex(parents[1]))
fp.write(change[4].rstrip())
fp.write("\n\n")
@ -1162,6 +1166,9 @@ def export(ui, repo, *changesets, **opts):
Without the -a option, export will avoid generating diffs of files
it detects as binary. With -a, export will generate a diff anyway,
probably with undesirable results.
With the --switch-parent option, the diff will be against the second
parent. It can be useful to review a merge.
"""
if not changesets:
raise util.Abort(_("export requires at least one changeset"))
@ -1281,7 +1288,7 @@ def grep(ui, repo, pattern, *pats, **opts):
fstate = {}
skip = {}
changeiter, getchange = walkchangerevs(ui, repo, pats, opts)
changeiter, getchange, matchfn = walkchangerevs(ui, repo, pats, opts)
count = 0
incrementing = False
for st, rev, fns in changeiter:
@ -1544,7 +1551,7 @@ def log(ui, repo, *pats, **opts):
self.write(*args)
def __getattr__(self, key):
return getattr(self.ui, key)
changeiter, getchange = walkchangerevs(ui, repo, pats, opts)
changeiter, getchange, matchfn = walkchangerevs(ui, repo, pats, opts)
for st, rev, fns in changeiter:
if st == 'window':
du = dui(ui)
@ -1560,7 +1567,7 @@ def log(ui, repo, *pats, **opts):
br = None
if opts['keyword']:
changes = repo.changelog.read(repo.changelog.node(rev))
changes = getchange(rev)
miss = 0
for k in [kw.lower() for kw in opts['keyword']]:
if not (k in changes[1].lower() or
@ -1577,7 +1584,7 @@ def log(ui, repo, *pats, **opts):
show_changeset(du, repo, rev, brinfo=br)
if opts['patch']:
prev = (parents and parents[0]) or nullid
dodiff(du, du, repo, prev, changenode, fns)
dodiff(du, du, repo, prev, changenode, match=matchfn)
du.write("\n\n")
elif st == 'iter':
for args in du.hunk[rev]:
@ -2122,7 +2129,8 @@ def undo(ui, repo):
"""
repo.undo()
def update(ui, repo, node=None, merge=False, clean=False, branch=None):
def update(ui, repo, node=None, merge=False, clean=False, force=None,
branch=None):
"""update or merge working directory
Update the working directory to the specified revision.
@ -2159,7 +2167,7 @@ def update(ui, repo, node=None, merge=False, clean=False, branch=None):
return 1
else:
node = node and repo.lookup(node) or repo.changelog.tip()
return repo.update(node, allow=merge, force=clean)
return repo.update(node, allow=merge, force=clean, forcemerge=force)
def verify(ui, repo):
"""verify the integrity of the repository
@ -2256,7 +2264,8 @@ table = {
"^export":
(export,
[('o', 'output', "", _('print output to file with formatted name')),
('a', 'text', None, _('treat all files as text'))],
('a', 'text', None, _('treat all files as text')),
('', 'switch-parent', None, _('diff against the second parent'))],
"hg export [-a] [-o OUTFILE] REV..."),
"forget":
(forget,
@ -2404,8 +2413,9 @@ table = {
(update,
[('b', 'branch', "", _('checkout the head of a specific branch')),
('m', 'merge', None, _('allow merging of branches')),
('C', 'clean', None, _('overwrite locally modified files'))],
_('hg update [-b TAG] [-m] [-C] [REV]')),
('C', 'clean', None, _('overwrite locally modified files')),
('f', 'force', None, _('force a merge with outstanding changes'))],
_('hg update [-b TAG] [-m] [-C] [-f] [REV]')),
"verify": (verify, [], _('hg verify')),
"version": (show_version, [], _('hg version')),
}

View File

@ -632,6 +632,8 @@ class hgweb(object):
for k,n in i:
yield {"parity": parity,
"tag": k,
"tagmanifest": hex(cl.read(n)[0]),
"date": cl.read(n)[2],
"node": hex(n)}
parity = 1 - parity
@ -639,6 +641,76 @@ class hgweb(object):
manifest=hex(mf),
entries=entries)
def summary(self):
cl = self.repo.changelog
mf = cl.read(cl.tip())[0]
i = self.repo.tagslist()
i.reverse()
def tagentries(**map):
parity = 0
count = 0
for k,n in i:
if k == "tip": # skip tip
continue;
count += 1
if count > 10: # limit to 10 tags
break;
c = cl.read(n)
m = c[0]
t = c[2]
yield self.t("tagentry",
parity = parity,
tag = k,
node = hex(n),
date = t,
tagmanifest = hex(m))
parity = 1 - parity
def changelist(**map):
parity = 0
cl = self.repo.changelog
l = [] # build a list in forward order for efficiency
for i in range(start, end):
n = cl.node(i)
changes = cl.read(n)
hn = hex(n)
t = changes[2]
l.insert(0, self.t(
'shortlogentry',
parity = parity,
author = changes[1],
manifest = hex(changes[0]),
desc = changes[4],
date = t,
rev = i,
node = hn))
parity = 1 - parity
yield l
cl = self.repo.changelog
mf = cl.read(cl.tip())[0]
count = cl.count()
start = max(0, count - self.maxchanges)
end = min(count, start + self.maxchanges)
pos = end - 1
yield self.t("summary",
desc = self.repo.ui.config("web", "description", "unknown"),
owner = (self.repo.ui.config("ui", "username") or # preferred
self.repo.ui.config("web", "contact") or # deprecated
self.repo.ui.config("web", "author", "unknown")), # also
lastchange = (0, 0), # FIXME
manifest = hex(mf),
tags = tagentries,
shortlog = changelist)
def filediff(self, file, changeset):
cl = self.repo.changelog
n = self.repo.lookup(changeset)
@ -798,6 +870,9 @@ class hgweb(object):
elif req.form['cmd'][0] == 'tags':
req.write(self.tags())
elif req.form['cmd'][0] == 'summary':
req.write(self.summary())
elif req.form['cmd'][0] == 'filediff':
req.write(self.filediff(req.form['file'][0], req.form['node'][0]))

View File

@ -1364,7 +1364,7 @@ class localrepository(object):
return
def update(self, node, allow=False, force=False, choose=None,
moddirstate=True):
moddirstate=True, forcemerge=False):
pl = self.dirstate.parents()
if not force and pl[1] != nullid:
self.ui.warn(_("aborting: outstanding uncommitted merges\n"))
@ -1384,6 +1384,18 @@ class localrepository(object):
(c, a, d, u) = self.changes()
if allow and not forcemerge:
if c or a or d:
raise util.Abort(_("outstanding uncommited changes"))
if not forcemerge and not force:
for f in u:
if f in m2:
t1 = self.wread(f)
t2 = self.file(f).read(m2[f])
if cmp(t1, t2) != 0:
raise util.Abort(_("'%s' already exists in the working"
" dir and differs from remote") % f)
# is this a jump, or a merge? i.e. is there a linear path
# from p1 to p2?
linear_path = (pa == p1 or pa == p2)

View File

@ -145,7 +145,7 @@ class ui(object):
os.environ.get("EDITOR", "vi"))
os.environ["HGUSER"] = self.username()
util.system("%s %s" % (editor, name), errprefix=_("edit failed"))
util.system("%s \"%s\"" % (editor, name), errprefix=_("edit failed"))
t = open(name).read()
t = re.sub("(?m)^HG:.*\n", "", t)

View File

@ -0,0 +1,30 @@
#header#
<title>#repo|escape#: Changelog</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / changelog
</div>
<form action="#">
<div class="search">
<input type="hidden" name="repo" value="#repo#" />
<input type="hidden" name="style" value="gitweb" />
<input type="hidden" name="cmd" value="changelog" />
<input type="text" name="rev" />
</div>
</form>
</div>
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | changelog | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
<br/>
#changenav%naventry#<br/>
</div>
#entries%changelogentry#
#footer#

View File

@ -0,0 +1,14 @@
<div>
<a class="title" href="?cmd=changeset;node=#node#;style=gitweb"><span class="age">#date|age# ago</span>#desc|firstline|escape#</a>
</div>
<div class="title_text">
<div class="log_link">
<a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a><br/>
</div>
<i>#author|obfuscate# [#date|rfc822date#]</i><br/>
</div>
<div class="log_body">
#desc|addbreaks#
<br/>
<br/>
</div>

View File

@ -0,0 +1,40 @@
#header#
<title>#repo|escape#: Changeset</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / changeset
</div>
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;rev=#rev#;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a> | changeset | <a href="?cmd=changeset;node=#node#;style=raw">raw</a><br/>
</div>
<div>
<a class="title" href="?cmd=changeset;node=#node#;style=raw">#desc|escape|firstline#</a>
</div>
<div class="title_text">
<table cellspacing="0">
<tr><td>author</td><td>#author|obfuscate#</td></tr>
<tr><td></td><td>#date|date# (#date|age# ago)</td></tr>
<tr><td>changeset</td><td style="font-family:monospace">#node|short#</td></tr>
<tr><td>manifest</td><td style="font-family:monospace"><a class="list" href="?cmd=manifest;manifest=#manifest|short#;path=/;style=gitweb">#manifest|short#</a></td></tr>
#parent%changesetparent#
#changesettag#
</table></div>
<div class="title_text">
#desc|addbreaks#
</div>
<div class="title_text">
<table cellspacing="0">
#files#
</table></div>
<div class="page_body">#diff#</div>
#footer#

View File

@ -0,0 +1,12 @@
#header#
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">log</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
</div>
<div>
<br/>
<i>Error parsing query string</i><br/>
<br/>
</div>
#footer#

View File

@ -0,0 +1,43 @@
#header#
<title>#repo|escape#: Annotate</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / annotate
</div>
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=#path#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | <a href="?cmd=file;file=#file#;filenode=#filenode#;style=gitweb">file</a> | <a href="?cmd=filelog;file=#file#;filenode=#filenode#;style=gitweb">revisions</a> | annotate<br/>
</div>
<div class="title">#file#</div>
<table>
<tr>
<td class="metatag">changeset #rev#:</td>
<td><a href="?cs=#node|short#;style=gitweb">#node|short#</a></td></tr>
#parent%fileannotateparent#
<tr>
<td class="metatag">manifest:</td>
<td><a href="?mf=#manifest|short#;path=/;style=gitweb">#manifest|short#</a></td></tr>
<tr>
<td class="metatag">author:</td>
<td>#author|obfuscate#</td></tr>
<tr>
<td class="metatag">date:</td>
<td>#date|date# (#date|age# ago)</td></tr>
<tr>
<td class="metatag">permissions:</td>
<td>#permissions|permissions#</td></tr>
</table>
<div class="page_body">
<table>
#annotate%annotateline#
</table>
</div>
#footer#

View File

@ -0,0 +1,20 @@
#header#
<title>#repo|escape#: Manifest</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / manifest
</div>
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=file;file=#file#;filenode=#filenode#;style=gitweb">file</a> | revisions | <a href="?cmd=annotate;file=#file#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?fl=#filenode|short#;file=#file#;style=rss">rss</a><br/>
</div>
<table>
#entries%filelogentry#
</table>
#footer#

View File

@ -0,0 +1,41 @@
#header#
<title>#repo|escape#: File revision</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / file revision
</div>
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?mf=#manifest|short#;path=#path#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | file | <a href="?cmd=filelog;file=#file#;filenode=#filenode#;style=gitweb">revisions</a> | <a href="?cmd=annotate;file=#file#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?cmd=file;file=#file#;filenode=#filenode#;style=raw">raw</a><br/>
</div>
<div class="title">#file#</div>
<table>
<tr>
<td class="metatag">changeset #rev#:</td>
<td><a href="?cs=#node|short#;style=gitweb">#node|short#</a></td></tr>
#parent%fileannotateparent#
<tr>
<td class="metatag">manifest:</td>
<td><a href="?mf=#manifest|short#;path=/;style=gitweb">#manifest|short#</a></td></tr>
<tr>
<td class="metatag">author:</td>
<td>#author|obfuscate#</td></tr>
<tr>
<td class="metatag">date:</td>
<td>#date|date# (#date|age# ago)</td></tr>
<tr>
<td class="metatag">permissions:</td>
<td>#permissions|permissions#</td></tr>
</table>
<div class="page_body">
#text%fileline#
</div>
#footer#

View File

@ -0,0 +1,6 @@
<div class="page_footer">
<div class="page_footer_text">#repo|escape#</div>
<a class="rss_logo" href="?cmd=changelog;style=rss">RSS</a>
</div>
</body>
</html>

View File

@ -0,0 +1,59 @@
Content-type: text/html
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="robots" content="index, nofollow"/>
<style type="text/css">
body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
a { color:#0000cc; }
a:hover, a:visited, a:active { color:#880000; }
div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
div.page_header a:visited { color:#0000cc; }
div.page_header a:hover { color:#880000; }
div.page_nav { padding:8px; }
div.page_nav a:visited { color:#0000cc; }
div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
div.page_footer { height:17px; padding:4px 8px; background-color: #d9d8d1; }
div.page_footer_text { float:left; color:#555555; font-style:italic; }
div.page_body { padding:8px; }
div.title, a.title {
display:block; padding:6px 8px;
font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
}
a.title:hover { background-color: #d9d8d1; }
div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
div.log_body { padding:8px 8px 8px 150px; }
span.age { position:relative; float:left; width:142px; font-style:italic; }
div.log_link {
padding:0px 8px;
font-size:10px; font-family:sans-serif; font-style:normal;
position:relative; float:left; width:136px;
}
div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
a.list { text-decoration:none; color:#000000; }
a.list:hover { text-decoration:underline; color:#880000; }
table { padding:8px 4px; }
th { padding:2px 5px; font-size:12px; text-align:left; }
tr.light:hover, .parity0:hover { background-color:#edece6; }
tr.dark, .parity1 { background-color:#f6f6f0; }
tr.dark:hover, .parity1:hover { background-color:#edece6; }
td { padding:2px 5px; font-size:12px; vertical-align:top; }
td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
div.pre { font-family:monospace; font-size:12px; white-space:pre; }
div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
.linenr { color:#999999; text-decoration:none }
a.rss_logo {
float:right; padding:3px 0px; width:35px; line-height:10px;
border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
color:#ffffff; background-color:#ff6600;
font-weight:bold; font-family:sans-serif; font-size:10px;
text-align:center; text-decoration:none;
}
a.rss_logo:hover { background-color:#ee5500; }
</style>

View File

@ -0,0 +1,27 @@
#header#
<title>#repo|escape#: Manifest</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / manifest
</div>
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | manifest | <a href="?cs=#node|short#;style=gitweb">changeset</a><br/>
</div>
<div class="title" >#path|escape#</div>
<div class="page_body">
<table cellspacing="0">
<tr class="light">
<td style="font-family:monospace">drwxr-xr-x</td>
<td><a href="?cmd=manifest;manifest=#manifest#;path=#up#;style=gitweb">[up]</a></td>
<td class="link">&nbsp;</td>
</tr>
#dentries%manifestdirentry#
#fentries%manifestfileentry#
</table>
#footer#

42
templates/map-gitweb Normal file
View File

@ -0,0 +1,42 @@
default = "summary"
header = header-gitweb.tmpl
footer = footer-gitweb.tmpl
search = search-gitweb.tmpl
changelog = changelog-gitweb.tmpl
summary = summary-gitweb.tmpl
error = error-gitweb.tmpl
naventry = "<a href="?cmd=changelog;rev=#rev#;style=gitweb">#label#</a> "
navshortentry = "<a href="?cmd=shortlog;rev=#rev#;style=gitweb">#label#</a> "
filedifflink = "<a href="?cmd=filediff;node=#node#;file=#file#;style=gitweb">#file#</a> "
filenodelink = "<tr class="light"><td><a class="list" href="">#file#</a></td><td></td><td class="link"><a href="?cmd=file;filenode=#filenode#;file=#file#;style=gitweb">file</a> | <!-- FIXME: <a href="?fd=#filenode|short#;file=#file#;style=gitweb">diff</a> | --> <a href="?cmd=filelog;filenode=#filenode|short#;file=#file#;style=gitweb">revisions</a></td></tr>"
fileellipses = "..."
changelogentry = changelogentry-gitweb.tmpl
searchentry = changelogentry-gitweb.tmpl
changeset = changeset-gitweb.tmpl
manifest = manifest-gitweb.tmpl
manifestdirentry = "<tr class="parity#parity#"><td style="font-family:monospace">drwxr-xr-x</td><td><a href="?mf=#manifest|short#;path=#path#;style=gitweb">#basename#/</a></td><td class="link"><a href="?mf=#manifest|short#;path=#path#;style=gitweb">manifest</a></td></tr>"
manifestfileentry = "<tr class="parity#parity#"><td style="font-family:monospace">#permissions|permissions#</td><td class="list"><a class="list" href="?f=#filenode|short#;file=#file#;style=gitweb">#basename#</a></td><td class="link"><a href="?f=#filenode|short#;file=#file#;style=gitweb">file</a> | <a href="?fl=#filenode|short#;file=#file#;style=gitweb">revisions</a> | <a href="?fa=#filenode|short#;file=#file#;style=gitweb">annotate</a></td></tr>"
filerevision = filerevision-gitweb.tmpl
fileannotate = fileannotate-gitweb.tmpl
filelog = filelog-gitweb.tmpl
fileline = "<div style="font-family:monospace; white-space: pre;" class="parity#parity#"><span class="linenr"> #linenumber#</span> #line|escape#</div>"
filelogentry = filelogentry-gitweb.tmpl
annotateline = "<tr style="font-family:monospace; white-space: pre;" class="parity#parity#"><td class="linenr" style="text-align: right;"><a href="?cs=#node|short#;style=gitweb">#author|obfuscate#@#rev#</a></td><td>#line|escape#</td></tr>"
difflineplus = "<div class="pre" style="color:#008800;">#line|escape#</div>"
difflineminus = "<div class="pre" style="color:#cc0000;">#line|escape#</div>"
difflineat = "<div class="pre" style="color:#990099;">#line|escape#</div>"
diffline = "<div class="pre">#line|escape#</div>"
changelogparent = "<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="?cmd=changeset;node=#node#;style=gitweb">#node|short#</a></td></tr>"
changesetparent = "<tr><td>parent</td><td style="font-family:monospace"><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb">#node|short#</a></td></tr>"
filerevparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=file;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>"
fileannotateparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=annotate;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>"
tags = tags-gitweb.tmpl
tagentry = "<tr class="parity#parity#"><td><i>#date|age# ago</i></td><td><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb"><b>#tag#</b></a></td><td class="link"><a href="?cmd=changeset;node=#node|short#;style=gitweb">changeset</a> | <a href="?cmd=changelog;rev=#node|short#;style=gitweb">changelog</a> | <a href="?mf=#tagmanifest|short#;path=/;style=gitweb">manifest</a></td></tr>"
diffblock = "#lines#"
changelogtag = "<tr><th class="tag">tag:</th><td class="tag">#tag#</td></tr>"
changesettag = "<tr><td>tag</td><td>#tag#</td></tr>"
filediffparent = "<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="?cmd=changeset;node=#node#;style=gitweb">#node|short#</a></td></tr>"
filelogparent = "<tr><td align="right">parent #rev#:&nbsp;</td><td><a href="?cmd=file;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>"
shortlog = shortlog-gitweb.tmpl
shortlogentry = "<tr class="parity#parity#"><td><i>#date|age# ago</i></td><td><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb"><b>#desc|firstline|escape#</b></a></td><td class="link"><a href="?cmd=changeset;node=#node|short#;style=gitweb">changeset</a> | <a href="?cmd=manifest;manifest=#manifest|short#;path=/;style=gitweb">manifest</a></td></tr>"
filelogentry = "<tr class="parity#parity#"><td><i>#date|age# ago</i></td><td><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb"><b>#desc|firstline|escape#</b></a></td><td class="link"><!-- FIXME: <a href="?fd=#node|short#;file=#file#;style=gitweb">diff</a> | --> <a href="?fa=#filenode|short#;file=#file#;style=gitweb">annotate</a></td></tr>"

View File

@ -0,0 +1,24 @@
#header#
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | log | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
</div>
<h2>searching for #query|escape#</h2>
<form>
search:
<input type="hidden" name="cmd" value="changelog">
<input type="hidden" name="style" value="gitweb">
<input name="rev" type="text" width="30" value="#query|escape#">
</form>
#entries#
<form>
search:
<input type="hidden" name="cmd" value="changelog">
<input type="hidden" name="style" value="gitweb">
<input name="rev" type="text" width="30">
</form>
#footer#

View File

@ -0,0 +1,13 @@
#header#
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">log</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
#changenav%naventry#<br/>
</div>
<table cellspacing="0">
#entries#
</table>
#footer#

View File

@ -0,0 +1,34 @@
#header#
<title>#repo|escape#: Summary</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / summary
</div>
<div class="page_nav">
summary | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
</div>
<div class="title">&nbsp;</div>
<table cellspacing="0">
<tr><td>description</td><td>#desc#</td></tr>
<tr><td>owner</td><td>#owner#</td></tr>
<!-- <tr><td>last change</td><td>#lastchange|rfc822date#</td></tr> -->
</table>
<div><a class="title" href="?cmd=changelog;style=gitweb">changes</a></div>
<table cellspacing="0">
#shortlog#
<tr class="light"><td colspan="3"><a class="list" href="?cmd=changelog;style=gitweb">...</a></td></tr>
</table>
<div><a class="title" href="?cmd=tags;style=gitweb">tags</a></div>
<table cellspacing="0">
#tags#
<tr class="light"><td colspan="3"><a class="list" href="?cmd=tags;style=gitweb">...</a></td></tr>
</table>
#footer#

View File

@ -0,0 +1,21 @@
#header#
<title>#repo|escape#: Tags</title>
<link rel="alternate" type="application/rss+xml"
href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / tags
</div>
<div class="page_nav">
<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | tags | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>
<br/>
</div>
<table cellspacing="0">
#entries%tagentry#
</table>
#footer#

View File

@ -40,8 +40,10 @@ echo This is file c1 > c
hg add c
hg commit -m "commit #2" -d "0 0"
echo This is file b2 > b
echo %% merge of b expected
echo %% merge should fail
env HGMERGE=../merge hg update -m 1
echo %% merge of b expected
env HGMERGE=../merge hg update -f -m 1
cd ..; /bin/rm -rf t
echo %%
@ -65,8 +67,10 @@ echo 'Contents of b should be "this is file b1"'
cat b
echo This is file b22 > b
echo %% merge expected!
echo %% merge fails
env HGMERGE=../merge hg update -m 2
echo %% merge expected!
env HGMERGE=../merge hg update -f -m 2
cd ..; /bin/rm -rf t
mkdir t
@ -85,6 +89,8 @@ echo This is file c1 > c
hg add c
hg commit -m "commit #3" -d "0 0"
echo This is file b33 > b
echo %% merge of b expected
echo %% merge of b should fail
env HGMERGE=../merge hg update -m 2
echo %% merge of b expected
env HGMERGE=../merge hg update -f -m 2
cd ..; /bin/rm -rf t

View File

@ -1,13 +1,19 @@
%% no merges expected
%% merge should fail
abort: 'b' already exists in the working dir and differs from remote
%% merge of b expected
merging for b
merging b
%%
Contents of b should be "this is file b1"
This is file b1
%% merge fails
abort: outstanding uncommited changes
%% merge expected!
merging for b
merging b
%% merge of b should fail
abort: outstanding uncommited changes
%% merge of b expected
merging for b
merging b

View File

@ -8,6 +8,10 @@ hg commit -m 1 -d "0 0"
rm foo
hg remove foo
hg commit -m 2 -d "0 0"
hg export 0
hg export 1
hg log -p -r 0
hg log -p -r 1
cd ..
hg clone a b

47
tests/test-remove.out Normal file
View File

@ -0,0 +1,47 @@
# HG changeset patch
# User test
# Node ID b51ca55c20354097ca299529d18b5cd356976ba2
# Parent 0000000000000000000000000000000000000000
1
diff -r 000000000000 -r b51ca55c2035 foo
--- /dev/null Thu Jan 1 00:00:00 1970 +0000
+++ b/foo Thu Jan 1 00:00:00 1970 +0000
@@ -0,0 +1,1 @@
+a
# HG changeset patch
# User test
# Node ID 1e555b9b85c52e1e9e8175446f1ede507b2d1ebb
# Parent b51ca55c20354097ca299529d18b5cd356976ba2
2
diff -r b51ca55c2035 -r 1e555b9b85c5 foo
--- a/foo Thu Jan 1 00:00:00 1970 +0000
+++ /dev/null Thu Jan 1 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-a
changeset: 0:b51ca55c2035
user: test
date: Thu Jan 1 00:00:00 1970 +0000
summary: 1
diff -r 000000000000 -r b51ca55c2035 foo
--- /dev/null Thu Jan 1 00:00:00 1970 +0000
+++ b/foo Thu Jan 1 00:00:00 1970 +0000
@@ -0,0 +1,1 @@
+a
changeset: 1:1e555b9b85c5
tag: tip
user: test
date: Thu Jan 1 00:00:00 1970 +0000
summary: 2
diff -r b51ca55c2035 -r 1e555b9b85c5 foo
--- a/foo Thu Jan 1 00:00:00 1970 +0000
+++ /dev/null Thu Jan 1 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-a

View File

@ -25,7 +25,8 @@ cd ../r2
hg -q pull ../r1
hg status
hg --debug up
hg --debug up -m
hg --debug up -m || echo failed
hg --debug up -f -m
hg parents
hg -v history
hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \

View File

@ -16,6 +16,8 @@ getting b
merging a
resolving a
file a: my b789fdd96dc2 other d730145abbf9 ancestor b789fdd96dc2
abort: outstanding uncommited changes
failed
resolving manifests
force None allow 1 moddirstate True linear True
ancestor 1165e8bd193e local 1165e8bd193e remote 1165e8bd193e