changeset 16662 | ea7bf1d49bce |
parent 16567 | aef3d0d4631c |
parent 16650 | fcb97d9a26cd |
child 16683 | 525fdb738975 |
--- a/mercurial/patch.py Sat May 12 10:20:57 2012 +0200 +++ b/mercurial/patch.py Sat May 12 12:23:49 2012 +0200 @@ -1014,9 +1014,9 @@ oldstart = self.starta + top newstart = self.startb + top # zero length hunk ranges already have their start decremented - if self.lena: + if self.lena and oldstart > 0: oldstart -= 1 - if self.lenb: + if self.lenb and newstart > 0: newstart -= 1 return old, oldstart, new, newstart