mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
Change patch header as well as commit message with qrefresh -m or -l.
This commit is contained in:
parent
0dab08cb0c
commit
c05a6aafc0
10
hgext/mq.py
10
hgext/mq.py
@ -811,6 +811,16 @@ class queue:
|
||||
message, comments, user, date, patchfound = self.readheaders(patch)
|
||||
|
||||
patchf = self.opener(patch, "w")
|
||||
msg = msg.rstrip()
|
||||
if msg:
|
||||
if comments:
|
||||
# Remove existing message.
|
||||
ci = 0
|
||||
for mi in range(len(message)):
|
||||
while message[mi] != comments[ci]:
|
||||
ci += 1
|
||||
del comments[ci]
|
||||
comments.append(msg)
|
||||
if comments:
|
||||
comments = "\n".join(comments) + '\n\n'
|
||||
patchf.write(comments)
|
||||
|
Loading…
Reference in New Issue
Block a user