##// END OF EJS Templates
Import comments from patches
mpm@selenic.com -
r49:14bff5d8 default
parent child Browse files
Show More
@@ -142,12 +142,18 b' elif cmd == "import" or cmd == "patch":'
142
142
143 for patch in args:
143 for patch in args:
144 ui.status("applying %s\n" % patch)
144 ui.status("applying %s\n" % patch)
145 pf = d + patch
145 pf = os.path.join(d, patch)
146
147 text = ""
148 for l in file(pf):
149 if l[:3] == "---": break
150 text += l
151
146 os.system("patch -p%d < %s > /dev/null" % (strip, pf))
152 os.system("patch -p%d < %s > /dev/null" % (strip, pf))
147 f = os.popen("lsdiff --strip %d %s" % (strip, pf))
153 f = os.popen("lsdiff --strip %d %s" % (strip, pf))
148 files = f.read().splitlines()
154 files = f.read().splitlines()
149 f.close()
155 f.close()
150 repo.commit(repo.current, files)
156 repo.commit(repo.current, files, text)
151
157
152 elif cmd == "status":
158 elif cmd == "status":
153 (c, a, d) = repo.diffdir(repo.root, repo.current)
159 (c, a, d) = repo.diffdir(repo.root, repo.current)
General Comments 0
You need to be logged in to leave comments. Login now