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 aaac856508a0

Parents 123811ec40a6

Parents 774617fd1cc6

by Steve Borho

Changes to 6 files · Browse files at aaac856508a0 Showing diff from parent 123811ec40a6 774617fd1cc6 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​gdialog.py Stacked
 
121
122
123
124
 
 
 
 
 
 
 
 
125
126
127
 
121
122
123
 
124
125
126
127
128
129
130
131
132
133
134
@@ -121,7 +121,14 @@
  self.cwd = cwd or os.getcwd()   self.ui = ui   self.ui.setconfig('ui', 'interactive', 'off') - self.repo = repo or hg.repository(ui, path=paths.find_root()) + if repo: + self.repo = repo + else: + root = paths.find_root() + if root: + self.repo = hg.repository(ui, path=root) + else: + self.repo = None   self.pats = pats   self.opts = opts   self.tmproot = None
Change 1 of 4 Show Entire File hggtk/​hgtk.py Stacked
 
154
155
156
 
 
 
 
 
157
158
159
 
185
186
187
 
 
 
 
188
189
190
 
194
195
196
197
198
199
200
201
202
 
562
563
564
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
565
566
567
 
154
155
156
157
158
159
160
161
162
163
164
 
190
191
192
193
194
195
196
197
198
199
 
203
204
205
 
 
 
206
207
208
 
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
@@ -154,6 +154,11 @@
 def _runcatch(ui, args):   try:   try: + checkhgversion(hglib.hgversion) + except util.Abort, inst: + ui.status(_("abort: %s!\n") % inst) + return 0 + try:   return runcommand(ui, args)   finally:   ui.flush() @@ -185,6 +190,10 @@
  elif not cmd:   return help_(ui, 'shortlist')   + if options['repository']: + path = ui.expandpath(options['repository']) + cmdoptions['repository'] = path + os.chdir(path)   path = paths.find_root(os.getcwd())   if path:   try: @@ -194,9 +203,6 @@
  pass   else:   lui = ui - if options['repository']: - path = lui.expandpath(options['repository']) - cmdoptions['repository'] = path     _loaded = {}   extensions.loadall(ui) @@ -562,6 +568,26 @@
  else:   ui.write("%s\n" % first)   +def checkhgversion(v): + """range check the Mercurial version""" + # this is a series of hacks, but Mercurial's versioning scheme + # doesn't lend itself to a "correct" solution. This will at least + # catch people who have old Mercurial packages. + reqver = ['1', '2'] + 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: + 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))) +  def version(ui, **opts):   """output version and copyright information"""   ui.write(_('TortoiseHg Dialogs (version %s), '
 
10
11
12
13
 
14
15
16
 
41
42
43
44
45
46
47
 
136
137
138
139
140
141
 
 
142
143
144
145
146
 
10
11
12
 
13
14
15
16
 
41
42
43
 
44
45
46
 
135
136
137
 
 
 
138
139
140
 
141
142
143
@@ -10,7 +10,7 @@
 import gtk  import gobject  import re -from mercurial import util +from mercurial import util, templatefilters  from mercurial.hgweb import webutil  from thgutil import hglib  from hggtk import gtklib @@ -41,7 +41,6 @@
  self.branch_names = {}   self.repo = repo   self.line_graph_data = graphdata - self.author_re = re.compile('<.*@.*>', 0)   self.color_func = color_func   self.parents = [x.rev() for x in repo.parents()]   self.heads = [repo[x].rev() for x in repo.heads()] @@ -136,11 +135,9 @@
  bstr += '<span color="%s" background="%s"> %s </span> ' % \   ('black', '#aaffaa', branch)   - if '<' in ctx.user(): - author = self.author_re.sub('', ctx.user()).strip(' ') - else: + author = templatefilters.person(ctx.user()) + if not author:   author = util.shortuser(ctx.user()) -   author = hglib.toutf(author)   date = hglib.displaytime(ctx.date())   utc = hglib.utctime(ctx.date())
 
27
28
29
30
 
31
32
33
 
63
64
65
66
 
67
68
69
 
78
79
80
81
 
82
83
84
 
478
479
480
481
 
 
 
482
483
484
 
27
28
29
 
30
31
32
33
 
63
64
65
 
66
67
68
69
 
78
79
80
 
81
82
83
84
 
478
479
480
 
481
482
483
484
485
486
@@ -27,7 +27,7 @@
  "Commit changes in repository",   "menucommit.ico", 0},   {"init", "Create Repository Here", - "Create a new repository in this directory", + "Create a new repository",   "menucreaterepos.ico", 0},   {"clone", "Clone a Repository",   "Create clone here from source", @@ -63,7 +63,7 @@
  "Update working directory",   "menucheckout.ico", 0},   {"recover", "Recovery...", - "General repair and recovery of repository", + "Repair and recovery of repository",   "general.ico", 0},   {"thgstatus", "Update Icons",   "Update icons for this repository", @@ -78,7 +78,7 @@
  "Show About Dialog",   "menuabout.ico", 0},   {"datamine", "Annotate Files", - "Show changeset information per file line", + "Changeset information per file line",   "menublame.ico", 0},   {"vdiff", "Visual Diff",   "View changes using GUI diff tool", @@ -478,7 +478,9 @@
    TDEBUG_TRACE(   "CShellExt::GetCommandString: idCmd = " << idCmd - << ", uFlags = " << uFlags << " (" << sflags << ")"); + << ", uFlags = " << uFlags << " (" << sflags << ")" + << ", cchMax = " << cchMax + );     MenuIdCmdMap::iterator iter = MenuIdMap.find(static_cast<UINT>(idCmd));   if (iter == MenuIdMap.end())