Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1.1, 2.1.2, and tip

stable license: refresh with current address from fsf.org (fixes #858)

Changeset 7e8415d9e124

Parent 9d58ecd48e43

by André Sintzoff

Changes to 13 files · Browse files at 7e8415d9e124 Showing diff from parent 9d58ecd48e43 Diff from another changeset...

 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    """  Qt4 widgets to display diffs as blocks
 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.  """  Qt4 dialogs to display hg revisions of a file  """
 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    from tortoisehg.util import hglib, patchctx  
 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    import os  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 # Copyright (c) 2009-2010 LOGILAB S.A. (Paris, FRANCE).  # http://www.logilab.fr/ -- mailto:contact@logilab.fr  #  # This program is free software; you can redistribute it and/or modify it under  # the terms of the GNU General Public License as published by the Free Software  # Foundation; either version 2 of the License, or (at your option) any later  # version.  #  # This program is distributed in the hope that it will be useful, but WITHOUT  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS  # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.  #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    from tortoisehg.hgqt.repomodel import HgRepoListModel, COLUMNHEADERS  from tortoisehg.hgqt.graph import Graph, filelog_grapher  from tortoisehg.hgqt.i18n import _    from PyQt4.QtCore import *    FILE_HEADERS = (('Filename', _('Filename', 'column header')),)  UNUSED_HEADERS = ('Changes')    FILE_COLUMNHEADERS = tuple(c for c in COLUMNHEADERS   if c[0] not in UNUSED_HEADERS) + FILE_HEADERS    class FileRevModel(HgRepoListModel):   """   Model used to manage the list of revisions of a file, in file   viewer of in diff-file viewer dialogs.   """   filled = pyqtSignal()     _allcolumns = tuple(h[0] for h in FILE_COLUMNHEADERS)   _allcolnames = dict(FILE_COLUMNHEADERS)     _columns = ('Rev', 'Branch', 'Description', 'Author', 'Age', 'Filename')   _stretchs = {'Description': 1, }   _getcolumns = "getFilelogColumns"     def __init__(self, repo, cfgname, filename=None, parent=None):   """   data is a HgHLRepo instance   """   HgRepoListModel.__init__(self, repo, cfgname, '', [], False, parent)   self.setFilename(filename)     def setRepo(self, repo, branch='', fromhead=None, follow=False):   self.repo = repo   self._datacache = {}   self.reloadConfig()     def setFilename(self, filename):   self.filename = filename     self._user_colors = {}   self._branch_colors = {}     self.rowcount = 0   self._datacache = {}     if self.filename:   grapher = filelog_grapher(self.repo, self.filename)   self.graph = Graph(self.repo, grapher)   fl = self.repo.file(self.filename)   # we use fl.index here (instead of linkrev) cause   # linkrev API changed between 1.0 and 1.?. So this   # works with both versions.   self.heads = [fl.index[fl.rev(x)][4] for x in fl.heads()]   self.ensureBuilt(row=self.fill_step/2)   QTimer.singleShot(0, lambda: self.filled.emit())   self._fill_timer = self.startTimer(500)   else:   self.graph = None   self.heads = []
 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    """helper functions and classes to ease hg revision graph building  
 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.  """  Qt4 QToolBar-based class for quick bars XXX  """
 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    from mercurial import util, error  from mercurial.util import propertycache
 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License along with  # this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    from mercurial import error  
 
12
13
14
15
 
16
17
18
 
12
13
14
 
15
16
17
18
@@ -12,7 +12,7 @@
 #  # You should have received a copy of the GNU General Public License  # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    import gtk  from tortoisehg.util.i18n import _
 
12
13
14
15
 
16
17
18
 
94
95
96
97
 
98
99
100
 
12
13
14
 
15
16
17
18
 
94
95
96
 
97
98
99
100
@@ -12,7 +12,7 @@
   # You should have received a copy of the GNU General Public License  # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA  import sys, math    def _days(ctx, now): @@ -94,7 +94,7 @@
    def saturate_v(self, saturation, hv):   return int(255 - (saturation/3*(1-hv))) - +   def committer_angle(self, committer):   angle = float(abs(hash(committer))) / sys.maxint * 360.0   if self._maxhues is None:
 
13
14
15
16
 
17
18
19
 
36
37
38
39
 
40
41
42
 
49
50
51
52
 
53
54
55
56
 
57
58
59
 
13
14
15
 
16
17
18
19
 
36
37
38
 
39
40
41
42
 
49
50
51
 
52
53
54
55
 
56
57
58
59
@@ -13,7 +13,7 @@
   // You should have received a copy of the GNU General Public License  // along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    #include "StringUtils.h"   @@ -36,7 +36,7 @@
  CodePage, 0, wide.c_str(), static_cast<int>(wide.length()),   NULL, 0, NULL, NULL   ); - +   std::vector<CHAR> narrow(ret + 1);     ret = WideCharToMultiByte( @@ -49,11 +49,11 @@
 }     -// Convert multibyte string to Unicode string +// Convert multibyte string to Unicode string  std::wstring MultibyteToWide(const std::string& multibyte, UINT CodePage)  {   int ret = MultiByteToWideChar( - CodePage, 0, multibyte.c_str(), + CodePage, 0, multibyte.c_str(),   static_cast<int>(multibyte.length()), 0, 0   );  
 
13
14
15
16
 
17
18
19
 
27
28
29
30
 
31
32
33
 
13
14
15
 
16
17
18
19
 
27
28
29
 
30
31
32
33
@@ -13,7 +13,7 @@
   // You should have received a copy of the GNU General Public License  // along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.    #ifndef _STRING_UTILS_H  #define _STRING_UTILS_H @@ -27,7 +27,7 @@
 // Convert Unicode string to multibyte string  std::string WideToMultibyte(const std::wstring& wide, UINT CodePage = CP_ACP);   -// Convert multibyte string to Unicode string +// Convert multibyte string to Unicode string  std::wstring MultibyteToWide(const std::string& multibyte, UINT CodePage = CP_ACP);