Mercurial > hg-stable
changeset 75:b942bbe4bb84
Fix a bug in patches() if there's not text and no patch
author | mpm@selenic.com |
---|---|
date | Tue, 17 May 2005 00:32:18 -0800 |
parents | 401e18c95ad3 |
children | d993ebd69d28 |
files | mercurial/mdiff.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mdiff.py Tue May 17 00:30:01 2005 -0800 +++ b/mercurial/mdiff.py Tue May 17 00:32:18 2005 -0800 @@ -71,6 +71,9 @@ bl = len(a) + pl tl = bl + bl + pl # enough for the patches and two working texts b1, b2 = 0, bl + + if not tl: return a + m = mmap.mmap(devzero.fileno(), tl, mmap.MAP_PRIVATE) # load our original text