Piotr Klecha avatar Piotr Klecha committed bef4d54

rebase: add support for --base modifier (refs #3322)

Comments (0)

Files changed (1)

tortoisehg/hgqt/rebase.py

         self.collapsechk.setChecked(opts.get('collapse', False))
         self.layout().addWidget(self.collapsechk)
 
+        self.basechk = QCheckBox(_('Rebase entire source branch'))
+        self.layout().addWidget(self.basechk)
+
         self.autoresolvechk = QCheckBox(_('Automatically resolve merge '
                                           'conflicts where possible'))
         self.autoresolvechk.setChecked(
         self.swapbtn.setShown(False)
         self.keepchk.setEnabled(False)
         self.keepbrancheschk.setEnabled(False)
+        self.basechk.setEnabled(False)
         self.collapsechk.setEnabled(False)
         cmdline = ['rebase', '--repository', self.repo.root]
         cmdline += ['--config', 'ui.merge=internal:' +
             else:
                 source = self.opts.get('source')
                 dest = self.opts.get('dest')
-                cmdline += ['--source', str(source), '--dest', str(dest)]
+                sourcearg = '--source'
+                if self.basechk.isChecked():
+                    sourcearg = '--base'
+                cmdline += [sourcearg, str(source), '--dest', str(dest)]
         self.repo.incrementBusyCount()
         self.cmd.run(cmdline)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.