hgext/mq.py
changeset 4722 487943b52a6c
parent 4713 c29ee52e0b68
child 4730 eadfaa9ec487
equal deleted inserted replaced
4721:96614af3c679 4722:487943b52a6c
   610         commitfiles = m + a + r
   610         commitfiles = m + a + r
   611         self.check_toppatch(repo)
   611         self.check_toppatch(repo)
   612         wlock = repo.wlock()
   612         wlock = repo.wlock()
   613         insert = self.full_series_end()
   613         insert = self.full_series_end()
   614         if msg:
   614         if msg:
   615             n = repo.commit(commitfiles, "[mq]: %s" % msg, force=True,
   615             n = repo.commit(commitfiles, msg, force=True, wlock=wlock)
   616                             wlock=wlock)
       
   617         else:
   616         else:
   618             n = repo.commit(commitfiles,
   617             n = repo.commit(commitfiles,
   619                             "New patch: %s" % patch, force=True, wlock=wlock)
   618                             "[mq]: %s" % patch, force=True, wlock=wlock)
   620         if n == None:
   619         if n == None:
   621             raise util.Abort(_("repo commit failed"))
   620             raise util.Abort(_("repo commit failed"))
   622         self.full_series[insert:insert] = [patch]
   621         self.full_series[insert:insert] = [patch]
   623         self.applied.append(statusentry(revlog.hex(n), patch))
   622         self.applied.append(statusentry(revlog.hex(n), patch))
   624         self.parse_series()
   623         self.parse_series()
  1027             repo.dirstate.update(mm, 'n', st_mtime=-1, st_size=-1)
  1026             repo.dirstate.update(mm, 'n', st_mtime=-1, st_size=-1)
  1028             repo.dirstate.forget(forget)
  1027             repo.dirstate.forget(forget)
  1029 
  1028 
  1030             if not msg:
  1029             if not msg:
  1031                 if not message:
  1030                 if not message:
  1032                     message = "patch queue: %s\n" % patchfn
  1031                     message = "[mq]: %s\n" % patchfn
  1033                 else:
  1032                 else:
  1034                     message = "\n".join(message)
  1033                     message = "\n".join(message)
  1035             else:
  1034             else:
  1036                 message = msg
  1035                 message = msg
  1037 
  1036 
  1563     files after the patch name to add only changes to matching files
  1562     files after the patch name to add only changes to matching files
  1564     to the new patch, leaving the rest as uncommitted modifications.
  1563     to the new patch, leaving the rest as uncommitted modifications.
  1565 
  1564 
  1566     -e, -m or -l set the patch header as well as the commit message.
  1565     -e, -m or -l set the patch header as well as the commit message.
  1567     If none is specified, the patch header is empty and the
  1566     If none is specified, the patch header is empty and the
  1568     commit message is 'New patch: PATCH'"""
  1567     commit message is '[mq]: PATCH'"""
  1569     q = repo.mq
  1568     q = repo.mq
  1570     message = cmdutil.logmessage(opts)
  1569     message = cmdutil.logmessage(opts)
  1571     if opts['edit']:
  1570     if opts['edit']:
  1572         message = ui.edit(message, ui.username())
  1571         message = ui.edit(message, ui.username())
  1573     opts['msg'] = message
  1572     opts['msg'] = message