comparison hg @ 54:b24731008221

Fix lsdiff filtering
author mpm@selenic.com
date Wed, 11 May 2005 14:37:23 -0800
parents 9f3097864c35
children ad2ea1185f04
comparison
equal deleted inserted replaced
53:9f3097864c35 54:b24731008221
153 text += l 153 text += l
154 154
155 if os.system("patch -p%d < %s %s" % (strip, pf, quiet)): 155 if os.system("patch -p%d < %s %s" % (strip, pf, quiet)):
156 raise "patch failed!" 156 raise "patch failed!"
157 f = os.popen("lsdiff --strip %d %s" % (strip, pf)) 157 f = os.popen("lsdiff --strip %d %s" % (strip, pf))
158 files = filter(map(lambda x: x.rstrip(), f.read().splitlines())) 158 files = filter(None, map(lambda x: x.rstrip(), f.read().splitlines()))
159 f.close() 159 f.close()
160 repo.commit(repo.current, files, text) 160 repo.commit(repo.current, files, text)
161 161
162 elif cmd == "status": 162 elif cmd == "status":
163 (c, a, d) = repo.diffdir(repo.root, repo.current) 163 (c, a, d) = repo.diffdir(repo.root, repo.current)