Mercurial > hg
changeset 12401:4cdaf1adafc8
backout most of 4f8067c94729
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 24 Sep 2010 12:46:54 -0500 |
parents | 40852b4b910c |
children | b014f998959d 52f93dc2980b |
files | hgext/convert/p4.py mercurial/ancestor.py mercurial/dirstate.py mercurial/help.py mercurial/merge.py mercurial/revset.py mercurial/simplemerge.py mercurial/util.py mercurial/win32.py |
diffstat | 9 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/p4.py Fri Sep 24 12:00:55 2010 +0200 +++ b/hgext/convert/p4.py Fri Sep 24 12:46:54 2010 -0500 @@ -177,7 +177,7 @@ elif "k" in flags: keywords = self.re_keywords - elif code in ("text", "binary"): + elif code == "text" or code == "binary": contents += data if mode is None:
--- a/mercurial/ancestor.py Fri Sep 24 12:00:55 2010 +0200 +++ b/mercurial/ancestor.py Fri Sep 24 12:46:54 2010 -0500 @@ -34,7 +34,7 @@ visit.pop() else: for p in pl: - if p in (a, b): # did we find a or b as a parent? + if p == a or p == b: # did we find a or b as a parent? return p # we're done if p not in depth: visit.append(p)
--- a/mercurial/dirstate.py Fri Sep 24 12:00:55 2010 +0200 +++ b/mercurial/dirstate.py Fri Sep 24 12:46:54 2010 -0500 @@ -531,7 +531,7 @@ match.dir(nf) if not dirignore(nf): wadd(nf) - elif kind in (regkind, lnkkind): + elif kind == regkind or kind == lnkkind: results[nf] = st else: badfn(ff, badtype(kind))
--- a/mercurial/help.py Fri Sep 24 12:00:55 2010 +0200 +++ b/mercurial/help.py Fri Sep 24 12:46:54 2010 -0500 @@ -25,7 +25,7 @@ break start = line[:3] - if start in ('"""', "'''"): + if start == '"""' or start == "'''": line = line[3:] while line: if line.rstrip().endswith(start):
--- a/mercurial/merge.py Fri Sep 24 12:00:55 2010 +0200 +++ b/mercurial/merge.py Fri Sep 24 12:46:54 2010 -0500 @@ -496,7 +496,7 @@ raise util.Abort(_("outstanding uncommitted changes " "(use 'hg status' to list changes)")) elif not overwrite: - if pa in (p1, p2): # linear + if pa == p1 or pa == p2: # linear pass # all good elif wc.files() or wc.deleted(): raise util.Abort(_("crosses branches (use 'hg merge' to merge "
--- a/mercurial/revset.py Fri Sep 24 12:00:55 2010 +0200 +++ b/mercurial/revset.py Fri Sep 24 12:46:54 2010 -0500 @@ -87,7 +87,7 @@ # helpers def getstring(x, err): - if x and x[0] in ('string', 'symbol'): + if x and (x[0] == 'string' or x[0] == 'symbol'): return x[1] raise error.ParseError(err) @@ -537,7 +537,7 @@ '-' + getstring(x[1], _("can't negate that"))), small) elif op in 'string symbol negate': return smallbonus, x # single revisions are small - elif op in ('and', 'dagrange'): + elif op == 'and' or op == 'dagrange': wa, ta = optimize(x[1], True) wb, tb = optimize(x[2], True) w = min(wa, wb)
--- a/mercurial/simplemerge.py Fri Sep 24 12:00:55 2010 +0200 +++ b/mercurial/simplemerge.py Fri Sep 24 12:46:54 2010 -0500 @@ -110,7 +110,7 @@ if what == 'unchanged': for i in range(t[1], t[2]): yield self.base[i] - elif what in ('a', 'same'): + elif what == 'a' or what == 'same': for i in range(t[1], t[2]): yield self.a[i] elif what == 'b': @@ -142,7 +142,7 @@ if what == 'unchanged': for i in range(t[1], t[2]): yield 'u | ' + self.base[i] - elif what in ('a', 'same'): + elif what == 'a' or what == 'same': for i in range(t[1], t[2]): yield what[0] + ' | ' + self.a[i] elif what == 'b': @@ -181,7 +181,7 @@ what = t[0] if what == 'unchanged': yield what, self.base[t[1]:t[2]] - elif what in ('a', 'same'): + elif what == 'a' or what == 'same': yield what, self.a[t[1]:t[2]] elif what == 'b': yield what, self.b[t[1]:t[2]]
--- a/mercurial/util.py Fri Sep 24 12:00:55 2010 +0200 +++ b/mercurial/util.py Fri Sep 24 12:46:54 2010 -0500 @@ -640,7 +640,7 @@ # If name is absolute, make it relative if name.lower().startswith(root.lower()): l = len(root) - if name[l] in (os.sep, os.altsep): + if name[l] == os.sep or name[l] == os.altsep: l = l + 1 name = name[l:] @@ -1008,7 +1008,7 @@ hours = int(tz[1:3]) minutes = int(tz[3:5]) return -sign * (hours * 60 + minutes) * 60 - if tz in ("GMT", "UTC"): + if tz == "GMT" or tz == "UTC": return 0 return None
--- a/mercurial/win32.py Fri Sep 24 12:00:55 2010 +0200 +++ b/mercurial/win32.py Fri Sep 24 12:46:54 2010 -0500 @@ -50,7 +50,7 @@ if not dirname: dirname = '.' dt = win32file.GetDriveType(dirname + '\\') - if dt in (4, 1): + if dt == 4 or dt == 1: # Fake hardlink to force COW for network drives links = 2 return links