Skip to content
Snippets Groups Projects
Commit 7d2fc79a authored by Jeff Sipek's avatar Jeff Sipek
Browse files

git: consistify & fix LookupError messages

This includes 3 one-line fixes:

1. use the "no node" message instead of "no such node" for consistency
2. drop superfluous (and wrong & unused) %d format string token
3. correct one message to "no rev" since it indicates a rev that wasn't found
parent 3865451a
No related branches found
No related tags found
2 merge requests!1292Draft: 7.0rc preparation,!1192git: octopus handling, major speed ups, and generally making 'hg log' work
......@@ -139,7 +139,7 @@
'SELECT rev FROM changelog WHERE node = ?', (gitutil.togitnode(n),)
).fetchone()
if t is None:
raise error.LookupError(n, b'00changelog.i', _(b'no node %d'))
raise error.LookupError(n, b'00changelog.i', _(b'no node'))
return t[0]
def node(self, r):
......@@ -149,7 +149,7 @@
'SELECT node FROM changelog WHERE rev = ?', (r,)
).fetchone()
if t is None:
raise error.LookupError(r, b'00changelog.i', _(b'no node'))
raise error.LookupError(r, b'00changelog.i', _(b'no rev'))
return bin(t[0])
def synthetic(self, n):
......@@ -633,7 +633,7 @@
(pycompat.fsdecode(self.path), gitutil.togitnode(node)),
).fetchone()
if row is None:
raise error.LookupError(self.path, node, _(b'no such node'))
raise error.LookupError(self.path, node, _(b'no node'))
return int(row[0])
def node(self, rev):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment