mercurial/patch.py
changeset 41454 d1d3094b54f9
parent 41401 4a33a6bf2b52
child 41498 a02c8b605d31
equal deleted inserted replaced
41453:1a4a41d39dfc 41454:d1d3094b54f9
  1607             self.before = []
  1607             self.before = []
  1608             self.hunk = []
  1608             self.hunk = []
  1609             self.headers = []
  1609             self.headers = []
  1610 
  1610 
  1611         def addrange(self, limits):
  1611         def addrange(self, limits):
       
  1612             self.addcontext([])
  1612             fromstart, fromend, tostart, toend, proc = limits
  1613             fromstart, fromend, tostart, toend, proc = limits
  1613             self.fromline = int(fromstart)
  1614             self.fromline = int(fromstart)
  1614             self.toline = int(tostart)
  1615             self.toline = int(tostart)
  1615             self.proc = proc
  1616             self.proc = proc
  1616 
  1617 
  1627 
  1628 
  1628         def addhunk(self, hunk):
  1629         def addhunk(self, hunk):
  1629             if self.context:
  1630             if self.context:
  1630                 self.before = self.context
  1631                 self.before = self.context
  1631                 self.context = []
  1632                 self.context = []
       
  1633             if self.hunk:
       
  1634                 self.addcontext([])
  1632             self.hunk = hunk
  1635             self.hunk = hunk
  1633 
  1636 
  1634         def newfile(self, hdr):
  1637         def newfile(self, hdr):
  1635             self.addcontext([])
  1638             self.addcontext([])
  1636             h = header(hdr)
  1639             h = header(hdr)