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

merge with crew

Changeset ba04d623b63d

Parents 9acbd89ae4f1

Parents 46f94acbaedd

by Adrian Buehlmann

Changes to 8 files · Browse files at ba04d623b63d Showing diff from parent 9acbd89ae4f1 46f94acbaedd Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​commit.py Stacked
 
352
353
354
355
356
357
 
358
359
360
 
352
353
354
 
 
 
355
356
357
358
@@ -352,9 +352,7 @@
  '''See if an MQ patch is applied, switch to qrefresh mode'''   self.qheader = None   if self.mqmode: - patch = self.repo.mq.lookup('qtip') - ph = self.repo.mq.readheaders(patch) - self.qheader = '\n'.join(ph.message) + self.qheader = self.repo['qtip'].description()   buf = self.text.get_buffer()   if buf.get_char_count() == 0 or not buf.get_modified():   if self.qnew:
Change 1 of 1 Show Entire File hggtk/​hgtk.py Stacked
 
575
576
577
578
 
579
580
581
 
575
576
577
 
578
579
580
581
@@ -575,7 +575,7 @@
  cmdlist = cmdutil.findpossible(cmd, table)   if ui.verbose:   cmdlist = [' '.join(c[0]) for c in cmdlist.values()] - ui.write("%s\n" % "\n".join(util.sort(cmdlist))) + ui.write("%s\n" % "\n".join(sorted(cmdlist)))    globalopts = [   ('R', 'repository', '',
Change 1 of 2 Show Entire File hggtk/​status.py Stacked
 
40
41
42
43
 
44
45
46
47
 
48
49
50
 
60
61
62
63
 
64
65
66
67
 
68
69
70
 
40
41
42
 
43
44
 
 
 
45
46
47
48
 
58
59
60
 
61
62
 
 
 
63
64
65
66
@@ -40,11 +40,9 @@
 def hunk_markup(text):   'Format a diff hunk for display in a TreeView row with markup'   hunk = "" - lines = text.splitlines() + lines = text.split('\n')   for line in lines: - line = gobject.markup_escape_text(hglib.toutf(line[:512])) - if line[-1] != '\n': - line += '\n' + line = gobject.markup_escape_text(hglib.toutf(line[:512])) + '\n'   if line.startswith('---') or line.startswith('+++'):   hunk += '<span foreground="#000090">%s</span>' % line   elif line.startswith('-'): @@ -60,11 +58,9 @@
 def hunk_unmarkup(text):   'Format a diff hunk for display in a TreeView row without markup'   hunk = "" - lines = text.splitlines() + lines = text.split('\n')   for line in lines: - line = gobject.markup_escape_text(hglib.toutf(line[:512])) - if line[-1] != '\n': - line += '\n' + line = gobject.markup_escape_text(hglib.toutf(line[:512])) + '\n'   hunk += line   return hunk  
 
526
527
528
529
530
531
532
 
539
540
541
542
 
543
544
545
 
 
 
546
547
548
 
526
527
528
 
529
530
531
 
538
539
540
 
541
542
 
 
543
544
545
546
547
548
@@ -526,7 +526,6 @@
  gdialog.Prompt(_('No visual editor configured'),   _('Please configure a visual editor.'), self).run()   self.focus_field('tortoisehg.editor') - self.emit_stop_by_name('response')   return True   thread = threading.Thread(target=doedit, name='edit config')   thread.setDaemon(True) @@ -539,10 +538,11 @@
  def should_live(self, *args):   if self.dirty:   ret = gdialog.Confirm(_('Confirm quit without saving?'), [], self, - _('Yes to abandon changes, No to continue')).run() + _('Yes to abandon changes, No to continue')).run()   if ret != gtk.RESPONSE_YES: - self.emit_stop_by_name('response') - return True + if len(args) != 0: + self.emit_stop_by_name('response') + return True   return False     def focus_field(self, focusfield):
 
48
49
50
 
51
52
53
 
180
181
182
 
 
183
184
185
 
48
49
50
51
52
53
54
 
181
182
183
184
185
186
187
188
@@ -48,6 +48,7 @@
  if entry[FM_STATUS] in 'MAR':   entry[FM_CHECKED] = True   self.update_check_count() + self.opts['check'] = False       def save_settings(self): @@ -180,6 +181,8 @@
  hgshelve.filterpatch = filter_patch   # shelve them!   hgshelve.shelve(self.ui, self.repo, **opts) + self.opts['check'] = True # recheck MAR after commit + self.filechunks = {} # do not keep chunks   self.reload_status()     def unshelve(self):
 
101
102
103
104
105
 
 
 
 
 
 
 
106
107
108
 
 
109
110
111
 
101
102
103
 
 
104
105
106
107
108
109
110
111
 
 
112
113
114
115
116
@@ -101,11 +101,16 @@
    def _get_path(self, appname):   if os.name == 'nt': - return os.path.join(os.environ.get('APPDATA'), 'TortoiseHg', - appname) + try: + import pywintypes + from win32com.shell import shell, shellcon + appdir = shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_APPDATA) + except (ImportError, pywintypes.com_error): + appdir = os.environ['APPDATA'] + return os.path.join(appdir, 'TortoiseHg', appname)   else: - return os.path.join(os.path.expanduser('~'), '.tortoisehg', - appname) + home = os.path.expanduser('~') + return os.path.join(home, '.tortoisehg', appname)     def _audit(self):   if os.path.exists(os.path.dirname(self._path)):
 
10
11
12
13
 
14
15
16
 
111
112
113
114
 
