Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

Merge with stable

Changeset 1697b9288e3e

Parents 26bab06c4fb5

Parents 8f26a4aa2ff5

by Adrian Buehlmann

Changes to 9 files · Browse files at 1697b9288e3e Showing diff from parent 26bab06c4fb5 8f26a4aa2ff5 Diff from another changeset...

Change 1 of 1 Show Entire File .hgignore Stacked
 
34
35
36
 
 
34
35
36
37
@@ -34,3 +34,4 @@
 glob:*~  glob:tortoisehg/util/__version__.py  glob:win32/shellext/parentid.h +glob:*.wixobj
 
 
Added image
Added image
Change 1 of 1 Show Entire File contrib/​wix/​sdk_build_extensions.cmd Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -0,0 +1,25 @@
+:: %1 - TortoiseHg Version first level +:: %2 - second level +:: %3 - third level +:: %4 - platform (x86 or x64) +:: %5 - msi product id (GUID) + +set _SDKBIN_=%PROGRAMFILES%\Microsoft SDKs\Windows\v7.0\Bin +if exist "%_SDKBIN_%" goto :ok +set _SDKBIN_=%ProgramW6432%\Microsoft SDKs\Windows\v7.0\Bin +if exist "%_SDKBIN_%" goto :ok +echo Microsoft Windows SDK 7 SP1 not installed +pause +exit 1 +:ok + +cd win32\shellext + +call "%_SDKBIN_%\SetEnv.cmd" /xp /%4 /release +set DEBUG=1 +set THG_EXTRA_CPPFLAGS=/DTHG_MSI_INSTALL /DTHG_PRODUCT_ID=%5 +set THG_EXTRA_RCFLAGS=/dTHG_VERSION_FIRST=%1 /dTHG_VERSION_SECOND=%2 /dTHG_VERSION_THIRD=%3 /dTHG_PRODUCT_ID="%5" +nmake /f Makefile.nmake clean +nmake /f Makefile.nmake +move ThgShell.dll ..\ThgShell%4.dll +move terminate.exe ..\terminate-%4.exe
 
77
78
79
80
 
81
82
83
 
186
187
188
189
 
190
191
192
 
290
291
292
293
 
294
295
 
296
297
298
 
315
316
317
318
319
320
 
 
 
321
322
323
 
77
78
79
 
80
81
82
83
 
186
187
188
 
189
190
191
192
 
290
291
292
 
293
294
 
295
296
297
298
 
315
316
317
 
 
 
