hgext/mq.py
changeset 2786 f4d916351366
parent 2776 ae726521717c
child 2787 8ec1b1f0a5f7
equal deleted inserted replaced
2785:58a679745b38 2786:f4d916351366
   270     def patch(self, repo, patchfile):
   270     def patch(self, repo, patchfile):
   271         '''Apply patchfile  to the working directory.
   271         '''Apply patchfile  to the working directory.
   272         patchfile: file name of patch'''
   272         patchfile: file name of patch'''
   273         try:
   273         try:
   274             pp = util.find_in_path('gpatch', os.environ.get('PATH', ''), 'patch')
   274             pp = util.find_in_path('gpatch', os.environ.get('PATH', ''), 'patch')
   275             f = os.popen("%s -d '%s' -p1 --no-backup-if-mismatch < '%s'" %
   275             f = os.popen("%s -d %s -p1 --no-backup-if-mismatch < %s" %
   276                          (pp, repo.root, patchfile))
   276                          (pp, util.shellquote(repo.root), util.shellquote(patchfile)))
   277         except:
   277         except:
   278             self.ui.warn("patch failed, unable to continue (try -v)\n")
   278             self.ui.warn("patch failed, unable to continue (try -v)\n")
   279             return (None, [], False)
   279             return (None, [], False)
   280         files = []
   280         files = []
   281         fuzz = False
   281         fuzz = False