Exemple #1
0
    def do_start(self):
        from_location = self._get_from_location()
        to_location = self._get_to_location()
        revision_args = []
        if self.ui.but_rev_specific.isChecked() and self.ui.revision.text():
            revision_args.append('--revision=' +
                                 unicode(self.ui.revision.text()))

        if self._is_checkout_action():
            args = ['checkout']
            if self.ui.but_lightweight.isChecked():
                args.append('--lightweight')
            args.extend(revision_args)
            args.append(from_location)
            args.append(to_location)
        else:
            # its a 'branch'
            args = ['branch']
            if self.ui.but_stacked.isChecked():
                args.append('--stacked')
            args.extend(revision_args)
            args.append(from_location)
            args.append(to_location)

        self.process_widget.do_start(None, *args)
        save_pull_location(None, from_location)
Exemple #2
0
 def do_start(self):
     if self._is_pull_selected():
         # its a 'pull'
         args = ['--directory', self.branch.base]
         if self.ui.but_pull_overwrite.isChecked():
             args.append('--overwrite')
         if self.ui.but_pull_remember.isChecked():
             args.append('--remember')
         location = self._get_pull_location()
         self.process_widget.do_start(None, 'pull', location, *args)
         save_pull_location(self.branch, location)
     else:
         # its an 'update'.
         self.process_widget.do_start(None, 'update', self.branch.base)
Exemple #3
0
 def do_start(self):
     args = []
     if self.ui.bind.isChecked():
         args.append('--bind')
     revision = str(self.ui.revision.text())
     if revision:
         args.append('--revision')
         args.append(revision)
     from_location = unicode(self.ui.from_location.currentText())
     to_location = self.get_to_location()
     if 'use-existing-dir' in self.cmd_branch_options:
         # always use this options because it should be mostly harmless
         args.append('--use-existing-dir')
     self.process_widget.do_start(None, 'branch', from_location,
                                  to_location, *args)
     save_pull_location(None, from_location)
Exemple #4
0
 def do_start(self):
     if self.tree:
         dest = self.tree.basedir
     else:
         dest = self.branch.base
     args = []
     if dest != osutils.getcwd():
         args.extend(('--directory', dest))
     if self.ui.overwrite.isChecked():
         args.append('--overwrite')
     if self.ui.remember.isChecked():
         args.append('--remember')
     revision = str(self.ui.revision.text())
     if revision:
         args.append('--revision')
         args.append(revision)
     location = unicode(self.ui.location.currentText())
     if location and location != self.default_location:
         args.insert(0, location)
     self.process_widget.do_start(None, 'pull', *args)
     save_pull_location(self.branch, location)
Exemple #5
0
 def do_start(self):
     if self.tree:
         dest = self.tree.basedir
     else:
         dest = self.branch.base
     if dest == os.getcwdu():
         args = []
     else:
         args = ['--directory', dest]
     if self.ui.remember.isChecked():
         args.append('--remember')
     if self.ui.force.isChecked():
         args.append('--force')
     if self.ui.uncommitted.isChecked():
         args.append('--uncommitted')
     rev = unicode(self.ui.revision.text()).strip()
     if rev:
         args.extend(['--revision', rev])
     location = unicode(self.ui.location.currentText())
     self.process_widget.do_start(None, 'merge', location, *args)
     save_pull_location(None, location)