--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1705,10 +1705,7 @@ def rawcommit(ui, repo, *flist, **rc):
This command is not intended to be used by normal users, as it is
primarily useful for importing from other SCMs.
"""
- if rc['text']:
- ui.warn(_("Warning: -t and --text is deprecated,"
- " please use -m or --message instead.\n"))
- message = rc['message'] or rc['text']
+ message = rc['message']
if not message and rc['logfile']:
try:
message = open(rc['logfile']).read()
@@ -1980,9 +1977,6 @@ def tag(ui, repo, name, rev=None, **opts
similarly to other project files and can be hand-edited if
necessary.
"""
- if opts['text']:
- ui.warn(_("Warning: -t and --text is deprecated,"
- " please use -m or --message instead.\n"))
if name == "tip":
raise util.Abort(_("the name 'tip' is reserved"))
if rev:
@@ -2007,7 +2001,7 @@ def tag(ui, repo, name, rev=None, **opts
if repo.dirstate.state(".hgtags") == '?':
repo.add([".hgtags"])
- message = (opts['message'] or opts['text'] or
+ message = (opts['message'] or
_("Added tag %s for changeset %s") % (name, r))
try:
repo.commit([".hgtags"], message, opts['user'], opts['date'])
@@ -2291,7 +2285,6 @@ table = {
('u', 'user', "", _('user')),
('F', 'files', "", _('file list')),
('m', 'message', "", _('commit message')),
- ('t', 'text', "", _('commit message (deprecated: use -m)')),
('l', 'logfile', "", _('commit message file'))],
_('hg rawcommit [OPTION]... [FILE]...')),
"recover": (recover, [], _("hg recover")),
@@ -2339,7 +2332,6 @@ table = {
(tag,
[('l', 'local', None, _('make the tag local')),
('m', 'message', "", _('message for tag commit log entry')),
- ('t', 'text', "", _('commit message (deprecated: use -m)')),
('d', 'date', "", _('record datecode as commit date')),
('u', 'user', "", _('record user as commiter'))],
_('hg tag [OPTION]... NAME [REV]')),
--- a/mercurial/hgweb.py
+++ b/mercurial/hgweb.py
@@ -196,6 +196,11 @@ class hgweb:
self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10))
self.allowpull = self.repo.ui.configbool("web", "allowpull", True)
+ def archivelist(self, nodeid):
+ for i in self.archives:
+ if self.repo.ui.configbool("web", "allow" + i, False):
+ yield {"type" : i, "node" : nodeid}
+
def listfiles(self, files, mf):
for f in files[:self.maxfiles]:
yield self.t("filenodelink", node=hex(mf[f]), file=f)
@@ -414,11 +419,6 @@ class hgweb:
def diff(**map):
yield self.diff(p1, n, None)
- def archivelist():
- for i in self.archives:
- if self.repo.ui.configbool("web", "allow" + i, False):
- yield {"type" : i, "node" : nodeid}
-
yield self.t('changeset',
diff=diff,
rev=cl.rev(n),
@@ -430,7 +430,7 @@ class hgweb:
desc=changes[4],
date=changes[2],
files=files,
- archives=archivelist())
+ archives=self.archivelist(nodeid))
def filelog(self, f, filenode):
cl = self.repo.changelog
@@ -618,7 +618,8 @@ class hgweb:
path=path,
up=up(path),
fentries=filelist,
- dentries=dirlist)
+ dentries=dirlist,
+ archives=self.archivelist(hex(node)))
def tags(self):
cl = self.repo.changelog
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1504,9 +1504,6 @@ class localrepository:
return 1
branch_merge = True
- if moddirstate:
- self.dirstate.setparents(p1, p2)
-
# get the files we don't need to change
files = get.keys()
files.sort()
@@ -1559,6 +1556,9 @@ class localrepository:
else:
self.dirstate.forget(remove)
+ if moddirstate:
+ self.dirstate.setparents(p1, p2)
+
def merge3(self, fn, my, other):
"""perform a 3-way merge in the working directory"""
@@ -1602,6 +1602,9 @@ class localrepository:
seen = {}
self.ui.status(_("checking changesets\n"))
+ d = self.changelog.checksize()
+ if d:
+ err(_("changeset data short %d bytes") % d)
for i in range(self.changelog.count()):
changesets += 1
n = self.changelog.node(i)
@@ -1618,6 +1621,9 @@ class localrepository:
(short(n), short(p)))
try:
changes = self.changelog.read(n)
+ except KeyboardInterrupt:
+ self.ui.warn(_("interrupted"))
+ raise
except Exception, inst:
err(_("unpacking changeset %s: %s") % (short(n), inst))
@@ -1628,6 +1634,9 @@ class localrepository:
seen = {}
self.ui.status(_("checking manifests\n"))
+ d = self.manifest.checksize()
+ if d:
+ err(_("manifest data short %d bytes") % d)
for i in range(self.manifest.count()):
n = self.manifest.node(i)
l = self.manifest.linkrev(n)
@@ -1682,6 +1691,10 @@ class localrepository:
if f == "/dev/null": continue
files += 1
fl = self.file(f)
+ d = fl.checksize()
+ if d:
+ err(_("%s file data short %d bytes") % (f, d))
+
nodes = { nullid: 1 }
seen = {}
for i in range(fl.count()):
@@ -1705,6 +1718,9 @@ class localrepository:
# verify contents
try:
t = fl.read(n)
+ except KeyboardInterrupt:
+ self.ui.warn(_("interrupted"))
+ raise
except Exception, inst:
err(_("unpacking file %s %s: %s") % (f, short(n), inst))
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -823,3 +823,19 @@ class revlog:
dfh.close()
ifh.close()
return node
+
+ def checksize(self):
+ expected = 0
+ if self.count():
+ expected = self.end(self.count() - 1)
+ try:
+ f = self.opener(self.datafile)
+ f.seek(0, 2)
+ actual = f.tell()
+ return expected - actual
+ except IOError, inst:
+ if inst.errno == errno.ENOENT:
+ return 0
+ raise
+
+
--- a/templates/manifest.tmpl
+++ b/templates/manifest.tmpl
@@ -7,6 +7,7 @@
<a href="?cl=#rev#">changelog</a>
<a href="?tags=">tags</a>
<a href="?cs=#node|short#">changeset</a>
+#archives%archiveentry#
</div>
<h2>manifest for changeset #node|short#: #path#</h2>
new file mode 100755
--- /dev/null
+++ b/tests/test-permissions
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+hg init
+echo foo > a
+hg add a
+hg commit -m "1" -d "0 0"
+hg verify
+chmod -r .hg/data/a.d
+hg verify 2>/dev/null || echo verify failed
+chmod +r .hg/data/a.d
+hg verify 2>/dev/null || echo verify failed
+chmod -w .hg/data/a.d
+echo barber > a
+hg commit -m "2" -d "0 0" 2>/dev/null || echo commit failed
+
new file mode 100644
--- /dev/null
+++ b/tests/test-permissions.out
@@ -0,0 +1,16 @@
+checking changesets
+checking manifests
+crosschecking files in changesets and manifests
+checking files
+1 files, 1 changesets, 1 total revisions
+checking changesets
+checking manifests
+crosschecking files in changesets and manifests
+checking files
+verify failed
+checking changesets
+checking manifests
+crosschecking files in changesets and manifests
+checking files
+1 files, 1 changesets, 1 total revisions
+commit failed