comparison hgext/mq.py @ 2745:1bac2bfe081a

Change patch header as well as commit message with qrefresh -m or -l.
author Brendan Cully <brendan@kublai.com>
date Mon, 31 Jul 2006 18:47:43 -0700
parents 2f13f8d3fe80
children 0503eb5c0a33
comparison
equal deleted inserted replaced
2744:b5779a04f208 2745:1bac2bfe081a
809 cparents = repo.changelog.parents(top) 809 cparents = repo.changelog.parents(top)
810 patchparent = self.qparents(repo, top) 810 patchparent = self.qparents(repo, top)
811 message, comments, user, date, patchfound = self.readheaders(patch) 811 message, comments, user, date, patchfound = self.readheaders(patch)
812 812
813 patchf = self.opener(patch, "w") 813 patchf = self.opener(patch, "w")
814 msg = msg.rstrip()
815 if msg:
816 if comments:
817 # Remove existing message.
818 ci = 0
819 for mi in range(len(message)):
820 while message[mi] != comments[ci]:
821 ci += 1
822 del comments[ci]
823 comments.append(msg)
814 if comments: 824 if comments:
815 comments = "\n".join(comments) + '\n\n' 825 comments = "\n".join(comments) + '\n\n'
816 patchf.write(comments) 826 patchf.write(comments)
817 827
818 tip = repo.changelog.tip() 828 tip = repo.changelog.tip()