Revision | cbd74c22c65c8dfd21b40b35116022137e9ffc5d (tree) |
---|---|
Time | 2012-07-16 20:59:24 |
Author | at0fk |
Commiter | at0fk |
Rebased for 2.4.2
@@ -1,16 +1,16 @@ | ||
1 | 1 | # HG changeset patch |
2 | -# Parent a2c08f1595fd11937444a7f1186cabfd613efb0b | |
3 | -Added custom bugtraq support | |
4 | - | |
2 | +# Parent e36f6288eb94481a63aa6137f33867765a11c52e | |
3 | +Added custom bugtraq support | |
4 | + | |
5 | 5 | For e.g. traclink extension |
6 | 6 | |
7 | -diff -r a2c08f1595fd -r b2b08061a6ac tortoisehg/util/bugtraq.py | |
8 | ---- a/tortoisehg/util/bugtraq.py Tue Jan 10 10:33:27 2012 +0100 | |
9 | -+++ b/tortoisehg/util/bugtraq.py Fri Jan 20 17:54:11 2012 +0100 | |
10 | -@@ -6,6 +6,13 @@ | |
11 | - from comtypes.client import CreateObject | |
12 | - from comtypes.automation import _midlSAFEARRAY | |
7 | +diff -r e36f6288eb94 tortoisehg/util/bugtraq.py | |
8 | +--- a/tortoisehg/util/bugtraq.py Mon Jul 16 13:54:59 2012 +0200 | |
9 | ++++ b/tortoisehg/util/bugtraq.py Mon Jul 16 13:58:14 2012 +0200 | |
10 | +@@ -8,6 +8,13 @@ | |
13 | 11 | from _winreg import * |
12 | + from tortoisehg.hgqt import qtlib | |
13 | + from tortoisehg.hgqt.i18n import _ | |
14 | 14 | +from mercurial import extensions |
15 | 15 | + |
16 | 16 | +traclink = None |
@@ -21,7 +21,7 @@ | ||
21 | 21 | |
22 | 22 | class IBugTraqProvider(IUnknown): |
23 | 23 | _iid_ = GUID("{298B927C-7220-423C-B7B4-6E241F00CD93}") |
24 | -@@ -70,10 +77,14 @@ | |
24 | +@@ -72,6 +79,10 @@ | |
25 | 25 | #svnjiraguid = "{CF732FD7-AA8A-4E9D-9E15-025E4D1A7E9D}" |
26 | 26 | |
27 | 27 | def __init__(self, guid): |
@@ -31,13 +31,8 @@ | ||
31 | 31 | + self.__init__(guid) |
32 | 32 | self.guid = guid |
33 | 33 | self.bugtr = None |
34 | - | |
35 | -- def _get_bugtraq_object(self): | |
36 | -+ def _get_bugtraq_object(self): | |
37 | - if self.bugtr == None: | |
38 | - obj = CreateObject(self.guid) | |
39 | - try: | |
40 | -@@ -139,8 +150,12 @@ | |
34 | + self.errorshown = False # do not show the COM Error more than once | |
35 | +@@ -172,8 +183,12 @@ | |
41 | 36 | except (ValueError, AttributeError): |
42 | 37 | return False |
43 | 38 |
@@ -50,7 +45,7 @@ | ||
50 | 45 | cm = pythoncom.CoCreateInstance(pythoncom.CLSID_StdComponentCategoriesMgr, |
51 | 46 | None, pythoncom.CLSCTX_INPROC,pythoncom.IID_ICatInformation) |
52 | 47 | CATID_BugTraqProvider = pythoncom.MakeIID( |
53 | -@@ -155,9 +170,16 @@ | |
48 | +@@ -188,9 +203,16 @@ | |
54 | 49 | except pythoncom.com_error: |
55 | 50 | break |
56 | 51 | ret.extend(clsid) |
@@ -1,10 +1,10 @@ | ||
1 | 1 | # HG changeset patch |
2 | -# Parent fa1a0ea8b8afdde7cdbaa440b5fa0d68d3c1c161 | |
2 | +# Parent 4019b6f012df5c72cc8897511d3fec08540af035 | |
3 | 3 | Added support for subrepo type "link" |
4 | 4 | |
5 | -diff -r fa1a0ea8b8af tortoisehg/hgqt/filedata.py | |
6 | ---- a/tortoisehg/hgqt/filedata.py Thu Feb 02 10:31:25 2012 +0100 | |
7 | -+++ b/tortoisehg/hgqt/filedata.py Thu Feb 02 10:33:13 2012 +0100 | |
5 | +diff -r 4019b6f012df tortoisehg/hgqt/filedata.py | |
6 | +--- a/tortoisehg/hgqt/filedata.py Mon Jul 16 13:51:42 2012 +0200 | |
7 | ++++ b/tortoisehg/hgqt/filedata.py Mon Jul 16 13:54:59 2012 +0200 | |
8 | 8 | @@ -225,10 +225,16 @@ |
9 | 9 | |
10 | 10 | return out, sstatedesc |
@@ -62,9 +62,9 @@ | ||
62 | 62 | out += subrepochange |
63 | 63 | if data: |
64 | 64 | sstatedesc += ' and dirty' |
65 | -diff -r fa1a0ea8b8af tortoisehg/hgqt/filelistmodel.py | |
66 | ---- a/tortoisehg/hgqt/filelistmodel.py Thu Feb 02 10:31:25 2012 +0100 | |
67 | -+++ b/tortoisehg/hgqt/filelistmodel.py Thu Feb 02 10:33:13 2012 +0100 | |
65 | +diff -r 4019b6f012df tortoisehg/hgqt/filelistmodel.py | |
66 | +--- a/tortoisehg/hgqt/filelistmodel.py Mon Jul 16 13:51:42 2012 +0200 | |
67 | ++++ b/tortoisehg/hgqt/filelistmodel.py Mon Jul 16 13:54:59 2012 +0200 | |
68 | 68 | @@ -30,6 +30,7 @@ |
69 | 69 | 'git': 'thg-git-subrepo', |
70 | 70 | 'svn': 'thg-svn-subrepo', |
@@ -132,19 +132,19 @@ | ||
132 | 132 | |
133 | 133 | if self._fulllist and ismerge: |
134 | 134 | func = lambda x: True |
135 | -diff -r fa1a0ea8b8af tortoisehg/hgqt/manifestdialog.py | |
136 | ---- a/tortoisehg/hgqt/manifestdialog.py Thu Feb 02 10:31:25 2012 +0100 | |
137 | -+++ b/tortoisehg/hgqt/manifestdialog.py Thu Feb 02 10:33:13 2012 +0100 | |
138 | -@@ -282,7 +282,7 @@ | |
139 | - def openfile(self, editor=None): | |
135 | +diff -r 4019b6f012df tortoisehg/hgqt/manifestdialog.py | |
136 | +--- a/tortoisehg/hgqt/manifestdialog.py Mon Jul 16 13:51:42 2012 +0200 | |
137 | ++++ b/tortoisehg/hgqt/manifestdialog.py Mon Jul 16 13:54:59 2012 +0200 | |
138 | +@@ -281,7 +281,7 @@ | |
139 | + def editfile(self, editor=None): | |
140 | 140 | if self.path is None: |
141 | 141 | return |
142 | 142 | - if self.rev is None: |
143 | 143 | + if self.rev is None: |
144 | 144 | qtlib.editfiles(self._repo, [hglib.fromunicode(self.path)], |
145 | 145 | parent=self) |
146 | - else: | |
147 | -@@ -301,13 +301,14 @@ | |
146 | + elif self.path in self._repo[self.rev]: | |
147 | +@@ -313,13 +313,14 @@ | |
148 | 148 | def editlocal(self, editor=None): |
149 | 149 | if self.path is None: |
150 | 150 | return |
@@ -156,13 +156,13 @@ | ||
156 | 156 | def openlocal(self): |
157 | 157 | if self.path is None: |
158 | 158 | return |
159 | -- qtlib.openfiles(self.repo, [hglib.fromunicode(self.path)]) | |
159 | +- qtlib.openfiles(self._repo, [hglib.fromunicode(self.path)]) | |
160 | 160 | + repo, path = self._treemodel.fileSubrepoFromPath(hglib.fromunicode(self.path)) |
161 | 161 | + qtlib.openfiles(repo, [path]) |
162 | 162 | |
163 | 163 | def revertfile(self): |
164 | 164 | if self.path is None: |
165 | -@@ -337,7 +338,7 @@ | |
165 | +@@ -349,7 +350,7 @@ | |
166 | 166 | dlg.activateWindow() |
167 | 167 | |
168 | 168 | def opensubrepo(self): |
@@ -171,7 +171,7 @@ | ||
171 | 171 | if os.path.isdir(path): |
172 | 172 | self.linkActivated.emit(u'subrepo:'+hglib.tounicode(path)) |
173 | 173 | else: |
174 | -@@ -346,12 +347,12 @@ | |
174 | +@@ -358,12 +359,12 @@ | |
175 | 175 | _("The selected subrepository does not exist on the working directory")) |
176 | 176 | |
177 | 177 | def explore(self): |
@@ -186,10 +186,10 @@ | ||
186 | 186 | if os.path.isdir(root): |
187 | 187 | qtlib.openshell(root, hglib.fromunicode(self.path)) |
188 | 188 | |
189 | -diff -r fa1a0ea8b8af tortoisehg/hgqt/manifestmodel.py | |
190 | ---- a/tortoisehg/hgqt/manifestmodel.py Thu Feb 02 10:31:25 2012 +0100 | |
191 | -+++ b/tortoisehg/hgqt/manifestmodel.py Thu Feb 02 10:33:13 2012 +0100 | |
192 | -@@ -59,6 +59,19 @@ | |
189 | +diff -r 4019b6f012df tortoisehg/hgqt/manifestmodel.py | |
190 | +--- a/tortoisehg/hgqt/manifestmodel.py Mon Jul 16 13:51:42 2012 +0200 | |
191 | ++++ b/tortoisehg/hgqt/manifestmodel.py Mon Jul 16 13:54:59 2012 +0200 | |
192 | +@@ -64,6 +64,19 @@ | |
193 | 193 | |
194 | 194 | return index.internalPointer().path |
195 | 195 |
@@ -209,7 +209,7 @@ | ||
209 | 209 | def fileSubrepoCtx(self, index): |
210 | 210 | """Return the subrepo context of the specified index""" |
211 | 211 | path = self.filePath(index) |
212 | -@@ -66,12 +79,41 @@ | |
212 | +@@ -71,12 +84,41 @@ | |
213 | 213 | |
214 | 214 | def fileSubrepoCtxFromPath(self, path): |
215 | 215 | """Return the subrepo context of the specified file""" |
@@ -257,7 +257,7 @@ | ||
257 | 257 | |
258 | 258 | def subrepoType(self, index): |
259 | 259 | """Return the subrepo type the specified index""" |
260 | -@@ -102,6 +144,7 @@ | |
260 | +@@ -125,6 +167,7 @@ | |
261 | 261 | if e.status == 'S': |
262 | 262 | _subrepoType2IcoMap = { |
263 | 263 | 'hg': 'hg', |
@@ -265,7 +265,7 @@ | ||
265 | 265 | 'git': 'thg-git-subrepo', |
266 | 266 | 'svn': 'thg-svn-subrepo', |
267 | 267 | } |
268 | -@@ -307,10 +350,14 @@ | |
268 | +@@ -348,10 +391,14 @@ | |
269 | 269 | # and it is a mercurial subrepo, |
270 | 270 | # add the files that it contains to the tree as well, according |
271 | 271 | # to the status filter |
@@ -282,7 +282,7 @@ | ||
282 | 282 | # Add the subrepo info to the _subinfo dictionary: |
283 | 283 | # The value is the subrepo context, while the key is |
284 | 284 | # the path of the subrepo relative to the topmost repo |
285 | -@@ -322,7 +369,7 @@ | |
285 | +@@ -363,7 +410,7 @@ | |
286 | 286 | toprelpath = path |
287 | 287 | toprelpath = util.pconvert(toprelpath) |
288 | 288 | self._subinfo[toprelpath] = \ |
@@ -291,7 +291,7 @@ | ||
291 | 291 | srev = substate[1] |
292 | 292 | sub = ctx.sub(path) |
293 | 293 | if srev and isinstance(sub, hgsubrepo): |
294 | -@@ -331,6 +378,7 @@ | |
294 | +@@ -372,6 +419,7 @@ | |
295 | 295 | sctx = srepo[srev] |
296 | 296 | |
297 | 297 | self._subinfo[toprelpath]['ctx'] = sctx |
@@ -299,9 +299,9 @@ | ||
299 | 299 | |
300 | 300 | # Add the subrepo contents to the tree |
301 | 301 | e = addrepocontentstotree(e, sctx, toprelpath) |
302 | -diff -r fa1a0ea8b8af tortoisehg/hgqt/reporegistry.py | |
303 | ---- a/tortoisehg/hgqt/reporegistry.py Thu Feb 02 10:31:25 2012 +0100 | |
304 | -+++ b/tortoisehg/hgqt/reporegistry.py Thu Feb 02 10:33:13 2012 +0100 | |
302 | +diff -r 4019b6f012df tortoisehg/hgqt/reporegistry.py | |
303 | +--- a/tortoisehg/hgqt/reporegistry.py Mon Jul 16 13:51:42 2012 +0200 | |
304 | ++++ b/tortoisehg/hgqt/reporegistry.py Mon Jul 16 13:54:59 2012 +0200 | |
305 | 305 | @@ -168,7 +168,7 @@ |
306 | 306 | if self.selitem and self.selitem.internalPointer().isRepo(): |
307 | 307 | # We can only open mercurial repositories and subrepositories |
@@ -311,7 +311,7 @@ | ||
311 | 311 | self.showFirstTabOrOpen() |
312 | 312 | else: |
313 | 313 | qtlib.WarningMsgBox( |
314 | -@@ -679,7 +679,7 @@ | |
314 | +@@ -685,7 +685,7 @@ | |
315 | 315 | repotype = 'hg' |
316 | 316 | else: |
317 | 317 | repotype = 'unknown' |
@@ -320,9 +320,9 @@ | ||
320 | 320 | if groupname: |
321 | 321 | self.addRepo(hglib.tounicode(root), groupname) |
322 | 322 | self.openRepo.emit(hglib.tounicode(root), False) |
323 | -diff -r fa1a0ea8b8af tortoisehg/hgqt/repotreeitem.py | |
324 | ---- a/tortoisehg/hgqt/repotreeitem.py Thu Feb 02 10:31:25 2012 +0100 | |
325 | -+++ b/tortoisehg/hgqt/repotreeitem.py Thu Feb 02 10:33:13 2012 +0100 | |
323 | +diff -r 4019b6f012df tortoisehg/hgqt/repotreeitem.py | |
324 | +--- a/tortoisehg/hgqt/repotreeitem.py Mon Jul 16 13:51:42 2012 +0200 | |
325 | ++++ b/tortoisehg/hgqt/repotreeitem.py Mon Jul 16 13:54:59 2012 +0200 | |
326 | 326 | @@ -8,7 +8,7 @@ |
327 | 327 | import sys, os |
328 | 328 |
@@ -330,9 +330,9 @@ | ||
330 | 330 | -from mercurial import ui, hg, util, error |
331 | 331 | +from mercurial import ui, hg, util, error, subrepo |
332 | 332 | |
333 | - from tortoisehg.util import hglib | |
333 | + from tortoisehg.util import hglib, paths | |
334 | 334 | from tortoisehg.hgqt.i18n import _ |
335 | -@@ -269,7 +269,7 @@ | |
335 | +@@ -272,7 +272,7 @@ | |
336 | 336 | invalidRepoList = [] |
337 | 337 | |
338 | 338 | # Mercurial repos are the only ones that can have subrepos |
@@ -341,7 +341,7 @@ | ||
341 | 341 | try: |
342 | 342 | sri = None |
343 | 343 | if repo is None: |
344 | -@@ -278,7 +278,8 @@ | |
344 | +@@ -281,7 +281,8 @@ | |
345 | 345 | sortkey = lambda x: os.path.basename(util.normpath(repo.wjoin(x))) |
346 | 346 | for subpath in sorted(wctx.substate, key=sortkey): |
347 | 347 | sri = None |
@@ -351,7 +351,7 @@ | ||
351 | 351 | subtype = wctx.substate[subpath][2] |
352 | 352 | sriIsValid = os.path.isdir(abssubpath) |
353 | 353 | sri = SubrepoItem(abssubpath, subtype=subtype) |
354 | -@@ -292,9 +293,10 @@ | |
354 | +@@ -295,9 +296,10 @@ | |
355 | 355 | return invalidRepoList |
356 | 356 | continue |
357 | 357 |
@@ -364,7 +364,7 @@ | ||
364 | 364 | invalidSubrepoList = sri.appendSubrepos(sctx._repo) |
365 | 365 | if invalidSubrepoList: |
366 | 366 | self._valid = False |
367 | -@@ -361,6 +363,7 @@ | |
367 | +@@ -364,6 +366,7 @@ | |
368 | 368 | class SubrepoItem(RepoItem): |
369 | 369 | _subrepoType2IcoMap = { |
370 | 370 | 'hg': 'hg', |
@@ -372,7 +372,7 @@ | ||
372 | 372 | 'git': 'thg-git-subrepo', |
373 | 373 | 'svn': 'thg-svn-subrepo', |
374 | 374 | } |
375 | -@@ -369,7 +372,7 @@ | |
375 | +@@ -372,7 +375,7 @@ | |
376 | 376 | RepoItem.__init__(self, repo, parent) |
377 | 377 | self._parentrepo = parentrepo |
378 | 378 | self._repotype = subtype |
@@ -381,9 +381,9 @@ | ||
381 | 381 | # Make sure that we cannot drag non hg subrepos |
382 | 382 | # To do so we disable the dumpObject method for non hg subrepos |
383 | 383 | def doNothing(dummy): |
384 | -diff -r fa1a0ea8b8af tortoisehg/hgqt/status.py | |
385 | ---- a/tortoisehg/hgqt/status.py Thu Feb 02 10:31:25 2012 +0100 | |
386 | -+++ b/tortoisehg/hgqt/status.py Thu Feb 02 10:33:13 2012 +0100 | |
384 | +diff -r 4019b6f012df tortoisehg/hgqt/status.py | |
385 | +--- a/tortoisehg/hgqt/status.py Mon Jul 16 13:51:42 2012 +0200 | |
386 | ++++ b/tortoisehg/hgqt/status.py Mon Jul 16 13:54:59 2012 +0200 | |
387 | 387 | @@ -339,6 +339,9 @@ |
388 | 388 | if status in 'MAR!': |
389 | 389 | self.actions.allactions[0].trigger() |
@@ -394,10 +394,10 @@ | ||
394 | 394 | self.linkActivated.emit( |
395 | 395 | u'subrepo:' + hglib.tounicode(self.repo.wjoin(path))) |
396 | 396 | elif status in 'C?': |
397 | -diff -r fa1a0ea8b8af tortoisehg/hgqt/wctxactions.py | |
398 | ---- a/tortoisehg/hgqt/wctxactions.py Thu Feb 02 10:31:25 2012 +0100 | |
399 | -+++ b/tortoisehg/hgqt/wctxactions.py Thu Feb 02 10:33:13 2012 +0100 | |
400 | -@@ -157,7 +157,20 @@ | |
397 | +diff -r 4019b6f012df tortoisehg/hgqt/wctxactions.py | |
398 | +--- a/tortoisehg/hgqt/wctxactions.py Mon Jul 16 13:51:42 2012 +0200 | |
399 | ++++ b/tortoisehg/hgqt/wctxactions.py Mon Jul 16 13:54:59 2012 +0200 | |
400 | +@@ -155,7 +155,20 @@ | |
401 | 401 | |
402 | 402 | repo, action, parent = self.repo, self.sender(), self.parent() |
403 | 403 | func = action._runfunc |
@@ -1,16 +0,0 @@ | ||
1 | -# HG changeset patch | |
2 | -# Parent 691bc9fb73bed19ec1fe005cd5ce51bca23c8b08 | |
3 | -Minor fix to wctxactions.py dialog calls. | |
4 | - | |
5 | -diff -r 691bc9fb73be -r b3d22ab00853 tortoisehg/hgqt/wctxactions.py | |
6 | ---- a/tortoisehg/hgqt/wctxactions.py Tue Jan 10 10:09:43 2012 +0100 | |
7 | -+++ b/tortoisehg/hgqt/wctxactions.py Tue Jan 10 10:11:00 2012 +0100 | |
8 | -@@ -249,7 +249,7 @@ | |
9 | - if os.path.isdir(path): | |
10 | - parent.linkActivated.emit(u'subrepo:'+hglib.tounicode(path)) | |
11 | - else: | |
12 | -- QMessageBox.warning(self, | |
13 | -+ QMessageBox.warning(parent, | |
14 | - _("Cannot open subrepository"), | |
15 | - _("The selected subrepository does not exist on the working directory")) | |
16 | - |
@@ -4,7 +4,6 @@ | ||
4 | 4 | add_rebase_dialog |
5 | 5 | add_subrepo_double_click |
6 | 6 | link_subrepo_support |
7 | -minor_dialog_fix | |
8 | 7 | bugtraq_support |
9 | 8 | fix_transplant_ranges |
10 | 9 | add_branch_colors |