##// END OF EJS Templates
cleanup: drop variables for unused return values...
Peter Arrenbrecht -
r7874:d812029c default
parent child Browse files
Show More
@@ -327,7 +327,7 b' class convert_cvs(converter_source):'
327 elif line.startswith("E "):
327 elif line.startswith("E "):
328 self.ui.warn(_("cvs server: %s\n") % line[2:])
328 self.ui.warn(_("cvs server: %s\n") % line[2:])
329 elif line.startswith("Remove"):
329 elif line.startswith("Remove"):
330 l = self.readp.readline()
330 self.readp.readline()
331 else:
331 else:
332 raise util.Abort(_("unknown CVS response: %s") % line)
332 raise util.Abort(_("unknown CVS response: %s") % line)
333
333
@@ -142,7 +142,7 b' class mercurial_sink(converter_sink):'
142 p2 = parents.pop(0)
142 p2 = parents.pop(0)
143 ctx = context.memctx(self.repo, (p1, p2), text, files.keys(), getfilectx,
143 ctx = context.memctx(self.repo, (p1, p2), text, files.keys(), getfilectx,
144 commit.author, commit.date, extra)
144 commit.author, commit.date, extra)
145 a = self.repo.commitctx(ctx)
145 self.repo.commitctx(ctx)
146 text = "(octopus merge fixup)\n"
146 text = "(octopus merge fixup)\n"
147 p2 = hex(self.repo.changelog.tip())
147 p2 = hex(self.repo.changelog.tip())
148
148
@@ -177,7 +177,7 b' class svn_source(converter_source):'
177 if at >= 0:
177 if at >= 0:
178 latest = int(url[at+1:])
178 latest = int(url[at+1:])
179 url = url[:at]
179 url = url[:at]
180 except ValueError, e:
180 except ValueError:
181 pass
181 pass
182 self.url = geturl(url)
182 self.url = geturl(url)
183 self.encoding = 'UTF-8' # Subversion is always nominal UTF-8
183 self.encoding = 'UTF-8' # Subversion is always nominal UTF-8
@@ -1742,7 +1742,7 b' def clone(ui, source, dest=None, **opts)'
1742 else:
1742 else:
1743 patchespath = patchdir(sr)
1743 patchespath = patchdir(sr)
1744 try:
1744 try:
1745 pr = hg.repository(ui, patchespath)
1745 hg.repository(ui, patchespath)
1746 except error.RepoError:
1746 except error.RepoError:
1747 raise util.Abort(_('versioned patch repository not found'
1747 raise util.Abort(_('versioned patch repository not found'
1748 ' (see qinit -c)'))
1748 ' (see qinit -c)'))
@@ -1768,9 +1768,9 b' def clone(ui, source, dest=None, **opts)'
1768 update=False,
1768 update=False,
1769 stream=opts['uncompressed'])
1769 stream=opts['uncompressed'])
1770 ui.note(_('cloning patch repo\n'))
1770 ui.note(_('cloning patch repo\n'))
1771 spr, dpr = hg.clone(ui, opts['patches'] or patchdir(sr), patchdir(dr),
1771 hg.clone(ui, opts['patches'] or patchdir(sr), patchdir(dr),
1772 pull=opts['pull'], update=not opts['noupdate'],
1772 pull=opts['pull'], update=not opts['noupdate'],
1773 stream=opts['uncompressed'])
1773 stream=opts['uncompressed'])
1774 if dr.local():
1774 if dr.local():
1775 if qbase:
1775 if qbase:
1776 ui.note(_('stripping applied patches from destination repo\n'))
1776 ui.note(_('stripping applied patches from destination repo\n'))
@@ -230,8 +230,8 b' def patchbomb(ui, repo, *revs, **opts):'
230 def getpatches(revs):
230 def getpatches(revs):
231 for r in cmdutil.revrange(repo, revs):
231 for r in cmdutil.revrange(repo, revs):
232 output = cStringIO.StringIO()
232 output = cStringIO.StringIO()
233 p = patch.export(repo, [r], fp=output,
233 patch.export(repo, [r], fp=output,
234 opts=patch.diffopts(ui, opts))
234 opts=patch.diffopts(ui, opts))
235 yield output.getvalue().split('\n')
235 yield output.getvalue().split('\n')
236
236
237 def getbundle(dest):
237 def getbundle(dest):
@@ -216,8 +216,8 b' class transplanter:'
216 try:
216 try:
217 files = {}
217 files = {}
218 try:
218 try:
219 fuzz = patch.patch(patchfile, self.ui, cwd=repo.root,
219 patch.patch(patchfile, self.ui, cwd=repo.root,
220 files=files)
220 files=files)
221 if not files:
221 if not files:
222 self.ui.warn(_('%s: empty changeset')
222 self.ui.warn(_('%s: empty changeset')
223 % revlog.hex(node))
223 % revlog.hex(node))
@@ -866,7 +866,6 b' class Engine(threading.Thread):'
866 pass
866 pass
867
867
868 def getReaders(self):
868 def getReaders(self):
869 result = []
870 self.condition.acquire()
869 self.condition.acquire()
871 result = self.readers.keys()
870 result = self.readers.keys()
872 self.condition.release()
871 self.condition.release()
@@ -1486,14 +1485,14 b' class Zeroconf(object):'
1486 out = DNSOutgoing(_FLAGS_QR_RESPONSE | _FLAGS_AA, 0)
1485 out = DNSOutgoing(_FLAGS_QR_RESPONSE | _FLAGS_AA, 0)
1487 for question in msg.questions:
1486 for question in msg.questions:
1488 out.addQuestion(question)
1487 out.addQuestion(question)
1489
1488
1490 for question in msg.questions:
1489 for question in msg.questions:
1491 if question.type == _TYPE_PTR:
1490 if question.type == _TYPE_PTR:
1492 if question.name == "_services._dns-sd._udp.local.":
1491 if question.name == "_services._dns-sd._udp.local.":
1493 for stype in self.servicetypes.keys():
1492 for stype in self.servicetypes.keys():
1494 if out is None:
1493 if out is None:
1495 out = DNSOutgoing(_FLAGS_QR_RESPONSE | _FLAGS_AA)
1494 out = DNSOutgoing(_FLAGS_QR_RESPONSE | _FLAGS_AA)
1496 out.addAnswer(msg, DNSPointer("_services._dns-sd._udp.local.", _TYPE_PTR, _CLASS_IN, _DNS_TTL, stype))
1495 out.addAnswer(msg, DNSPointer("_services._dns-sd._udp.local.", _TYPE_PTR, _CLASS_IN, _DNS_TTL, stype))
1497 for service in self.services.values():
1496 for service in self.services.values():
1498 if question.name == service.type:
1497 if question.name == service.type:
1499 if out is None:
1498 if out is None:
@@ -1503,16 +1502,16 b' class Zeroconf(object):'
1503 try:
1502 try:
1504 if out is None:
1503 if out is None:
1505 out = DNSOutgoing(_FLAGS_QR_RESPONSE | _FLAGS_AA)
1504 out = DNSOutgoing(_FLAGS_QR_RESPONSE | _FLAGS_AA)
1506
1505
1507 # Answer A record queries for any service addresses we know
1506 # Answer A record queries for any service addresses we know
1508 if question.type == _TYPE_A or question.type == _TYPE_ANY:
1507 if question.type == _TYPE_A or question.type == _TYPE_ANY:
1509 for service in self.services.values():
1508 for service in self.services.values():
1510 if service.server == question.name.lower():
1509 if service.server == question.name.lower():
1511 out.addAnswer(msg, DNSAddress(question.name, _TYPE_A, _CLASS_IN | _CLASS_UNIQUE, _DNS_TTL, service.address))
1510 out.addAnswer(msg, DNSAddress(question.name, _TYPE_A, _CLASS_IN | _CLASS_UNIQUE, _DNS_TTL, service.address))
1512
1511
1513 service = self.services.get(question.name.lower(), None)
1512 service = self.services.get(question.name.lower(), None)
1514 if not service: continue
1513 if not service: continue
1515
1514
1516 if question.type == _TYPE_SRV or question.type == _TYPE_ANY:
1515 if question.type == _TYPE_SRV or question.type == _TYPE_ANY:
1517 out.addAnswer(msg, DNSService(question.name, _TYPE_SRV, _CLASS_IN | _CLASS_UNIQUE, _DNS_TTL, service.priority, service.weight, service.port, service.server))
1516 out.addAnswer(msg, DNSService(question.name, _TYPE_SRV, _CLASS_IN | _CLASS_UNIQUE, _DNS_TTL, service.priority, service.weight, service.port, service.server))
1518 if question.type == _TYPE_TXT or question.type == _TYPE_ANY:
1517 if question.type == _TYPE_TXT or question.type == _TYPE_ANY:
@@ -1521,7 +1520,7 b' class Zeroconf(object):'
1521 out.addAdditionalAnswer(DNSAddress(service.server, _TYPE_A, _CLASS_IN | _CLASS_UNIQUE, _DNS_TTL, service.address))
1520 out.addAdditionalAnswer(DNSAddress(service.server, _TYPE_A, _CLASS_IN | _CLASS_UNIQUE, _DNS_TTL, service.address))
1522 except:
1521 except:
1523 traceback.print_exc()
1522 traceback.print_exc()
1524
1523
1525 if out is not None and out.answers:
1524 if out is not None and out.answers:
1526 out.id = msg.id
1525 out.id = msg.id
1527 self.send(out, addr, port)
1526 self.send(out, addr, port)
@@ -1531,7 +1530,7 b' class Zeroconf(object):'
1531 # This is a quick test to see if we can parse the packets we generate
1530 # This is a quick test to see if we can parse the packets we generate
1532 #temp = DNSIncoming(out.packet())
1531 #temp = DNSIncoming(out.packet())
1533 try:
1532 try:
1534 bytes_sent = self.socket.sendto(out.packet(), 0, (addr, port))
1533 self.socket.sendto(out.packet(), 0, (addr, port))
1535 except:
1534 except:
1536 # Ignore this, it may be a temporary loss of network connection
1535 # Ignore this, it may be a temporary loss of network connection
1537 pass
1536 pass
@@ -131,7 +131,7 b' class listener(object):'
131 def getzcpaths():
131 def getzcpaths():
132 server = Zeroconf.Zeroconf()
132 server = Zeroconf.Zeroconf()
133 l = listener()
133 l = listener()
134 browser = Zeroconf.ServiceBrowser(server, "_hg._tcp.local.", l)
134 Zeroconf.ServiceBrowser(server, "_hg._tcp.local.", l)
135 time.sleep(1)
135 time.sleep(1)
136 server.close()
136 server.close()
137 for v in l.found.values():
137 for v in l.found.values():
@@ -894,7 +894,7 b' def debuginstall(ui):'
894 ui.status(_("Checking templates...\n"))
894 ui.status(_("Checking templates...\n"))
895 try:
895 try:
896 import templater
896 import templater
897 t = templater.templater(templater.templatepath("map-cmdline.default"))
897 templater.templater(templater.templatepath("map-cmdline.default"))
898 except Exception, inst:
898 except Exception, inst:
899 ui.write(" %s\n" % inst)
899 ui.write(" %s\n" % inst)
900 ui.write(_(" (templates seem to have been installed incorrectly)\n"))
900 ui.write(_(" (templates seem to have been installed incorrectly)\n"))
@@ -1690,8 +1690,8 b' def import_(ui, repo, patch1, *patches, '
1690
1690
1691 files = {}
1691 files = {}
1692 try:
1692 try:
1693 fuzz = patch.patch(tmpname, ui, strip=strip, cwd=repo.root,
1693 patch.patch(tmpname, ui, strip=strip, cwd=repo.root,
1694 files=files)
1694 files=files)
1695 finally:
1695 finally:
1696 files = patch.updatedir(ui, repo, files, similarity=sim/100.)
1696 files = patch.updatedir(ui, repo, files, similarity=sim/100.)
1697 if not opts.get('no_commit'):
1697 if not opts.get('no_commit'):
@@ -233,7 +233,7 b' class filectx(object):'
233
233
234 def __nonzero__(self):
234 def __nonzero__(self):
235 try:
235 try:
236 n = self._filenode
236 self._filenode
237 return True
237 return True
238 except error.LookupError:
238 except error.LookupError:
239 # file is missing
239 # file is missing
@@ -494,7 +494,7 b' def error_handler(url):'
494 HANDLE_ERRORS = i
494 HANDLE_ERRORS = i
495 try:
495 try:
496 fo = urllib2.urlopen(url)
496 fo = urllib2.urlopen(url)
497 foo = fo.read()
497 fo.read()
498 fo.close()
498 fo.close()
499 try: status, reason = fo.status, fo.reason
499 try: status, reason = fo.status, fo.reason
500 except AttributeError: status, reason = None, None
500 except AttributeError: status, reason = None, None
@@ -835,7 +835,7 b' class revlog(object):'
835 # odds of a binary node being all hex in ASCII are 1 in 10**25
835 # odds of a binary node being all hex in ASCII are 1 in 10**25
836 try:
836 try:
837 node = id
837 node = id
838 r = self.rev(node) # quick search the index
838 self.rev(node) # quick search the index
839 return node
839 return node
840 except LookupError:
840 except LookupError:
841 pass # may be partial hex id
841 pass # may be partial hex id
@@ -855,7 +855,7 b' class revlog(object):'
855 try:
855 try:
856 # a full hex nodeid?
856 # a full hex nodeid?
857 node = bin(id)
857 node = bin(id)
858 r = self.rev(node)
858 self.rev(node)
859 return node
859 return node
860 except (TypeError, LookupError):
860 except (TypeError, LookupError):
861 pass
861 pass
@@ -219,7 +219,7 b' def _verify(repo):'
219 warn(_("warning: %s@%s: copy source revision is nullid %s:%s")
219 warn(_("warning: %s@%s: copy source revision is nullid %s:%s")
220 % (f, lr, rp[0], short(rp[1])))
220 % (f, lr, rp[0], short(rp[1])))
221 else:
221 else:
222 rev = fl2.rev(rp[1])
222 fl2.rev(rp[1])
223 except Exception, inst:
223 except Exception, inst:
224 exc(lr, _("checking rename of %s") % short(n), inst, f)
224 exc(lr, _("checking rename of %s") % short(n), inst, f)
225
225
General Comments 0
You need to be logged in to leave comments. Login now