Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8.1, 0.8.2, and 0.8.3

synch, thgconfig: set remote path as 'default' from synch tool

fixes for issue #364

Changeset 42d97738670a

Parent 868b8054a602

by Yuki KODAMA

Changes to 2 files · Browse files at 42d97738670a Showing diff from parent 868b8054a602 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​synch.py Stacked
 
453
454
455
456
 
457
458
459
 
453
454
455
 
456
457
458
459
@@ -453,7 +453,7 @@
  dlg = thgconfig.ConfigDialog(True)   dlg.show_all()   if newpath: - dlg.new_path(newpath) + dlg.new_path(newpath, 'default')   else:   dlg.focus_field('tortoisehg.postpull')   dlg.run()
 
571
572
573
574
 
575
576
577
578
579
580
581
 
 
 
 
 
582
583
584
 
571
572
573
 
574
575
576
577
 
 
 
 
578
579
580
581
582
583
584
585
@@ -571,14 +571,15 @@
  widgets[w].grab_focus()   return   - def new_path(self, newpath): + def new_path(self, newpath, alias='new'):   '''Add a new path to [paths], give default name, focus'''   i = self.pathdata.insert_before(None, None)   safepath = url.hidepassword(newpath) - alias, num = 'new', 0 - while len([row for row in self.pathdata if row[0] == alias]) > 0: - num += 1 - alias = 'new_%d' % num + if alias in [row[0] for row in self.pathdata]: + num = 0 + while len([row for row in self.pathdata if row[0] == alias]) > 0: + num += 1 + alias = 'new_%d' % num   self.pathdata.set_value(i, 0, alias)   self.pathdata.set_value(i, 1, '%s' % hglib.toutf(safepath))   self.pathdata.set_value(i, 2, '%s' % hglib.toutf(newpath))