115
116
117
118
119
 
120
121
122
 
138
139
140
141
 
142
143
144
 
163
164
165
166
 
167
168
169
 
189
190
191
192
193
 
 
194
195
196
 
200
201
202
203
 
204
205
206
 
302
303
304
305
 
306
307
308
 
338
339
340
341
 
342
343
344
 
350
351
352
353
 
354
355
356
357
358
359
360
 
361
362
363
364
 
 
365
366
367
 
10
11
12
 
13
14
15
16
 
111
112
113
 
114
115
116
117
118
 
119
120
121
122
 
138
139
140
 
141
142
143
144
 
163
164
165
 
166
167
168
169
 
189
190
191
 
 
192
193
194
195
196
 
200
201
202
 
203
204
205
206
 
302
303
304
 
305
306
307
308
 
338
339
340
 
341
342
343
344
 
350
351
352
 
353
354
355
356
357
358
359
 
360
361
362
 
 
363
364
365
366
367
@@ -10,7 +10,7 @@
  std::string menuText;   std::string helpText;   std::string iconName; - int idCmd; + UINT idCmd;  } MenuDescription;    MenuDescription menuDescList[] = { @@ -111,12 +111,12 @@
 };    typedef std::map<std::string, MenuDescription> MenuDescriptionMap; -typedef std::map<int, MenuDescription> MenuIdCmdMap; +typedef std::map<UINT, MenuDescription> MenuIdCmdMap;    MenuDescriptionMap MenuDescMap;  MenuIdCmdMap MenuIdMap;   -void AddMenuList(int idCmd, const std::string& name) +void AddMenuList(UINT idCmd, const std::string& name)  {   TDEBUG_TRACE("AddMenuList: idCmd = " << idCmd << " name = " << name);   MenuIdMap[idCmd] = MenuDescMap[name]; @@ -138,7 +138,7 @@
  MenuIdMap.clear();  }   -void InsertMenuItemWithIcon(HMENU hMenu, int indexMenu, int idCmd, +void InsertMenuItemWithIcon(HMENU hMenu, UINT indexMenu, UINT idCmd,   const std::string& menuText, const std::string& iconName)  {   MENUITEMINFO mi; @@ -163,7 +163,7 @@
  InsertMenuItem(hMenu, indexMenu, TRUE, &mi);  }   -void InsertSubMenuItemWithIcon(HMENU hMenu, HMENU hSubMenu, int indexMenu, int idCmd, +void InsertSubMenuItemWithIcon(HMENU hMenu, HMENU hSubMenu, UINT indexMenu, UINT idCmd,   const std::string& menuText, const std::string& iconName)  {   MENUITEMINFO mi; @@ -189,8 +189,8 @@
  InsertMenuItem(hMenu, indexMenu, TRUE, &mi);  }   -void InsertMenuItemByName(HMENU hMenu, const std::string& name, int indexMenu, - int idCmd, int idCmdFirst) +void InsertMenuItemByName(HMENU hMenu, const std::string& name, UINT indexMenu, + UINT idCmd, UINT idCmdFirst)  {   TDEBUG_TRACE("InsertMenuItemByName: name = " << name);   MenuDescriptionMap::iterator iter = MenuDescMap.find(name); @@ -200,7 +200,7 @@
  return;   }   - MenuDescription md = MenuDescMap[name]; + MenuDescription md = iter->second;   AddMenuList(idCmd - idCmdFirst, name);   InsertMenuItemWithIcon(hMenu, indexMenu, idCmd, md.menuText, md.iconName);  } @@ -302,7 +302,7 @@
  HMENU hSubMenu = CreatePopupMenu();   if (hSubMenu)   { - int indexSubMenu = 0; + UINT indexSubMenu = 0;   for( walk = entries ; *walk != EndOfList ; walk++ )   {   if( *walk == Separator ) @@ -338,7 +338,7 @@
  MenuIdCmdMap::iterator iter = MenuIdMap.find(idCmd);   if(iter != MenuIdMap.end())   { - DoHgtk(MenuIdMap[idCmd].name); + DoHgtk(iter->second.name);   hr = NOERROR;   }   else @@ -350,18 +350,18 @@
 }    STDMETHODIMP -CShellExt::GetCommandString(UINT idCmd, UINT uFlags, UINT FAR *reserved, +CShellExt::GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT FAR *reserved,   LPSTR pszName, UINT cchMax)  {   *pszName = 0;   char *psz;     TDEBUG_TRACE("CShellExt::GetCommandString: idCmd = " << idCmd); - MenuIdCmdMap::iterator iter = MenuIdMap.find(idCmd); + MenuIdCmdMap::iterator iter = MenuIdMap.find(static_cast<UINT>(idCmd));   if (iter != MenuIdMap.end())   { - TDEBUG_TRACE("CShellExt::GetCommandString: name = " << MenuIdMap[idCmd].name); - psz = (char*)MenuIdMap[idCmd].helpText.c_str(); + TDEBUG_TRACE("CShellExt::GetCommandString: name = " << iter->second.name); + psz = (char*)iter->second.helpText.c_str();   }   else   {
 
79
80
81
82
 
83
84
85
 
79
80
81
 
82
83
84
85
@@ -79,7 +79,7 @@
  // IContextMenu3   STDMETHODIMP QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);   STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - STDMETHODIMP GetCommandString(UINT idCmd, UINT uFlags, UINT FAR *reserved, LPSTR pszName, UINT cchMax); + STDMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT FAR *reserved, LPSTR pszName, UINT cchMax);   STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);   STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult);