Show More
@@ -582,7 +582,7 b' class Translator(nodes.NodeVisitor):' | |||
|
582 | 582 | self._docinfo[name], |
|
583 | 583 | self.defs['indent'][1], |
|
584 | 584 | self.defs['indent'][1])) |
|
585 |
elif not |
|
|
585 | elif name not in skip: | |
|
586 | 586 | if name in self._docinfo_names: |
|
587 | 587 | label = self._docinfo_names[name] |
|
588 | 588 | else: |
@@ -190,7 +190,7 b' class converter(object):' | |||
|
190 | 190 | children.setdefault(n, []) |
|
191 | 191 | hasparent = False |
|
192 | 192 | for p in parents[n]: |
|
193 |
if not |
|
|
193 | if p not in self.map: | |
|
194 | 194 | visit.append(p) |
|
195 | 195 | hasparent = True |
|
196 | 196 | children.setdefault(p, []).append(n) |
@@ -224,7 +224,7 b' class mercurial_sink(converter_sink):' | |||
|
224 | 224 | bookmarks.write(self.repo) |
|
225 | 225 | |
|
226 | 226 | def hascommit(self, rev): |
|
227 |
if not |
|
|
227 | if rev not in self.repo and self.clonebranches: | |
|
228 | 228 | raise util.Abort(_('revision %s not found in destination ' |
|
229 | 229 | 'repository (lookups with clonebranches=true ' |
|
230 | 230 | 'are not implemented)') % rev) |
@@ -88,7 +88,7 b' def snapshot(ui, repo, files, node, tmpr' | |||
|
88 | 88 | ctx = repo[node] |
|
89 | 89 | for fn in files: |
|
90 | 90 | wfn = util.pconvert(fn) |
|
91 |
if not |
|
|
91 | if wfn not in ctx: | |
|
92 | 92 | # File doesn't exist; could be a bogus modify |
|
93 | 93 | continue |
|
94 | 94 | ui.note(' %s\n' % wfn) |
@@ -238,7 +238,7 b' class kwtemplater(object):' | |||
|
238 | 238 | def iskwfile(self, cand, ctx): |
|
239 | 239 | '''Returns subset of candidates which are configured for keyword |
|
240 | 240 | expansion but are not symbolic links.''' |
|
241 |
return [f for f in cand if self.match(f) and |
|
|
241 | return [f for f in cand if self.match(f) and 'l' not in ctx.flags(f)] | |
|
242 | 242 | |
|
243 | 243 | def overwrite(self, ctx, candidates, lookup, expand, rekw=False): |
|
244 | 244 | '''Overwrites selected files expanding/shrinking keywords.''' |
@@ -651,7 +651,7 b' def reposetup(ui, repo):' | |||
|
651 | 651 | return kwt.match(source) |
|
652 | 652 | |
|
653 | 653 | candidates = [f for f in repo.dirstate.copies() if |
|
654 |
|
|
|
654 | 'l' not in wctx.flags(f) and haskwsource(f)] | |
|
655 | 655 | kwt.overwrite(wctx, candidates, False, False) |
|
656 | 656 | |
|
657 | 657 | def kw_dorecord(orig, ui, repo, commitfunc, *pats, **opts): |
@@ -680,7 +680,7 b' def reposetup(ui, repo):' | |||
|
680 | 680 | # not make sense |
|
681 | 681 | if (fctx._filerev is None and |
|
682 | 682 | (self._repo._encodefilterpats or |
|
683 |
kwt.match(fctx.path()) and |
|
|
683 | kwt.match(fctx.path()) and 'l' not in fctx.flags() or | |
|
684 | 684 | self.size() - 4 == fctx.size()) or |
|
685 | 685 | self.size() == fctx.size()): |
|
686 | 686 | return self._filelog.cmp(self._filenode, fctx.data()) |
@@ -14,7 +14,7 b' class wirestore(remotestore.remotestore)' | |||
|
14 | 14 | if not cap: |
|
15 | 15 | raise lfutil.storeprotonotcapable([]) |
|
16 | 16 | storetypes = cap.split(',') |
|
17 |
if |
|
|
17 | if 'serve' not in storetypes: | |
|
18 | 18 | raise lfutil.storeprotonotcapable(storetypes) |
|
19 | 19 | self.remote = remote |
|
20 | 20 | super(wirestore, self).__init__(ui, repo, remote.url()) |
@@ -79,7 +79,7 b' def collect(src, ui):' | |||
|
79 | 79 | dirnames.sort() |
|
80 | 80 | relpath = dirpath[len(src) + seplen:] |
|
81 | 81 | for filename in sorted(filenames): |
|
82 |
if |
|
|
82 | if filename[-2:] not in ('.d', '.i'): | |
|
83 | 83 | continue |
|
84 | 84 | st = os.stat(os.path.join(dirpath, filename)) |
|
85 | 85 | if not stat.S_ISREG(st.st_mode): |
@@ -54,7 +54,7 b' class bundlerevlog(revlog.revlog):' | |||
|
54 | 54 | continue |
|
55 | 55 | |
|
56 | 56 | for p in (p1, p2): |
|
57 |
if not |
|
|
57 | if p not in self.nodemap: | |
|
58 | 58 | raise error.LookupError(p, self.indexfile, |
|
59 | 59 | _("unknown parent")) |
|
60 | 60 | # start, size, full unc. size, base (unused), link, p1, p2, node |
@@ -696,7 +696,7 b' class dirstate(object):' | |||
|
696 | 696 | visit = sorted([f for f in dmap if f not in results and matchfn(f)]) |
|
697 | 697 | for nf, st in zip(visit, util.statfiles([join(i) for i in visit])): |
|
698 | 698 | if (not st is None and |
|
699 |
|
|
|
699 | getkind(st.st_mode) not in (regkind, lnkkind)): | |
|
700 | 700 | st = None |
|
701 | 701 | results[nf] = st |
|
702 | 702 | for s in subrepos: |
@@ -706,7 +706,7 b' def lsprofile(ui, func, fp):' | |||
|
706 | 706 | field = ui.config('profiling', 'sort', default='inlinetime') |
|
707 | 707 | climit = ui.configint('profiling', 'nested', default=5) |
|
708 | 708 | |
|
709 |
if not |
|
|
709 | if format not in ['text', 'kcachegrind']: | |
|
710 | 710 | ui.warn(_("unrecognized profiling format '%s'" |
|
711 | 711 | " - Ignored\n") % format) |
|
712 | 712 | format = 'text' |
@@ -136,7 +136,7 b' class ConnectionManager(object):' | |||
|
136 | 136 | def add(self, host, connection, ready): |
|
137 | 137 | self._lock.acquire() |
|
138 | 138 | try: |
|
139 |
if not |
|
|
139 | if host not in self._hostmap: | |
|
140 | 140 | self._hostmap[host] = [] |
|
141 | 141 | self._hostmap[host].append(connection) |
|
142 | 142 | self._connmap[connection] = host |
@@ -1659,7 +1659,7 b' def difflabel(func, *args, **kw):' | |||
|
1659 | 1659 | if line.startswith('@'): |
|
1660 | 1660 | head = False |
|
1661 | 1661 | else: |
|
1662 |
if line and |
|
|
1662 | if line and line[0] not in ' +-@\\': | |
|
1663 | 1663 | head = True |
|
1664 | 1664 | stripline = line |
|
1665 | 1665 | if not head and line and line[0] in '+-': |
@@ -119,7 +119,7 b' else:' | |||
|
119 | 119 | flags = _O_TEXT |
|
120 | 120 | |
|
121 | 121 | m0 = mode[0] |
|
122 |
if m0 == 'r' and |
|
|
122 | if m0 == 'r' and '+' not in mode: | |
|
123 | 123 | flags |= _O_RDONLY |
|
124 | 124 | access = _GENERIC_READ |
|
125 | 125 | else: |
@@ -1208,7 +1208,7 b' class revlog(object):' | |||
|
1208 | 1208 | continue |
|
1209 | 1209 | |
|
1210 | 1210 | for p in (p1, p2): |
|
1211 |
if not |
|
|
1211 | if p not in self.nodemap: | |
|
1212 | 1212 | raise LookupError(p, self.indexfile, |
|
1213 | 1213 | _('unknown parent')) |
|
1214 | 1214 |
@@ -260,7 +260,7 b' def person(author):' | |||
|
260 | 260 | >>> person('"Foo Bar <foo@bar>') |
|
261 | 261 | 'Foo Bar' |
|
262 | 262 | """ |
|
263 |
if |
|
|
263 | if '@' not in author: | |
|
264 | 264 | return author |
|
265 | 265 | f = author.find('<') |
|
266 | 266 | if f != -1: |
@@ -312,7 +312,7 b' class templater(object):' | |||
|
312 | 312 | |
|
313 | 313 | def load(self, t): |
|
314 | 314 | '''Get the template for the given template name. Use a local cache.''' |
|
315 |
if not |
|
|
315 | if t not in self.cache: | |
|
316 | 316 | try: |
|
317 | 317 | self.cache[t] = util.readfile(self.map[t][1]) |
|
318 | 318 | except KeyError, inst: |
@@ -43,7 +43,7 b' def runtest():' | |||
|
43 | 43 | print "reposet = %r" % (reposet,) |
|
44 | 44 | print "sub1set and reposet should have exactly one path in common." |
|
45 | 45 | sub3 = pjoin('.', 'circle', 'top1') |
|
46 |
if sym and not |
|
|
46 | if sym and sub3 not in reposet: | |
|
47 | 47 | print "reposet = %r" % (reposet,) |
|
48 | 48 | print "Symbolic links are supported and %s is not in reposet" % (sub3,) |
|
49 | 49 |
General Comments 0
You need to be logged in to leave comments.
Login now