Mercurial > hg
comparison hgext/mq.py @ 20773:efbf15979538
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 18 Mar 2014 14:25:28 -0500 |
parents | 277dc5f27310 1e686e55780c |
children | 7f7c8ef31c5d |
comparison
equal
deleted
inserted
replaced
20764:d9378bfa0af0 | 20773:efbf15979538 |
---|---|
1081 p.write("# User " + user + "\n") | 1081 p.write("# User " + user + "\n") |
1082 if date: | 1082 if date: |
1083 p.write("# Date %s %s\n\n" % date) | 1083 p.write("# Date %s %s\n\n" % date) |
1084 if util.safehasattr(msg, '__call__'): | 1084 if util.safehasattr(msg, '__call__'): |
1085 msg = msg() | 1085 msg = msg() |
1086 repo.savecommitmessage(msg) | |
1086 commitmsg = msg and msg or ("[mq]: %s" % patchfn) | 1087 commitmsg = msg and msg or ("[mq]: %s" % patchfn) |
1087 n = newcommit(repo, None, commitmsg, user, date, match=match, | 1088 n = newcommit(repo, None, commitmsg, user, date, match=match, |
1088 force=True) | 1089 force=True) |
1089 if n is None: | 1090 if n is None: |
1090 raise util.Abort(_("repo commit failed")) | 1091 raise util.Abort(_("repo commit failed")) |
2575 message.extend(msg) | 2576 message.extend(msg) |
2576 message = '\n'.join(message) | 2577 message = '\n'.join(message) |
2577 | 2578 |
2578 if opts.get('edit'): | 2579 if opts.get('edit'): |
2579 message = ui.edit(message, user or ui.username()) | 2580 message = ui.edit(message, user or ui.username()) |
2581 repo.savecommitmessage(message) | |
2580 | 2582 |
2581 diffopts = q.patchopts(q.diffopts(), *patches) | 2583 diffopts = q.patchopts(q.diffopts(), *patches) |
2582 wlock = repo.wlock() | 2584 wlock = repo.wlock() |
2583 try: | 2585 try: |
2584 q.refresh(repo, msg=message, git=diffopts.git) | 2586 q.refresh(repo, msg=message, git=diffopts.git) |