[PATCH 12 of 21] lowercase ui.warn output
Martin Geisler
mg at daimi.au.dk
Sat Jan 3 10:40:10 CST 2009
# HG changeset patch
# User Martin Geisler <mg at daimi.au.dk>
# Date 1230999321 -3600
# Node ID d9bda830172c0ea740cb49a552ed196b2541e44d
# Parent f4ec1cda51b9179cf69ce2be030dd4d23f09aff0
lowercase ui.warn output
It is possible that there are scripts that grep for these warning
messages, especially the "Hunk #1 FAILED at 0" type of messages.
diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -211,7 +211,7 @@
self.authors[srcauthor] = dstauthor
except IndexError:
self.ui.warn(
- _('Ignoring bad line in author map file %s: %s\n')
+ _('ignoring bad line in author map file %s: %s\n')
% (authorfile, line.rstrip()))
afile.close()
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -540,7 +540,7 @@
try:
ph = self.readheaders(patchname)
except:
- self.ui.warn(_("Unable to read %s\n") % patchname)
+ self.ui.warn(_("unable to read %s\n") % patchname)
err = 1
break
@@ -1415,7 +1415,7 @@
self.ui.status(_("queue directory updating\n"))
r = self.qrepo()
if not r:
- self.ui.warn(_("Unable to load queue repository\n"))
+ self.ui.warn(_("unable to load queue repository\n"))
return 1
hg.clean(r, qpp[0])
@@ -1924,7 +1924,7 @@
for f in files:
p = q.lookup(f)
if p in patches or p == parent:
- ui.warn(_('Skipping already folded patch %s') % p)
+ ui.warn(_('skipping already folded patch %s') % p)
if q.isapplied(p):
raise util.Abort(_('qfold cannot fold already applied patch %s') % p)
patches.append(p)
@@ -2395,7 +2395,7 @@
mqtags.append((self.changelog.parents(mqtags[0][0])[0], 'qparent'))
for patch in mqtags:
if patch[1] in tagscache:
- self.ui.warn(_('Tag %s overrides mq patch of the same name\n')
+ self.ui.warn(_('tag %s overrides mq patch of the same name\n')
% patch[1])
else:
tagscache[patch[1]] = patch[0]
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -94,7 +94,7 @@
return default
if empty_ok:
return r
- ui.warn(_('Please enter a valid value.\n'))
+ ui.warn(_('please enter a valid value.\n'))
def cdiffstat(ui, summary, patchlines):
s = patch.diffstat(patchlines)
diff --git a/hgext/win32text.py b/hgext/win32text.py
--- a/hgext/win32text.py
+++ b/hgext/win32text.py
@@ -106,7 +106,7 @@
data = c[f].data()
if not util.binary(data) and newline in data:
if not halt:
- ui.warn(_('Attempt to commit or push text file(s) '
+ ui.warn(_('attempt to commit or push text file(s) '
'using %s line endings\n') %
newlinestr[newline])
ui.warn(_('in %s: %s\n') % (short(c.node()), f))
@@ -114,7 +114,7 @@
if halt and hooktype == 'pretxnchangegroup':
crlf = newlinestr[newline].lower()
filter = filterstr[newline]
- ui.warn(_('\nTo prevent this mistake in your local repository,\n'
+ ui.warn(_('\nto prevent this mistake in your local repository,\n'
'add to Mercurial.ini or .hg/hgrc:\n'
'\n'
'[hooks]\n'
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -323,7 +323,7 @@
s = get_times()
def print_time():
t = get_times()
- ui.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") %
+ ui.warn(_("time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") %
(t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
atexit.register(print_time)
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -613,7 +613,7 @@
branch = self.opener("undo.branch").read()
self.dirstate.setbranch(branch)
except IOError:
- self.ui.warn(_("Named branch could not be reset, "
+ self.ui.warn(_("named branch could not be reset, "
"current branch still is: %s\n")
% util.tolocal(self.dirstate.branch()))
self.invalidate()
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -424,11 +424,11 @@
linestr = "line"
else:
linestr = "lines"
- f(_("Hunk #%d succeeded at %d %s(offset %d %s).\n") %
+ f(_("hunk #%d succeeded at %d %s(offset %d %s).\n") %
(h.number, l+1, fuzzstr, offset, linestr))
return fuzzlen
self.printfile(True)
- self.ui.warn(_("Hunk #%d FAILED at %d\n") % (h.number, orig_start))
+ self.ui.warn(_("hunk #%d FAILED at %d\n") % (h.number, orig_start))
self.rej.append(h)
return -1
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -121,7 +121,7 @@
group = util.groupname(st.st_gid)
if user not in tusers and group not in tgroups:
if warn and self.report_untrusted:
- self.warn(_('Not trusting file %s from untrusted '
+ self.warn(_('not trusting file %s from untrusted '
'user %s, group %s\n') % (f, user, group))
return False
return True
@@ -148,10 +148,10 @@
try:
cdata.readfp(fp, f)
except ConfigParser.ParsingError, inst:
- msg = _("Failed to parse %s\n%s") % (f, inst)
+ msg = _("failed to parse %s\n%s") % (f, inst)
if trusted:
raise util.Abort(msg)
- self.warn(_("Ignored: %s\n") % msg)
+ self.warn(_("ignored: %s\n") % msg)
if trusted:
if cdata != self.cdata:
@@ -255,11 +255,11 @@
func = getattr(cdata, funcname)
return func(section, name)
except (ConfigParser.InterpolationError, ValueError), inst:
- msg = _("Error in configuration section [%s] "
+ msg = _("error in configuration section [%s] "
"parameter '%s':\n%s") % (section, name, inst)
if abort:
raise util.Abort(msg)
- self.warn(_("Ignored: %s\n") % msg)
+ self.warn(_("ignored: %s\n") % msg)
return default
def _configcommon(self, section, name, default, funcname, untrusted):
@@ -269,7 +269,7 @@
uvalue = self._config(section, name, None, funcname,
untrusted=True, abort=False)
if uvalue is not None and uvalue != value:
- self.warn(_("Ignoring untrusted configuration option "
+ self.warn(_("ignoring untrusted configuration option "
"%s.%s = %s\n") % (section, name, uvalue))
return value
@@ -301,11 +301,11 @@
try:
items.update(dict(cdata.items(section)))
except ConfigParser.InterpolationError, inst:
- msg = _("Error in configuration section [%s]:\n"
+ msg = _("error in configuration section [%s]:\n"
"%s") % (section, inst)
if abort:
raise util.Abort(msg)
- self.warn(_("Ignored: %s\n") % msg)
+ self.warn(_("ignored: %s\n") % msg)
return items
def configitems(self, section, untrusted=False):
@@ -314,7 +314,7 @@
uitems = self._configitems(section, untrusted=True, abort=False)
for k in util.sort(uitems):
if uitems[k] != items.get(k):
- self.warn(_("Ignoring untrusted configuration option "
+ self.warn(_("ignoring untrusted configuration option "
"%s.%s = %s\n") % (section, k, uitems[k]))
return util.sort(items.items())
@@ -344,7 +344,7 @@
if user is None:
try:
user = '%s@%s' % (util.getuser(), socket.getfqdn())
- self.warn(_("No username found, using '%s' instead\n") % user)
+ self.warn(_("no username found, using '%s' instead\n") % user)
except KeyError:
pass
if not user:
diff --git a/tests/test-committer.out b/tests/test-committer.out
--- a/tests/test-committer.out
+++ b/tests/test-committer.out
@@ -23,4 +23,4 @@
summary: commit-1
abort: please specify a username.
-No username found, using user at host instead
+no username found, using user at host instead
diff --git a/tests/test-globalopts b/tests/test-globalopts
--- a/tests/test-globalopts
+++ b/tests/test-globalopts
@@ -83,7 +83,7 @@
hg --cwd c --config x --traceback tip 2>&1 | grep -i 'traceback'
echo %% --time
-hg --cwd a --time tip 2>&1 | grep '^Time:' | sed 's/[0-9][0-9]*/x/g'
+hg --cwd a --time tip 2>&1 | grep '^time:' | sed 's/[0-9][0-9]*/x/g'
echo %% --version
hg --version -q | sed 's/version [^)]*/version xxx/'
diff --git a/tests/test-globalopts.out b/tests/test-globalopts.out
--- a/tests/test-globalopts.out
+++ b/tests/test-globalopts.out
@@ -141,7 +141,7 @@
%% --traceback
Traceback (most recent call last):
%% --time
-Time: real x.x secs (user x.x+x.x sys x.x+x.x)
+time: real x.x secs (user x.x+x.x sys x.x+x.x)
%% --version
Mercurial Distributed SCM (version xxx)
%% -h/--help
diff --git a/tests/test-hgrc.out b/tests/test-hgrc.out
--- a/tests/test-hgrc.out
+++ b/tests/test-hgrc.out
@@ -1,4 +1,4 @@
-abort: Failed to parse .../t/.hg/hgrc
+abort: failed to parse .../t/.hg/hgrc
File contains no section headers.
file: .../t/.hg/hgrc, line: 1
'invalid\n'
diff --git a/tests/test-import.out b/tests/test-import.out
--- a/tests/test-import.out
+++ b/tests/test-import.out
@@ -202,7 +202,7 @@
created new head
applying tip.patch
patching file a
-Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
+hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
a
adding a
adding b1
diff --git a/tests/test-mactext.out b/tests/test-mactext.out
--- a/tests/test-mactext.out
+++ b/tests/test-mactext.out
@@ -3,7 +3,7 @@
pretxnchangegroup.cr = python:hgext.win32text.forbidcr
-Attempt to commit or push text file(s) using CR line endings
+attempt to commit or push text file(s) using CR line endings
in dea860dc51ec: f
transaction abort!
rollback completed
diff --git a/tests/test-profile b/tests/test-profile
--- a/tests/test-profile
+++ b/tests/test-profile
@@ -1,7 +1,7 @@
#!/bin/sh
echo % test --time
-hg --time help -q help 2>&1 | grep Time > /dev/null || echo --time failed
+hg --time help -q help 2>&1 | grep time > /dev/null || echo --time failed
echo % test --profile
if "$TESTDIR/hghave" -q hotshot; then
diff --git a/tests/test-rollback.out b/tests/test-rollback.out
--- a/tests/test-rollback.out
+++ b/tests/test-rollback.out
@@ -23,5 +23,5 @@
% Test rollback of hg before issue 902 was fixed
marked working directory as branch test
rolling back last transaction
-Named branch could not be reset, current branch still is: test
+named branch could not be reset, current branch still is: test
test
diff --git a/tests/test-transplant.out b/tests/test-transplant.out
--- a/tests/test-transplant.out
+++ b/tests/test-transplant.out
@@ -109,14 +109,14 @@
created new head
applying a1e30dd1b8e7
patching file foo
-Hunk #1 FAILED at 0
+hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file foo.rej
patch failed to apply
abort: fix up the merge and run hg transplant --continue
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
applying a1e30dd1b8e7
patching file foo
-Hunk #1 FAILED at 0
+hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file foo.rej
patch failed to apply
abort: fix up the merge and run hg transplant --continue
diff --git a/tests/test-trusted.py.out b/tests/test-trusted.py.out
--- a/tests/test-trusted.py.out
+++ b/tests/test-trusted.py.out
@@ -19,7 +19,7 @@
. . local = /another/path
# different user, same group
-Not trusting file .hg/hgrc from untrusted user abc, group bar
+not trusting file .hg/hgrc from untrusted user abc, group bar
trusted
global = /some/path
untrusted
@@ -38,7 +38,7 @@
. . local = /another/path
# different user, different group
-Not trusting file .hg/hgrc from untrusted user abc, group def
+not trusting file .hg/hgrc from untrusted user abc, group def
trusted
global = /some/path
untrusted
@@ -111,7 +111,7 @@
# we don't get confused by users and groups with the same name
# different user, different group
-Not trusting file .hg/hgrc from untrusted user abc, group def
+not trusting file .hg/hgrc from untrusted user abc, group def
trusted
global = /some/path
untrusted
@@ -154,25 +154,25 @@
# prints debug warnings
# different user, different group
-Not trusting file .hg/hgrc from untrusted user abc, group def
+not trusting file .hg/hgrc from untrusted user abc, group def
trusted
-Ignoring untrusted configuration option paths.interpolated = /some/path/another/path
-Ignoring untrusted configuration option paths.local = /another/path
+ignoring untrusted configuration option paths.interpolated = /some/path/another/path
+ignoring untrusted configuration option paths.local = /another/path
global = /some/path
untrusted
. . global = /some/path
-.Ignoring untrusted configuration option paths.interpolated = /some/path/another/path
+.ignoring untrusted configuration option paths.interpolated = /some/path/another/path
. interpolated = /some/path/another/path
-.Ignoring untrusted configuration option paths.local = /another/path
+.ignoring untrusted configuration option paths.local = /another/path
. local = /another/path
# ui.readsections
quux
# read trusted, untrusted, new ui, trusted
-Not trusting file foobar from untrusted user abc, group def
+not trusting file foobar from untrusted user abc, group def
trusted:
-Ignoring untrusted configuration option foobar.baz = quux
+ignoring untrusted configuration option foobar.baz = quux
None
/some/path/another/path
untrusted:
@@ -186,8 +186,8 @@
# parse error
# different user, different group
-Not trusting file .hg/hgrc from untrusted user abc, group def
-Ignored: Failed to parse .hg/hgrc
+not trusting file .hg/hgrc from untrusted user abc, group def
+ignored: failed to parse .hg/hgrc
File contains no section headers.
file: .hg/hgrc, line: 1
'foo = bar'
@@ -200,13 +200,13 @@
trusted raised Abort
untrusted raised Abort
# different user, different group
-Not trusting file .hg/hgrc from untrusted user abc, group def
- trusted Ignored: Error in configuration section [foo] parameter 'bar':
+not trusting file .hg/hgrc from untrusted user abc, group def
+ trusted ignored: error in configuration section [foo] parameter 'bar':
bad interpolation variable reference '%('
None
untrusted raised Abort
# configitems:
- trusted Ignored: Error in configuration section [foo]:
+ trusted ignored: error in configuration section [foo]:
bad interpolation variable reference '%('
[]
untrusted raised Abort
diff --git a/tests/test-ui-config.out b/tests/test-ui-config.out
--- a/tests/test-ui-config.out
+++ b/tests/test-ui-config.out
@@ -1,6 +1,6 @@
[('bool1', 'true'), ('bool2', 'false'), ('string', 'string value')]
[('list1', 'foo'), ('list2', 'foo bar baz'), ('list3', 'alice, bob'), ('list4', 'foo bar baz alice, bob')]
-Error in configuration section [interpolation]:
+error in configuration section [interpolation]:
'%' must be followed by '%' or '(', found: '%bad2'
---
'string value'
@@ -8,7 +8,7 @@
'false'
None
---
-Error in configuration section [values] parameter 'string':
+error in configuration section [values] parameter 'string':
Not a boolean: string value
True
False
@@ -32,16 +32,16 @@
---
'hallo'
'hallo world'
-Error in configuration section [interpolation] parameter 'value3':
+error in configuration section [interpolation] parameter 'value3':
Bad value substitution:
section: [interpolation]
option : value3
key : novalue
rawval :
-Error in configuration section [interpolation] parameter 'value4':
+error in configuration section [interpolation] parameter 'value4':
bad interpolation variable reference '%(bad)1'
-Error in configuration section [interpolation] parameter 'value5':
+error in configuration section [interpolation] parameter 'value5':
'%' must be followed by '%' or '(', found: '%bad2'
---
No option 'Bar' in section: 'foo'
diff --git a/tests/test-win32text.out b/tests/test-win32text.out
--- a/tests/test-win32text.out
+++ b/tests/test-win32text.out
@@ -3,14 +3,14 @@
pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
-Attempt to commit or push text file(s) using CRLF line endings
+attempt to commit or push text file(s) using CRLF line endings
in b1aa5cde7ff4: f
transaction abort!
rollback completed
abort: pretxncommit.crlf hook failed
reverting f
-Attempt to commit or push text file(s) using CRLF line endings
+attempt to commit or push text file(s) using CRLF line endings
in 88b17af74937: d/f2
transaction abort!
rollback completed
@@ -107,12 +107,12 @@
adding manifests
adding file changes
added 3 changesets with 4 changes to 4 files
-Attempt to commit or push text file(s) using CRLF line endings
+attempt to commit or push text file(s) using CRLF line endings
in ac30a42ce8bc: b
in ac30a42ce8bc: c
in 6e8a7629ff5b: d
-To prevent this mistake in your local repository,
+to prevent this mistake in your local repository,
add to Mercurial.ini or .hg/hgrc:
[hooks]
More information about the Mercurial-devel
mailing list