1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Yuya Nishihara  committed cd22eb5

archive: use fileset to filter modified/created files (closes #2595)

  • Participants
  • Parent commits 694253e
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/archive.py

View file
         cmdline.append('-t')
         cmdline.append(type)
         if self.files_in_rev_chk.isChecked():
-            ctx = self.repo[rev]
-            for f in ctx.files():
-                cmdline.append('-I')
-                cmdline.append(f)
+            cmdline.extend(['-I', 'set:added() or modified()'])
         cmdline.append('--')
         cmdline.append(dest)  # dest: local str
         self.hgcmd_txt.setText(hglib.tounicode('hg ' + ' '.join(cmdline)))
         # prepare command line
         cmdline = self.compose_command(hglib.fromunicode(dest), type)
 
-        if self.files_in_rev_chk.isChecked():
-            self.savedcwd = os.getcwd()
-            os.chdir(self.repo.root)
-
         # start archiving
         self.cmd.run(cmdline)
 
         self.detail_btn.setShown(True)
 
     def command_finished(self, ret):
-        if self.files_in_rev_chk.isChecked():
-            os.chdir(self.savedcwd)
         if ret != 0 or self.cmd.outputShown()\
                 or self.keep_open_chk.isChecked():
             if not self.cmd.outputShown():