1. TortoiseHg
  2. TortoiseHg
  3. thg


Angel Ezquerra  committed c3b5e1a

chunks: Append '.bak' to the file backups created by thgrepo.thgbackup.

This makes thg interoperate better with Eclipse and similar tools, as it stops
them from finding .c or .h files in the trashcan.

  • Participants
  • Parent commits d89c534
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/thgrepo.py

View file
         def thgbackup(self, path):
             'Make a backup of the given file in the repository "trashcan"'
+            # The backup name will be the same as the orginal file plus '.bak'
             trashcan = self.join('Trashcan')
             if not os.path.isdir(trashcan):
             name = os.path.basename(path)
             root, ext = os.path.splitext(name)
-            dest = tempfile.mktemp(ext, root+'_', trashcan)
+            dest = tempfile.mktemp(ext+'.bak', root+'_', trashcan)
             shutil.copyfile(path, dest)
     return thgrepository