mercurial/commands.py
changeset 443 470a83212dda
parent 437 5b38a5af4019
child 452 a1e91c24dab5
equal deleted inserted replaced
442:3e2aee6c5500 443:470a83212dda
   395         for l in f.read().splitlines():
   395         for l in f.read().splitlines():
   396             l.rstrip('\r\n');
   396             l.rstrip('\r\n');
   397             if not quiet:
   397             if not quiet:
   398                 print l
   398                 print l
   399             if l[:14] == 'patching file ':
   399             if l[:14] == 'patching file ':
   400                 files.append(l[14:])
   400                 pf = l[14:]
   401         f.close()
   401                 if pf not in files:
       
   402                     files.append(pf)
       
   403         patcherr = f.close()
       
   404         if patcherr:
       
   405             sys.stderr.write("patch failed")
       
   406             sys.exit(1)
   402 
   407 
   403         if len(files) > 0:
   408         if len(files) > 0:
   404             addremove(ui, repo, *files)
   409             addremove(ui, repo, *files)
   405         repo.commit(files, text)
   410         repo.commit(files, text)
   406 
   411