Mercurial > hg
changeset 49:14bff5d8e526
Import comments from patches
author | mpm@selenic.com |
---|---|
date | Wed, 11 May 2005 13:56:22 -0800 |
parents | 9f64181ff9a9 |
children | 0263ce8be574 |
files | hg |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hg Wed May 11 09:44:12 2005 -0800 +++ b/hg Wed May 11 13:56:22 2005 -0800 @@ -20,7 +20,7 @@ from mercurial import hg, mdiff, fancyopts def help(): - print """\ + print """\ commands: init create a new repository in this directory @@ -142,12 +142,18 @@ for patch in args: ui.status("applying %s\n" % patch) - pf = d + patch + pf = os.path.join(d, patch) + + text = "" + for l in file(pf): + if l[:3] == "---": break + text += l + os.system("patch -p%d < %s > /dev/null" % (strip, pf)) f = os.popen("lsdiff --strip %d %s" % (strip, pf)) files = f.read().splitlines() f.close() - repo.commit(repo.current, files) + repo.commit(repo.current, files, text) elif cmd == "status": (c, a, d) = repo.diffdir(repo.root, repo.current)