# HG changeset patch # User mpm@selenic.com # Date 1115851043 28800 # Node ID b24731008221f78e59155a9f896a6db705fe294d # Parent 9f3097864c35897f97fbacac4f4517e53fec01b9 Fix lsdiff filtering diff --git a/hg b/hg --- a/hg +++ b/hg @@ -155,7 +155,7 @@ elif cmd == "import" or cmd == "patch": if os.system("patch -p%d < %s %s" % (strip, pf, quiet)): raise "patch failed!" f = os.popen("lsdiff --strip %d %s" % (strip, pf)) - files = filter(map(lambda x: x.rstrip(), f.read().splitlines())) + files = filter(None, map(lambda x: x.rstrip(), f.read().splitlines())) f.close() repo.commit(repo.current, files, text)