318
319
320
321
322
323
@@ -77,7 +77,7 @@
  Name='TortoiseHgRpcServer' Value='[INSTALLDIR]thgtaskbar.exe' />   </Component>   <Component Id='thgshellx86dll' Guid='1126CF42-3994-428B-A746-464E1BC680F3'> - <File Id='thgshellx86dll' Name='ThgShellx86.dll' DiskId='1' Source='..\misc\ThgShellx86.dll' KeyPath='yes'/> + <File Id='thgshellx86dll' Name='ThgShellx86.dll' DiskId='1' Source='win32\ThgShellx86.dll' KeyPath='yes'/>   <RegistryValue Root='HKMU' Key='Software\TortoiseHg' Type='string' Value='[INSTALLDIR]' />   <RegistryValue Root='HKCR' Key='CLSID\{46605027-5B8C-4DCE-BFE0-051B7972D64C}\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll' /> @@ -186,7 +186,7 @@
  <Directory Id="CommonFiles64Folder" Name="Programs64" >   <Directory Id="Common64" Name="TortoiseHg" >   <Component Id='thgshellx64dll' Guid='59FD2A49-BA62-40CC-B155-D11DB11EE611' Win64='yes'> - <File Id='thgshellx64dll' Name='ThgShellx64.dll' DiskId='1' Source='..\misc\ThgShellx64.dll' KeyPath='yes' /> + <File Id='thgshellx64dll' Name='ThgShellx64.dll' DiskId='1' Source='win32\ThgShellx64.dll' KeyPath='yes' />   <RegistryValue Root='HKMU' Key='Software\TortoiseHg' Type='string' Value='[INSTALLDIR]' />   <RegistryValue Root='HKCR' Key='CLSID\{46605027-5B8C-4DCE-BFE0-051B7972D64C}\InProcServer32'   Type='string' Value='[Common64]ThgShellx64.dll' /> @@ -290,9 +290,9 @@
  the command pipe. Windows installer sometimes fails to shutdown thgtaskbar.exe, which   occasionally leads to a crash of thgtaskbar.exe during install, which in turn pops up   an ugly crash report dialog pointing to faulting module PYTHON26.DLL. --> - <Binary Id='TerminateEXE' SourceFile='..\misc\terminate.exe' /> + <Binary Id='TerminateEXE' SourceFile='win32\terminate-x86.exe' />   <CustomAction Id='CallTerminate' BinaryKey='TerminateEXE' ExeCommand='' Return='ignore' /> - +   <CustomAction Id='StartThgtaskbarEXE' FileKey='thgtaskbarEXE' ExeCommand='' Return='asyncNoWait' />     <InstallExecuteSequence> @@ -315,9 +315,9 @@
  <Property Id="WIXUI_EXITDIALOGOPTIONALTEXT"   Value="NOTE: Logoff/logon or restarting explorer may be needed to start the overlay icons" />   - <WixVariable Id="WixUILicenseRtf" Value="..\misc\COPYING.rtf" /> - <WixVariable Id="WixUIBannerBmp" Value="..\misc\WixUIBannerBmp.bmp" /> - <WixVariable Id="WixUIDialogBmp" Value="..\misc\WixUIDialogBmp.bmp" /> + <WixVariable Id="WixUILicenseRtf" Value="contrib\wix\COPYING.rtf" /> + <WixVariable Id="WixUIBannerBmp" Value="contrib\wix\WixUIBannerBmp.bmp" /> + <WixVariable Id="WixUIDialogBmp" Value="contrib\wix\WixUIDialogBmp.bmp" />     <Icon Id="thgIcon.ico" SourceFile="icons\thg_logo.ico" />   <Icon Id="hgIcon.ico" SourceFile="icons\hg.ico" />
doc/​source/​figures/​init.png
size changed from 892x691 to 419x150
mode changed from RGB to RGBA
Removed image
Added image
 
1
2
3
 
 
 
4
5
6
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
9
10
 
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
 
215
216
217
218
219
220
221
 
 
 
 
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
 
100
101
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
104
105
 
252
253
254
 
