comparison hgext/mq.py @ 14267:6332c02b3d68

check-code: complain about set.isdisjoint
author Matt Mackall <mpm@selenic.com>
date Sun, 08 May 2011 11:39:24 -0500
parents 00a881581400
children 21719639276d
comparison
equal deleted inserted replaced
14265:e4ab5ae193f2 14267:6332c02b3d68
1172 wcfiles = set(mm + aa + rr + dd) 1172 wcfiles = set(mm + aa + rr + dd)
1173 if wcfiles: 1173 if wcfiles:
1174 for patchname in s: 1174 for patchname in s:
1175 pf = os.path.join(self.path, patchname) 1175 pf = os.path.join(self.path, patchname)
1176 patchfiles = patchmod.changedfiles(pf, strip=1) 1176 patchfiles = patchmod.changedfiles(pf, strip=1)
1177 if not wcfiles.isdisjoint(patchfiles): 1177 if wcfiles.intersection(patchfiles):
1178 self.localchangesfound(self.applied) 1178 self.localchangesfound(self.applied)
1179 elif mergeq: 1179 elif mergeq:
1180 self.check_localchanges(refresh=self.applied) 1180 self.check_localchanges(refresh=self.applied)
1181 1181
1182 all_files = set() 1182 all_files = set()
1283 m, a, r, d = repo.status(qp, top)[:4] 1283 m, a, r, d = repo.status(qp, top)[:4]
1284 parentfiles = set(m + a + r + d) 1284 parentfiles = set(m + a + r + d)
1285 if not force and parentfiles: 1285 if not force and parentfiles:
1286 mm, aa, rr, dd = repo.status()[:4] 1286 mm, aa, rr, dd = repo.status()[:4]
1287 wcfiles = set(mm + aa + rr + dd) 1287 wcfiles = set(mm + aa + rr + dd)
1288 if not wcfiles.isdisjoint(parentfiles): 1288 if wcfiles.intersection(parentfiles):
1289 self.localchangesfound() 1289 self.localchangesfound()
1290 if d: 1290 if d:
1291 raise util.Abort(_("deletions found between repo revs")) 1291 raise util.Abort(_("deletions found between repo revs"))
1292 for f in a: 1292 for f in a:
1293 try: 1293 try: