Commits

Ruslan Yushchenko  committed cadcb91

rebase: add collapse rebased changesets option (fixes #1381)

  • Participants
  • Parent commits a3332b6
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/rebase.py

                                      'from their original branch'))
         self.detachchk.setChecked(opts.get('detach', True))
         self.layout().addWidget(self.detachchk)
+        self.collapsechk = QCheckBox(_('Collapse the rebased changesets '))
+        self.collapsechk.setChecked(opts.get('collapse', False))
+        self.layout().addWidget(self.collapsechk)
 
         self.autoresolvechk = QCheckBox(_('Automatically resolve merge conflicts '
                                            'where possible'))
         self.bbox = bbox
 
         if self.checkResolve() or not (s or d):
-            for w in (srcb, destb, sep, self.keepchk, self.detachchk,
-                      self.keepbrancheschk):
+            for w in (srcb, destb, sep, self.keepchk, self.detachchk, 
+                      self.collapsechk, self.keepbrancheschk):
                 w.setHidden(True)
             self.cmd.setShowOutput(True)
         else:
         self.keepchk.setEnabled(False)
         self.keepbrancheschk.setEnabled(False)
         self.detachchk.setEnabled(False)
+        self.collapsechk.setEnabled(False)
         cmdline = ['rebase', '--repository', self.repo.root]
         cmdline += ['--config', 'ui.merge=internal:' +
                     (self.autoresolvechk.isChecked() and 'merge' or 'fail')]
                 cmdline += ['--keepbranches']
             if self.detachchk.isChecked():
                 cmdline += ['--detach']
+            if self.collapsechk.isChecked():
+                cmdline += ['--collapse']
             if self.svnchk is not None and self.svnchk.isChecked():
                 cmdline += ['--svn']
             else: