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