255
256
257
@@ -1,10 +1,93 @@
-****************************** -A quick tour for the impatient -****************************** +********************************* +A Quick Start Guide to TortoiseHg +*********************************    .. module:: tour   :synopsis: A Gentle Introduction to Using TortoiseHg on Windows   +Welcome to TortoiseHg and the Mercurial! TortoiseHg is a Windows +Explorer shell extension and a set of graphical applications that serve +as a friendly front-end to the Mercurial distributed version control +system (DVCS). All TortoiseHg functionality is reachable from Explorer +context menus as well as from a command line application named +:command:`hgtk`. Mercurial commands are also available from the +standard :command:`hg` command line application. + + +Configuring TortoiseHg +====================== + +Your first step should be to make sure that you are correctly identified +to TortoiseHg. You do this by opening the global settings dialog. +Right click on the desktop background and select +:menuselection:`TortoiseHg --> Global Settings`. + +.. figure:: figures/cmenu-global-settings.jpg + :alt: Desktop Context Menu + + Open "Global Settings" from the desktop + +This opens the TortoiseHg settings dialog, editing your global (user) +configuration. If you are using the command line, the global settings +dialog can be opened by :command:`hgtk userconfig`. + +.. figure:: figures/settings.png + :alt: Settings Dialog + + TortoiseHg Settings Dialog + +First select the :guilabel:`Commit` page and enter a name in the +:guilabel:`Username` field. + +.. note:: + If you neglect to configure a username TortoiseHg will ask you to + enter one when you try to *commit*, which is the first time a + username is actually required. + +.. note:: + There are no hard fast rules on how to format your username, the + field is free form, but the following convention is commonly used:: + + FullName <email> + + for example :: + + Donald Duck <donaldduck@example.net> + + The email address is stripped when viewing history in the changelog + viewer, and the built-in web server obfuscates email addresses to + prevent SPAM. + + +Next, select the :guilabel:`TortoiseHg` page and select the +:guilabel:`Three-way Merge Tool` entry. In the drop down list you will +find all of the merge tools detected on your computer (kdiff3 is +provided by the Windows installer) and a number of internal merge +behaviors. Select your preferred merge tool. + +If you prefer for TortoiseHg to also use your selected merge tool for +visual diffs, you can leave the :guilabel:`Visual Diff Tool` +unspecified. Otherwise, select your favorite visual diff tool from the +drop down list of detected visual diff tools. + +If there are no options in either drop-down list, you must install a +diff/merge tool that is supported by our mergetools.rc or configure your +own tool. + +Feel free to configure other global settings while you have the dialog +open. You will have the chance later to override these global settings +with repository local settings, if required. + +Click the :guilabel:`Ok` button to save the changes you have made and +close the settings dialog. + +.. note:: + Most TortoiseHg tools require a restart to pick up changes made in the + settings dialog. + +Getting Acquainted +================== +  Mercurial supports many different  `collaboration models <http://hgbook.red-bean.com/read/collaborating-with-other-people.html>`_.  This chapter describes just one of those models: a single central repository. @@ -17,52 +100,6 @@
 non-Mercurial repositories into Mercurial repositories, but this example  assumes you are starting from scratch.   -This tutorial assumes you already have TortoiseHg properly installed, -and you have your project folder open in your file browser. - - -Configuring TortoiseHg -====================== - -First you need to make sure that you are correctly identified in -TortoiseHg. You do this by adjusting the global settings of TortoiseHg. -Right click in your source folder and select -:menuselection:`TortoiseHg --> Global Settings` - -.. figure:: figures/cmenu-nofiles.jpg - :alt: Context Menu - - Context menu with no files selected - -You must then select the :guilabel:`Commit` tab and enter a name in the -:guilabel:`Username` field. - -.. note:: - If you forget to configure your username TortoiseHg will ask you to - enter one when you *commit*, the only time the name is actually - required. - -.. note:: - There are no hard rules on how to format your user name, the field - is free form, but the following convention is commonly used:: - - FullName <email> - - for example :: - - Donald Duck <donaldduck@example.net> - - The email address is stripped when viewing history in the changelog - viewer, and the built-in web server obfuscates email addresses to - prevent SPAM. - -If you are not using one of our Windows installers, you will also have -to configure a visual diff tool. Type :command:`hgtk userconfig` and on -the TortoiseHg tab you will find :guilabel:`Visual Diff Tool`. If -there are no options in the drop-down list, you must install a diff tool -that is supported by our mergetools.ini or configure your own tool. - -  Initialize the repository  =========================   @@ -215,7 +252,6 @@
 directories to find specific changes and commit them from Explorer. A  quicker way is to use the commit tool:   -.. {{images/image001.png}}  .. figure:: figures/overlayicons.png   :alt: Overlay Icons  
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
 # hgthread.py - Gtk UI class TortoiseHg  #  # Copyright 2009 Steve Borho <steve@borho.org>  #  # This software may be used and distributed according to the terms of the  # GNU General Public License version 2, incorporated herein by reference.    import gtk  import Queue  import time  import urllib2    from mercurial import ui, util, error    from tortoisehg.util.i18n import _  from tortoisehg.util import hglib, thread2    from tortoisehg.hgtk import dialog, gdialog    class GtkUi(ui.ui):   '''   PyGtk enabled mercurial.ui subclass. All this code will be running   in a background thread, so it cannot directly call into Gtk.   Instead, it places output and dialog requests onto queues for the   main thread to pickup.   '''   def __init__(self, src=None, outputq=None, errorq=None, dialogq=None,   responseq=None):   super(GtkUi, self).__init__(src)   if src:   self.outputq = src.outputq   self.errorq = src.errorq   self.dialogq = src.dialogq   self.responseq = src.responseq   else:   self.outputq = outputq   self.errorq = errorq   self.dialogq = dialogq   self.responseq = responseq   self.setconfig('ui', 'interactive', 'on') - self.setconfig('ui', 'progress', 'False') + self.setconfig('progress', 'disable', 'True')     def write(self, *args):   if hglib.uiwrite(self, args):   for a in args:   self.outputq.put(str(a))     def write_err(self, *args):   for a in args:   self.errorq.put(str(a))     def flush(self):   pass     def prompt(self, msg, choices=None, default="y"):   if not self.interactive(): return default   try:   # send request to main thread, await response   self.dialogq.put( (msg, True, choices, None) )   r = self.responseq.get(True)   if r is None:   raise EOFError   if not r:   return default   if choices:   # return char for Mercurial 1.3   choice = choices[r]   return choice[choice.index("&")+1].lower()   return r   except EOFError:   raise util.Abort(_('response expected'))     def promptchoice(self, msg, choices, default=0):   if not self.interactive(): return default   try:   # send request to main thread, await response   self.dialogq.put( (msg, True, choices, default) )   r = self.responseq.get(True)   if r is None:   raise EOFError   return r   except EOFError:   raise util.Abort(_('response expected'))     def getpass(self, prompt=None, default=None):   # send request to main thread, await response   self.dialogq.put( (prompt or _('password: '), False, None, default) )   r = self.responseq.get(True)   if r is None:   raise util.Abort(_('response expected'))   return r      class HgThread(thread2.Thread):   '''   Run an hg command in a background thread, implies output is being   sent to a rendered text buffer interactively and requests for   feedback from Mercurial can be handled by the user via dialog   windows.   '''   def __init__(self, args=[], postfunc=None, parent=None):   self.outputq = Queue.Queue()   self.errorq = Queue.Queue()   self.dialogq = Queue.Queue()   self.responseq = Queue.Queue()   self.ui = GtkUi(None, self.outputq, self.errorq, self.dialogq,   self.responseq)   self.args = args   self.ret = None   self.postfunc = postfunc   self.parent = parent   thread2.Thread.__init__(self)     def getqueue(self):   return self.outputq     def geterrqueue(self):   return self.errorq     def return_code(self):   '''   None - command is incomplete, possibly exited with exception   0 - command returned successfully   else an error was returned   '''   return self.ret     def process_dialogs(self):   '''Polled every 10ms to serve dialogs for the background thread'''   try:   (prompt, visible, choices, default) = self.dialogq.get_nowait()   if choices:   dlg = gdialog.CustomPrompt('Hg Prompt', prompt,   self.parent, choices, default)   dlg.connect('response', self.prompt_response)   dlg.show_all()   else:   dlg = dialog.entry_dialog(self.parent, prompt,   visible, default, self.dialog_response)   except Queue.Empty:   pass     def prompt_response(self, dialog, response_id):   dialog.destroy()   if response_id == gtk.RESPONSE_DELETE_EVENT:   self.responseq.put(None)   else:   self.responseq.put(response_id)     def dialog_response(self, dialog, response_id):   if response_id == gtk.RESPONSE_OK:   text = dialog.entry.get_text()   else:   text = None   dialog.destroy()   self.responseq.put(text)     def run(self):   try:   for k, v in self.ui.configitems('defaults'):   self.ui.setconfig('defaults', k, '')   ret = hglib.dispatch._dispatch(self.ui, self.args)   if ret:   self.ui.write(_('[command returned code %d ') % int(ret))   else:   self.ui.write(_('[command completed successfully '))   self.ui.write(time.asctime() + ']\n')   self.ret = ret or 0   if self.postfunc:   self.postfunc(ret)   except util.Abort, e:   self.ui.write_err(_('abort: ') + str(e) + '\n')   except (error.RepoError, urllib2.HTTPError), e:   self.ui.write_err(str(e) + '\n')   except (Exception, OSError, IOError), e:   self.ui.write_err(str(e) + '\n')