comparison mercurial/commands.py @ 21689:503bb3af70fe

memfilectx: call super.__init__ instead of duplicating code This patch changes the calling signature of memfilectx's __init__ to fall in line with the other file contexts. Calling code and tests have been updated accordingly.
author Sean Farley <sean.michael.farley@gmail.com>
date Thu, 15 Aug 2013 16:49:27 -0500
parents 652e07debf10
children 51035af2c0bf
comparison
equal deleted inserted replaced
21688:cc677803bad4 21689:503bb3af70fe
1679 else: 1679 else:
1680 ml = initialmergedlines 1680 ml = initialmergedlines
1681 ml[id * linesperrev] += " r%i" % id 1681 ml[id * linesperrev] += " r%i" % id
1682 mergedtext = "\n".join(ml) 1682 mergedtext = "\n".join(ml)
1683 files.append(fn) 1683 files.append(fn)
1684 fctxs[fn] = context.memfilectx(fn, mergedtext) 1684 fctxs[fn] = context.memfilectx(repo, fn, mergedtext)
1685 1685
1686 if overwritten_file: 1686 if overwritten_file:
1687 fn = "of" 1687 fn = "of"
1688 files.append(fn) 1688 files.append(fn)
1689 fctxs[fn] = context.memfilectx(fn, "r%i\n" % id) 1689 fctxs[fn] = context.memfilectx(repo, fn, "r%i\n" % id)
1690 1690
1691 if new_file: 1691 if new_file:
1692 fn = "nf%i" % id 1692 fn = "nf%i" % id
1693 files.append(fn) 1693 files.append(fn)
1694 fctxs[fn] = context.memfilectx(fn, "r%i\n" % id) 1694 fctxs[fn] = context.memfilectx(repo, fn, "r%i\n" % id)
1695 if len(ps) > 1: 1695 if len(ps) > 1:
1696 if not p2: 1696 if not p2:
1697 p2 = repo[ps[1]] 1697 p2 = repo[ps[1]]
1698 for fn in p2: 1698 for fn in p2:
1699 if fn.startswith("nf"): 1699 if fn.startswith("nf"):