Commits

Jason Harris committed 9918ead

- Fix issue number 4.
- Collapse now removes lines beginning with 'HG:'

Comments (0)

Files changed (1)

hgext/collapse.py

 from mercurial import util, repair, merge, cmdutil, commands
 from mercurial.node import nullrev
 from mercurial.i18n import _
+import re, string
 
 def collapse(ui, repo, **opts):
     """collapse multiple revisions into one
 	
 		msg = ui.edit(msg, ui.username())
 
+		pattern = re.compile("^HG:.*\n", re.MULTILINE);
+		msg  = re.sub(pattern, "", msg).strip();
+
     if not msg:
         raise util.Abort(_('empty commit message, collapse won\'t proceed'))