mercurial/localrepo.py
changeset 8515 865e08a7d6b0
parent 8503 90f86a5330bb
child 8527 f9a80054dd3c
equal deleted inserted replaced
8514:252232621165 8515:865e08a7d6b0
   767 
   767 
   768         return fparent1
   768         return fparent1
   769 
   769 
   770     def commit(self, files=None, text="", user=None, date=None, match=None,
   770     def commit(self, files=None, text="", user=None, date=None, match=None,
   771                force=False, editor=False, extra={}):
   771                force=False, editor=False, extra={}):
       
   772         """Add a new revision to current repository.
       
   773 
       
   774         Revision information is gathered from the working directory, files and
       
   775         match can be used to filter the committed files.
       
   776         If editor is supplied, it is called to get a commit message.
       
   777         """
   772         wlock = self.wlock()
   778         wlock = self.wlock()
   773         try:
   779         try:
   774             p1, p2 = self.dirstate.parents()
   780             p1, p2 = self.dirstate.parents()
   775 
   781 
   776             if (not force and p2 != nullid and match and
   782             if (not force and p2 != nullid and match and
   826 
   832 
   827     def commitctx(self, ctx, error=False):
   833     def commitctx(self, ctx, error=False):
   828         """Add a new revision to current repository.
   834         """Add a new revision to current repository.
   829 
   835 
   830         Revision information is passed via the context argument.
   836         Revision information is passed via the context argument.
   831         If editor is supplied, it is called to get a commit message.
       
   832         If working is set, the working directory is affected.
       
   833         """
   837         """
   834 
   838 
   835         tr = lock = None
   839         tr = lock = None
   836         removed = ctx.removed()
   840         removed = ctx.removed()
   837         p1, p2 = ctx.p1(), ctx.p2()
   841         p1, p2 = ctx.p1(), ctx.p2()