# HG changeset patch # User mpm@selenic.com # Date 1116318738 28800 # Node ID b942bbe4bb84c667f34a7796415a3e439b5b4577 # Parent 401e18c95ad381fa53adeb2f598a63fd70098e54 Fix a bug in patches() if there's not text and no patch diff -r 401e18c95ad3 -r b942bbe4bb84 mercurial/mdiff.py --- 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