Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

merge with stable

Changeset c3bfa782ddc0

Parents 6da58b42335e

Parents 9b8db508ca57

by Steve Borho

Changes to 8 files · Browse files at c3bfa782ddc0 Showing diff from parent 6da58b42335e 9b8db508ca57 Diff from another changeset...

 
107
108
109
110
 
 
111
112
113
 
107
108
109
 
110
111
112
113
114
@@ -107,7 +107,8 @@
  Returns hg.repo   '''   p = paths.find_root(path) - + if not p: + return None   try:   return hg.repository(ui.ui(), path=p)   except hglib.RepoError:
Change 1 of 4 Show Entire File hggtk/​commit.py Stacked
 
27
28
29
30
 
 
31
32
33
 
41
42
43
 
44
45
46
 
57
58
59
 
60
61
62
 
63
64
65
 
67
68
69
 
 
 
 
 
70
71
72
73
74
75
76
77
78
 
 
 
 
 
 
 
 
79
80
81
 
27
28
29
 
30
31
32
33
34
 
42
43
44
45
46
47
48
 
59
60
61
62
63
64
65
66
67
68
69
 
71
72
73
74
75
76
77
78
79
80
 
 
 
 
 
 
 
81
82
83
84
85
86
87
88
89
90
91
@@ -27,7 +27,8 @@
 class BranchOperationDialog(gtk.Dialog):   def __init__(self, branch, close):   gtk.Dialog.__init__(self, parent=None, flags=gtk.DIALOG_MODAL, - buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) + buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, + gtk.STOCK_OK, gtk.RESPONSE_OK))   gtklib.set_tortoise_keys(self)   self.connect('response', self.response)   self.set_title(_('Branch Operations')) @@ -41,6 +42,7 @@
  self.closebranchradio = gtk.RadioButton(nochanges,   _('Close current named branch'))   self.branchentry = gtk.Entry() + self.branchentry.connect('activate', self.activated)     hbox = gtk.HBox()   hbox.pack_start(self.newbranchradio, False, False, 2) @@ -57,9 +59,11 @@
    self.newbranchradio.set_active(True)   if branch: + self.newbranch = branch   self.branchentry.set_text(branch)   self.newbranchradio.set_active(True)   elif close: + self.closebranch = close   self.closebranchradio.set_active(True)   else:   nochanges.set_active(True) @@ -67,15 +71,21 @@
    def nbtoggle(self, radio):   self.branchentry.set_sensitive(radio.get_active()) + if radio.get_active(): + self.branchentry.grab_focus() + + def activated(self, entry): + self.response(self, response_id=gtk.RESPONSE_OK)     def response(self, widget, response_id): - if response_id != gtk.RESPONSE_CLOSE: - self.destroy() - return - if self.newbranchradio.get_active(): - self.newbranch = self.branchentry.get_text() - elif self.closebranchradio.get_active(): - self.closebranch = True + if response_id == gtk.RESPONSE_OK: + if self.newbranchradio.get_active(): + self.newbranch = self.branchentry.get_text() + elif self.closebranchradio.get_active(): + self.closebranch = True + else: + self.newbranch = None + self.closebranch = False   self.destroy()    
Change 1 of 2 Show Entire File hggtk/​hginit.py Stacked
 
98
99
100
 
 
 
 
 
101
102
103
 
107
108
109
110
 
111
112
113
 
98
99
100
101
102
103
104
105
106
107
108
 
112
113
114
 
115
116
117
118
@@ -98,6 +98,11 @@
  gtk.ACCEL_VISIBLE)   hbbox.add(create)   + self._dest_input.connect('activate', self._entry_dest_activated, create) + + def _entry_dest_activated(self, entry, button): + self._btn_init_clicked(button) +   def _btn_dest_clicked(self, button):   """ select source folder to clone """   response = gtklib.NativeFolderSelectDialog( @@ -107,7 +112,7 @@
  self._dest_input.set_text(response)   self._dest_input.set_position(-1)   - def _btn_init_clicked(self, toolbutton, data=None): + def _btn_init_clicked(self, button, data=None):   # gather input data   dest = hglib.fromutf(self._dest_input.get_text())  
Change 1 of 1 Show Entire File hggtk/​hgtk.py Stacked
 
568
569
570
571
 
572
573
574
575
 
576
577
578
579
580
581
582
583
 
 
584
585
586
 
568
569
570
 
571
572
573
574
 
575
576
577
578
579
580
581
 
 
582
583
584
585
586
@@ -568,19 +568,19 @@
  # doesn't lend itself to a "correct" solution. This will at least   # catch people who have old Mercurial packages.   reqver = ['1', '3'] - if not v or v == 'unknown' or len(v) == 12: + if not v or v == 'unknown' or len(v) >= 12:   # can't make any intelligent decisions about unknown or hashes   return   vers = v.split('.')[:2] - if vers == reqver: + if vers == reqver or len(vers) < 2:   return   nextver = list(reqver)   nextver[1] = chr(ord(reqver[1])+1)   if vers == nextver:   return   raise util.Abort(_('This version of TortoiseHg requires Mercurial ' - 'version %s.n to %s.n') % ('.'.join(reqver), - '.'.join(nextver))) + 'version %s.n to %s.n, but finds %s') % + ('.'.join(reqver), '.'.join(nextver), v))    def version(ui, **opts):   """output version and copyright information"""
Change 1 of 1 Show Entire File hggtk/​status.py Stacked
 
779
780
781
782
783
 
 
784
785
786
 
779
780
781
 
 
782
783
784
785
786
@@ -779,8 +779,8 @@
  FileName=fname).run()   if not response:   return - if reponse != wfile: - self.hg_copy([wfile, reponse]) + if response != wfile: + self.hg_copy([wfile, response])   return True    
 
424
425
426
427
 
428
429
430
 
424
425
426
 
427
428
429
430
@@ -424,7 +424,7 @@
  if configrepo:   dialog.error_dialog(self, _('No repository found'),   _('no repo at ') + root) - self.response(gtk.RESPONSE_CANCEL) + self.response(None, gtk.RESPONSE_CANCEL)     # Catch close events   self.connect('response', self.should_live)
Change 1 of 2 Show Entire File hggtk/​update.py Stacked
 
48
49
50
51
 
52
53
54
 
86
87
88
 
 
 
 
 
 
89
90
91
 
48
49
50
 
51
52
53
54
 
86
87
88
89
90
91
92
93
94
95
96
97
@@ -48,7 +48,7 @@
  combo = gtk.combo_box_entry_new_text()   hbox.pack_start(combo, True, True, 2)   vbox.pack_start(hbox, False, False, 10) - if rev != None: + if rev:   combo.append_text(str(rev))   else:   combo.append_text(_branch_tip_) @@ -86,6 +86,12 @@
  hbbox.add(update)   update.grab_focus()   + entry = combo.child + entry.connect('activate', self.entry_activated, update, combo, repo) + + def entry_activated(self, entry, button, combo, repo): + self.update(button, combo, repo) +   def update(self, button, combo, repo):   overwrite = self.overwrite.get_active()   rev = combo.get_active_text()
 
18
19
20
21
 
22
23
24
 
18
19
20
 
21
22
23
24
@@ -18,7 +18,7 @@
 except ImportError:   import os   debugging = os.environ.get("DEBUG_THG", "") - if debugging.lower() in (1, "true"): + if debugging.lower() in ("1", "true"):   debugging = True    def debugf_No(str, args=None, level=''):