Mercurial > public > mercurial-scm > hg
diff mercurial/patch.py @ 16662:ea7bf1d49bce
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 12 May 2012 12:23:49 +0200 |
parents | aef3d0d4631c fcb97d9a26cd |
children | 525fdb738975 |
line wrap: on
line diff
--- 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