Mercurial > public > mercurial-scm > hg-stable
diff mercurial/mdiff.py @ 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 | 4a6ab4d80dc4 |
children | bae6f0328f63 |
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