hgext/mq.py
changeset 41599 106b0bec162a
parent 41592 e67a85e0f19e
child 41779 6ed520c3e932
equal deleted inserted replaced
41598:e89e78a725ee 41599:106b0bec162a
   736     def backup(self, repo, files, copy=False):
   736     def backup(self, repo, files, copy=False):
   737         # backup local changes in --force case
   737         # backup local changes in --force case
   738         for f in sorted(files):
   738         for f in sorted(files):
   739             absf = repo.wjoin(f)
   739             absf = repo.wjoin(f)
   740             if os.path.lexists(absf):
   740             if os.path.lexists(absf):
   741                 absorig = scmutil.origpath(self.ui, repo, absf)
   741                 absorig = scmutil.backuppath(self.ui, repo, f)
   742                 self.ui.note(_('saving current version of %s as %s\n') %
   742                 self.ui.note(_('saving current version of %s as %s\n') %
   743                              (f, os.path.relpath(absorig)))
   743                              (f, os.path.relpath(absorig)))
   744 
   744 
   745                 if copy:
   745                 if copy:
   746                     util.copyfile(absf, absorig)
   746                     util.copyfile(absf, absorig)