Show More
@@ -644,7 +644,7 b' def cat(ui, repo, file1, *pats, **opts):' | |||||
644 | n = mf[abs] |
|
644 | n = mf[abs] | |
645 | except (hg.RepoError, KeyError): |
|
645 | except (hg.RepoError, KeyError): | |
646 | try: |
|
646 | try: | |
647 | n = r.lookup(rev) |
|
647 | n = r.lookup(rev) # XXX rev undefined! | |
648 | except KeyError, inst: |
|
648 | except KeyError, inst: | |
649 | raise util.Abort(_('cannot find file %s in rev %s'), rel, rev) |
|
649 | raise util.Abort(_('cannot find file %s in rev %s'), rel, rev) | |
650 | else: |
|
650 | else: | |
@@ -1016,7 +1016,7 b' def debugrename(ui, repo, file, rev=None' | |||||
1016 | change = repo.changelog.read(n) |
|
1016 | change = repo.changelog.read(n) | |
1017 | m = repo.manifest.read(change[0]) |
|
1017 | m = repo.manifest.read(change[0]) | |
1018 | n = m[relpath(repo, [file])[0]] |
|
1018 | n = m[relpath(repo, [file])[0]] | |
1019 | except hg.RepoError, KeyError: |
|
1019 | except (hg.RepoError, KeyError): | |
1020 | n = r.lookup(rev) |
|
1020 | n = r.lookup(rev) | |
1021 | else: |
|
1021 | else: | |
1022 | n = r.tip() |
|
1022 | n = r.tip() | |
@@ -2470,7 +2470,7 b' def dispatch(args):' | |||||
2470 |
|
2470 | |||
2471 | external = [] |
|
2471 | external = [] | |
2472 | for x in u.extensions(): |
|
2472 | for x in u.extensions(): | |
2473 | def on_exception(Exception, inst): |
|
2473 | def on_exception(Exception, inst): # XXX Exception is a builtin name!? | |
2474 | u.warn(_("*** failed to import extension %s\n") % x[1]) |
|
2474 | u.warn(_("*** failed to import extension %s\n") % x[1]) | |
2475 | u.warn("%s\n" % inst) |
|
2475 | u.warn("%s\n" % inst) | |
2476 | if "--traceback" in sys.argv[1:]: |
|
2476 | if "--traceback" in sys.argv[1:]: |
@@ -213,7 +213,7 b' class dirstate:' | |||||
213 | unknown = [] |
|
213 | unknown = [] | |
214 |
|
214 | |||
215 | for x in files: |
|
215 | for x in files: | |
216 |
if x |
|
216 | if x == '.': | |
217 | return self.map.copy() |
|
217 | return self.map.copy() | |
218 | if x not in self.map: |
|
218 | if x not in self.map: | |
219 | unknown.append(x) |
|
219 | unknown.append(x) | |
@@ -296,7 +296,6 b' class dirstate:' | |||||
296 | def walkhelper(self, files, statmatch, dc): |
|
296 | def walkhelper(self, files, statmatch, dc): | |
297 | # recursion free walker, faster than os.walk. |
|
297 | # recursion free walker, faster than os.walk. | |
298 | def findfiles(s): |
|
298 | def findfiles(s): | |
299 | retfiles = [] |
|
|||
300 | work = [s] |
|
299 | work = [s] | |
301 | while work: |
|
300 | while work: | |
302 | top = work.pop() |
|
301 | top = work.pop() |
@@ -1,10 +1,10 b'' | |||||
1 | import getopt |
|
1 | import getopt | |
2 |
|
2 | |||
3 | def fancyopts(args, options, state): |
|
3 | def fancyopts(args, options, state): | |
4 | long=[] |
|
4 | long = [] | |
5 | short='' |
|
5 | short = '' | |
6 | map={} |
|
6 | map = {} | |
7 | dt={} |
|
7 | dt = {} | |
8 |
|
8 | |||
9 | for s, l, d, c in options: |
|
9 | for s, l, d, c in options: | |
10 | pl = l.replace('-', '_') |
|
10 | pl = l.replace('-', '_') |
@@ -58,7 +58,7 b' class filelog(revlog):' | |||||
58 | return self.addrevision(text, transaction, link, p1, p2) |
|
58 | return self.addrevision(text, transaction, link, p1, p2) | |
59 |
|
59 | |||
60 | def renamed(self, node): |
|
60 | def renamed(self, node): | |
61 | if 0 and self.parents(node)[0] != nullid: |
|
61 | if 0 and self.parents(node)[0] != nullid: # XXX | |
62 | return False |
|
62 | return False | |
63 | m = self.readmeta(node) |
|
63 | m = self.readmeta(node) | |
64 | if m and m.has_key("copy"): |
|
64 | if m and m.has_key("copy"): |
@@ -954,7 +954,7 b' def create_server(repo):' | |||||
954 | def server(path, name, templates, address, port, use_ipv6=False, |
|
954 | def server(path, name, templates, address, port, use_ipv6=False, | |
955 | accesslog=sys.stdout, errorlog=sys.stderr): |
|
955 | accesslog=sys.stdout, errorlog=sys.stderr): | |
956 | httpd = create_server(path, name, templates, address, port, use_ipv6, |
|
956 | httpd = create_server(path, name, templates, address, port, use_ipv6, | |
957 | accesslog, errorlog) |
|
957 | accesslog, errorlog) # XXX wrong param count | |
958 | httpd.serve_forever() |
|
958 | httpd.serve_forever() | |
959 |
|
959 | |||
960 | # This is a stopgap |
|
960 | # This is a stopgap |
@@ -5,7 +5,7 b'' | |||||
5 | # This software may be used and distributed according to the terms |
|
5 | # This software may be used and distributed according to the terms | |
6 | # of the GNU General Public License, incorporated herein by reference. |
|
6 | # of the GNU General Public License, incorporated herein by reference. | |
7 |
|
7 | |||
8 |
import |
|
8 | import struct | |
9 | from revlog import * |
|
9 | from revlog import * | |
10 | from i18n import gettext as _ |
|
10 | from i18n import gettext as _ | |
11 | from demandload import * |
|
11 | from demandload import * |
@@ -7,7 +7,7 b' This software may be used and distribute' | |||||
7 | of the GNU General Public License, incorporated herein by reference. |
|
7 | of the GNU General Public License, incorporated herein by reference. | |
8 | """ |
|
8 | """ | |
9 |
|
9 | |||
10 |
import |
|
10 | import binascii | |
11 |
|
11 | |||
12 | nullid = "\0" * 20 |
|
12 | nullid = "\0" * 20 | |
13 |
|
13 |
@@ -12,7 +12,6 b'' | |||||
12 | # of the GNU General Public License, incorporated herein by reference. |
|
12 | # of the GNU General Public License, incorporated herein by reference. | |
13 |
|
13 | |||
14 | import os |
|
14 | import os | |
15 | import util |
|
|||
16 | from i18n import gettext as _ |
|
15 | from i18n import gettext as _ | |
17 |
|
16 | |||
18 | class transaction: |
|
17 | class transaction: |
@@ -158,9 +158,11 b' def pathto(n1, n2):' | |||||
158 | this returns a path in the form used by the local filesystem, not hg.''' |
|
158 | this returns a path in the form used by the local filesystem, not hg.''' | |
159 | if not n1: return localpath(n2) |
|
159 | if not n1: return localpath(n2) | |
160 | a, b = n1.split('/'), n2.split('/') |
|
160 | a, b = n1.split('/'), n2.split('/') | |
161 |
a.reverse() |
|
161 | a.reverse() | |
|
162 | b.reverse() | |||
162 | while a and b and a[-1] == b[-1]: |
|
163 | while a and b and a[-1] == b[-1]: | |
163 |
a.pop() |
|
164 | a.pop() | |
|
165 | b.pop() | |||
164 | b.reverse() |
|
166 | b.reverse() | |
165 | return os.sep.join((['..'] * len(a)) + b) |
|
167 | return os.sep.join((['..'] * len(a)) + b) | |
166 |
|
168 | |||
@@ -253,7 +255,7 b' def _matcher(canonroot, cwd, names, inc,' | |||||
253 | try: |
|
255 | try: | |
254 | pat = '(?:%s)' % regex(k, p, tail) |
|
256 | pat = '(?:%s)' % regex(k, p, tail) | |
255 | matches.append(re.compile(pat).match) |
|
257 | matches.append(re.compile(pat).match) | |
256 |
except re.error |
|
258 | except re.error: | |
257 | raise Abort("invalid pattern: %s:%s" % (k, p)) |
|
259 | raise Abort("invalid pattern: %s:%s" % (k, p)) | |
258 |
|
260 | |||
259 | def buildfn(text): |
|
261 | def buildfn(text): |
General Comments 0
You need to be logged in to leave comments.
Login now