Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph

sync: added support for pushing or pulling a specific branch (fixes #1012)

Changeset 18b9182523ec

Parent 7ee0afbda823

by David Golub

Changes to one file · Browse files at 18b9182523ec Showing diff from parent 7ee0afbda823 Diff from another changeset...

 
97
98
99
100
101
102
 
 
 
 
103
104
105
 
1557
1558
1559
 
 
 
 
 
 
1560
1561
1562
 
1566
1567
1568
1569
 
 
1570
1571
1572
 
97
98
99
 
 
 
100
101
102
103
104
105
106
 
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
 
1573
1574
1575
 
1576
1577
1578
1579
1580
@@ -97,9 +97,10 @@
  val = s.value('sync/' + opt, None).toBool()   if val:   self.opts[opt] = val - val = str(s.value('sync/remotecmd', None).toString()) - if val: - self.opts['remotecmd'] = val + for opt in ('remotecmd', 'branch'): + val = str(s.value('sync/' + opt, None).toString()) + if val: + self.opts[opt] = val     self.repo.configChanged.connect(self.configChanged)   @@ -1557,6 +1558,12 @@
  self.remotele.setText(hglib.tounicode(opts['remotecmd']))   layout.addRow(lbl, self.remotele)   + lbl = QLabel(_('Branch:')) + self.branchle = QLineEdit() + if opts.get('branch'): + self.branchle.setText(hglib.tounicode(opts['branch'])) + layout.addRow(lbl, self.branchle) +   BB = QDialogButtonBox   bb = QDialogButtonBox(BB.Ok|BB.Cancel)   bb.accepted.connect(self.accept) @@ -1566,7 +1573,8 @@
    def accept(self):   outopts = {} - for name, le in (('remotecmd', self.remotele),): + for name, le in (('remotecmd', self.remotele), + ('branch', self.branchle)):   outopts[name] = hglib.fromunicode(le.text()).strip()     outopts['subrepos'] = self.subrepocb.isChecked()