p2 avatar p2 committed f7e17ba

Added branch name to window title and commit sheet

TODO: Incorporate branch name fetching into standard hg log operation

Comments (0)

Files changed (11)

 298ca0f2018daba3010cd74c1a6248f4b15e97a0 ext/BWToolkit
-ef2ed039badc6c90deb31911a3cddf29fc50f5f6 ext/MYUtilities
+789a18ca085388bcdbaadada1c13f7334ffc4f31 ext/MYUtilities

English.lproj/Localizable.strings

 /* Name of temp file generated by Diff command */
 "%@ (%@ vs %@).diff" = "%1$@ (%2$@ vs %3$@).diff";
 
+/* Repository window title format (uncommitted) */
+"%@ (branch: %@)" = "%1$@ (branch: %2$@)";
+
 /* Repository window title format */
 "%@ [rev %i]" = "%1$@ [rev %2$i]";
 
 /* Default button in merge success sheet */
 "Commit" = "Commit";
 
+/* Branch name field */
+"Committing to branch %@" = "Committing to branch %@";
+
 /* Button of conversion alert from Open command */
 "Convert" = "Convert";
 

English.lproj/Repo.strings

 /* Class = "NSPanel"; title = "Commit Sheet"; ObjectID = "300060"; */
 "300060.title" = "Commit Sheet";
 
-/* Class = "NSTextFieldCell"; title = "Commit message:"; ObjectID = "300065"; */
-"300065.title" = "Commit message:";
-
 /* Class = "NSButtonCell"; title = "Commit"; ObjectID = "300069"; */
 "300069.title" = "Commit";
 
 
 /* Class = "NSMenuItem"; title = "Merge Conflict Again"; ObjectID = "300406"; */
 "300406.title" = "Merge Conflict Again";
+
+/* Class = "NSTextFieldCell"; title = "Committing to branch default"; ObjectID = "300416"; */
+"300416.title" = "Committing to branch default";

English.lproj/Repo.xib

 <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
 	<data>
 		<int key="IBDocument.SystemTarget">1060</int>
-		<string key="IBDocument.SystemVersion">11A494a</string>
+		<string key="IBDocument.SystemVersion">11A511</string>
 		<string key="IBDocument.InterfaceBuilderVersion">1881</string>
-		<string key="IBDocument.AppKitVersion">1128</string>
-		<string key="IBDocument.HIToolboxVersion">564.00</string>
+		<string key="IBDocument.AppKitVersion">1138</string>
+		<string key="IBDocument.HIToolboxVersion">566.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
 			<string key="NS.object.0">1881</string>
 															<int key="NSvFlags">256</int>
 															<string key="NSFrameSize">{800, 148}</string>
 															<reference key="NSSuperview" ref="61754055"/>
-															<reference key="NSWindow"/>
 															<reference key="NSNextKeyView" ref="746151416"/>
 															<bool key="NSEnabled">YES</bool>
 															<object class="NSTableHeaderView" key="NSHeaderView" id="288602249">
 																<int key="NSvFlags">256</int>
 																<string key="NSFrameSize">{800, 17}</string>
 																<reference key="NSSuperview" ref="516652966"/>
-																<reference key="NSWindow"/>
 																<reference key="NSNextKeyView" ref="61754055"/>
 																<reference key="NSTableView" ref="392325734"/>
 															</object>
 													</array>
 													<string key="NSFrame">{{0, 17}, {800, 148}}</string>
 													<reference key="NSSuperview" ref="214279069"/>
-													<reference key="NSWindow"/>
 													<reference key="NSNextKeyView" ref="392325734"/>
 													<reference key="NSDocView" ref="392325734"/>
 													<reference key="NSBGColor" ref="131218211"/>
 													<int key="NSvFlags">256</int>
 													<string key="NSFrame">{{785, 17}, {15, 148}}</string>
 													<reference key="NSSuperview" ref="214279069"/>
-													<reference key="NSWindow"/>
 													<reference key="NSNextKeyView" ref="532081020"/>
 													<reference key="NSTarget" ref="214279069"/>
 													<string key="NSAction">_doScroller:</string>
 													<int key="NSvFlags">-2147483392</int>
 													<string key="NSFrame">{{-100, -100}, {180, 15}}</string>
 													<reference key="NSSuperview" ref="214279069"/>
-													<reference key="NSWindow"/>
 													<reference key="NSNextKeyView" ref="516652966"/>
 													<int key="NSsFlags">1</int>
 													<reference key="NSTarget" ref="214279069"/>
 													</array>
 													<string key="NSFrameSize">{800, 17}</string>
 													<reference key="NSSuperview" ref="214279069"/>
-													<reference key="NSWindow"/>
 													<reference key="NSNextKeyView" ref="288602249"/>
 													<reference key="NSDocView" ref="288602249"/>
 													<reference key="NSBGColor" ref="131218211"/>
 											</array>
 											<string key="NSFrameSize">{800, 165}</string>
 											<reference key="NSSuperview" ref="196042844"/>
-											<reference key="NSWindow"/>
 											<reference key="NSNextKeyView" ref="834737768"/>
 											<int key="NSsFlags">133136</int>
 											<reference key="NSVScroller" ref="746151416"/>
 									</array>
 									<string key="NSFrameSize">{800, 164}</string>
 									<reference key="NSSuperview" ref="537766158"/>
-									<reference key="NSWindow"/>
 									<reference key="NSNextKeyView" ref="214279069"/>
 									<string key="NSClassName">NSView</string>
 								</object>
 																			<int key="NSvFlags">4352</int>
 																			<string key="NSFrameSize">{256, 292}</string>
 																			<reference key="NSSuperview" ref="305294895"/>
-																			<reference key="NSWindow"/>
 																			<reference key="NSNextKeyView" ref="864508780"/>
 																			<bool key="NSEnabled">YES</bool>
 																			<object class="_NSCornerView" key="NSCornerView">
 																	</array>
 																	<string key="NSFrameSize">{256, 292}</string>
 																	<reference key="NSSuperview" ref="977457134"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="408726427"/>
 																	<reference key="NSDocView" ref="408726427"/>
 																	<object class="NSColor" key="NSBGColor">
 																	<int key="NSvFlags">-2147483392</int>
 																	<string key="NSFrame">{{241, 17}, {15, 2}}</string>
 																	<reference key="NSSuperview" ref="977457134"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="521395639"/>
 																	<reference key="NSTarget" ref="977457134"/>
 																	<string key="NSAction">_doScroller:</string>
 																	<int key="NSvFlags">-2147483392</int>
 																	<string key="NSFrame">{{0, 264}, {277, 15}}</string>
 																	<reference key="NSSuperview" ref="977457134"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="480384811"/>
 																	<int key="NSsFlags">1</int>
 																	<reference key="NSTarget" ref="977457134"/>
 															</array>
 															<string key="NSFrame">{{0, 23}, {256, 292}}</string>
 															<reference key="NSSuperview" ref="391521278"/>
-															<reference key="NSWindow"/>
 															<reference key="NSNextKeyView" ref="305294895"/>
 															<int key="NSsFlags">133680</int>
 															<reference key="NSVScroller" ref="864508780"/>
 																	<int key="NSvFlags">292</int>
 																	<string key="NSFrame">{{-1, -1}, {32, 24}}</string>
 																	<reference key="NSSuperview" ref="480384811"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="684332359"/>
 																	<bool key="NSEnabled">YES</bool>
 																	<object class="NSPopUpButtonCell" key="NSCell" id="756103436">
 																	<int key="NSvFlags">290</int>
 																	<string key="NSFrame">{{30, -1}, {206, 24}}</string>
 																	<reference key="NSSuperview" ref="480384811"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="168465909"/>
 																	<bool key="NSEnabled">YES</bool>
 																	<object class="NSButtonCell" key="NSCell" id="997246285">
 															</array>
 															<string key="NSFrameSize">{256, 23}</string>
 															<reference key="NSSuperview" ref="391521278"/>
-															<reference key="NSWindow"/>
 															<reference key="NSNextKeyView" ref="70202347"/>
 															<string key="NSClassName">BWAnchoredButtonBar</string>
 														</object>
 													</array>
 													<string key="NSFrameSize">{256, 315}</string>
 													<reference key="NSSuperview" ref="928128656"/>
-													<reference key="NSWindow"/>
 													<reference key="NSNextKeyView" ref="977457134"/>
 													<string key="NSClassName">NSView</string>
 												</object>
 																	<int key="NSvFlags">293</int>
 																	<string key="NSFrame">{{170, 3}, {205, 19}}</string>
 																	<reference key="NSSuperview" ref="1041810590"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="49166770"/>
 																	<bool key="NSEnabled">YES</bool>
 																	<object class="NSSegmentedCell" key="NSCell" id="901185224">
 															</array>
 															<string key="NSFrame">{{0, 290}, {543, 25}}</string>
 															<reference key="NSSuperview" ref="168465909"/>
-															<reference key="NSWindow"/>
 															<reference key="NSNextKeyView" ref="955311734"/>
 															<string key="NSClassName">BWGradientBox</string>
 														</object>
 																		<object class="NSTextView" id="1057217485">
 																			<reference key="NSNextResponder" ref="378280175"/>
 																			<int key="NSvFlags">2322</int>
-																			<string key="NSFrameSize">{0.001, 12}</string>
+																			<string key="NSFrameSize">{0, 0}</string>
 																			<reference key="NSSuperview" ref="378280175"/>
-																			<reference key="NSWindow"/>
 																			<reference key="NSNextKeyView" ref="31961279"/>
 																			<object class="NSTextContainer" key="NSTextContainer" id="178117438">
 																				<object class="NSLayoutManager" key="NSLayoutManager">
 																					<nil key="NSDelegate"/>
 																				</object>
 																				<reference key="NSTextView" ref="1057217485"/>
-																				<double key="NSWidth">0.001</double>
+																				<double key="NSWidth">0.0</double>
 																				<int key="NSTCFlags">1</int>
 																			</object>
 																			<object class="NSTextViewSharedData" key="NSSharedData">
 																			</object>
 																			<int key="NSTVFlags">7</int>
 																			<string key="NSMaxSize">{10000000, 10000000}</string>
-																			<string key="NSMinize">{0, 0}</string>
 																			<nil key="NSDelegate"/>
 																		</object>
 																	</array>
 																	<string key="NSFrameSize">{543, 290}</string>
 																	<reference key="NSSuperview" ref="554197517"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="1057217485"/>
 																	<reference key="NSDocView" ref="1057217485"/>
 																	<reference key="NSBGColor" ref="131218211"/>
 																	<int key="NSvFlags">-2147483392</int>
 																	<string key="NSFrame">{{271, 1}, {15, 237}}</string>
 																	<reference key="NSSuperview" ref="554197517"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="79423723"/>
 																	<reference key="NSTarget" ref="554197517"/>
 																	<string key="NSAction">_doScroller:</string>
 																	<int key="NSvFlags">-2147483392</int>
 																	<string key="NSFrame">{{1, 238}, {285, 15}}</string>
 																	<reference key="NSSuperview" ref="554197517"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView"/>
 																	<int key="NSsFlags">1</int>
 																	<reference key="NSTarget" ref="554197517"/>
 															</array>
 															<string key="NSFrameSize">{543, 290}</string>
 															<reference key="NSSuperview" ref="168465909"/>
-															<reference key="NSWindow"/>
 															<reference key="NSNextKeyView" ref="378280175"/>
 															<int key="NSsFlags">133680</int>
 															<reference key="NSVScroller" ref="31961279"/>
 																	</set>
 																	<string key="NSFrame">{{20, 20}, {503, 250}}</string>
 																	<reference key="NSSuperview" ref="49166770"/>
-																	<reference key="NSWindow"/>
 																	<reference key="NSNextKeyView" ref="554197517"/>
 																	<bool key="NSEnabled">YES</bool>
 																	<object class="NSImageCell" key="NSCell" id="587628213">
 															</array>
 															<string key="NSFrameSize">{543, 290}</string>
 															<reference key="NSSuperview" ref="168465909"/>
-															<reference key="NSWindow"/>
 															<reference key="NSNextKeyView" ref="581882828"/>
 															<string key="NSClassName">BWGradientBox</string>
 														</object>
 													</array>
 													<string key="NSFrame">{{257, 0}, {543, 315}}</string>
 													<reference key="NSSuperview" ref="928128656"/>
-													<reference key="NSWindow"/>
 													<reference key="NSNextKeyView" ref="1041810590"/>
 													<string key="NSClassName">NSView</string>
 												</object>
 											</array>
 											<string key="NSFrameSize">{800, 315}</string>
 											<reference key="NSSuperview" ref="532081020"/>
-											<reference key="NSWindow"/>
 											<reference key="NSNextKeyView" ref="391521278"/>
 											<bool key="NSIsVertical">YES</bool>
 											<int key="NSDividerStyle">2</int>
 									</array>
 									<string key="NSFrame">{{0, 173}, {800, 315}}</string>
 									<reference key="NSSuperview" ref="537766158"/>
-									<reference key="NSWindow"/>
 									<reference key="NSNextKeyView" ref="928128656"/>
 									<string key="NSClassName">NSView</string>
 								</object>
 							</array>
 							<string key="NSFrameSize">{800, 488}</string>
 							<reference key="NSSuperview" ref="118353878"/>
-							<reference key="NSWindow"/>
 							<reference key="NSNextKeyView" ref="196042844"/>
 							<string key="NSAutosaveName">splitter</string>
 						</object>
 					</array>
 					<string key="NSFrameSize">{800, 488}</string>
 					<reference key="NSSuperview"/>
-					<reference key="NSWindow"/>
 					<reference key="NSNextKeyView" ref="537766158"/>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1920, 1058}}</string>
 				<nil key="NSUserInterfaceItemIdentifier"/>
 				<string key="NSWindowContentMinSize">{300, 124}</string>
 				<object class="NSView" key="NSWindowView" id="601455988">
-					<nil key="NSNextResponder"/>
+					<reference key="NSNextResponder"/>
 					<int key="NSvFlags">256</int>
 					<array class="NSMutableArray" key="NSSubviews">
-						<object class="NSTextField" id="895980691">
-							<reference key="NSNextResponder" ref="601455988"/>
-							<int key="NSvFlags">266</int>
-							<string key="NSFrame">{{17, 171}, {374, 17}}</string>
-							<reference key="NSSuperview" ref="601455988"/>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSTextFieldCell" key="NSCell" id="213363148">
-								<int key="NSCellFlags">67239488</int>
-								<int key="NSCellFlags2">272630784</int>
-								<string key="NSContents">Commit message:</string>
-								<object class="NSFont" key="NSSupport" id="820427071">
-									<string key="NSName">LucidaGrande</string>
-									<double key="NSSize">13</double>
-									<int key="NSfFlags">1044</int>
-								</object>
-								<reference key="NSControlView" ref="895980691"/>
-								<reference key="NSBackgroundColor" ref="265951760"/>
-								<reference key="NSTextColor" ref="306507377"/>
-							</object>
-						</object>
 						<object class="NSButton" id="495508749">
 							<reference key="NSNextResponder" ref="601455988"/>
 							<int key="NSvFlags">289</int>
 							<string key="NSFrame">{{298, 12}, {96, 32}}</string>
 							<reference key="NSSuperview" ref="601455988"/>
+							<reference key="NSNextKeyView"/>
 							<int key="NSTag">1</int>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSButtonCell" key="NSCell" id="252351346">
 								<int key="NSCellFlags">67239424</int>
 								<int key="NSCellFlags2">134217728</int>
 								<string key="NSContents">Commit</string>
-								<reference key="NSSupport" ref="820427071"/>
+								<object class="NSFont" key="NSSupport" id="820427071">
+									<string key="NSName">LucidaGrande</string>
+									<double key="NSSize">13</double>
+									<int key="NSfFlags">1044</int>
+								</object>
 								<reference key="NSControlView" ref="495508749"/>
 								<int key="NSButtonFlags">-2038284033</int>
 								<int key="NSButtonFlags2">268435585</int>
 							<int key="NSvFlags">289</int>
 							<string key="NSFrame">{{202, 12}, {96, 32}}</string>
 							<reference key="NSSuperview" ref="601455988"/>
+							<reference key="NSNextKeyView" ref="495508749"/>
 							<bool key="NSEnabled">YES</bool>
 							<object class="NSButtonCell" key="NSCell" id="508125031">
 								<int key="NSCellFlags">67239424</int>
 											<int key="NSvFlags">2322</int>
 											<string key="NSFrameSize">{366, 14}</string>
 											<reference key="NSSuperview" ref="592092130"/>
+											<reference key="NSNextKeyView" ref="263886132"/>
 											<object class="NSTextContainer" key="NSTextContainer" id="945498614">
 												<object class="NSLayoutManager" key="NSLayoutManager">
 													<object class="NSTextStorage" key="NSTextStorage">
 									<int key="NSvFlags">-2147483392</int>
 									<string key="NSFrame">{{720, 1}, {15, 204}}</string>
 									<reference key="NSSuperview" ref="912248093"/>
+									<reference key="NSNextKeyView" ref="999697967"/>
 									<reference key="NSTarget" ref="912248093"/>
 									<string key="NSAction">_doScroller:</string>
 									<double key="NSPercent">0.99029117822647095</double>
 									<int key="NSvFlags">-2147483392</int>
 									<string key="NSFrame">{{-100, -100}, {87, 18}}</string>
 									<reference key="NSSuperview" ref="912248093"/>
+									<reference key="NSNextKeyView" ref="592092130"/>
 									<int key="NSsFlags">1</int>
 									<reference key="NSTarget" ref="912248093"/>
 									<string key="NSAction">_doScroller:</string>
 							</array>
 							<string key="NSFrame">{{20, 60}, {368, 103}}</string>
 							<reference key="NSSuperview" ref="601455988"/>
-							<reference key="NSNextKeyView" ref="592092130"/>
+							<reference key="NSNextKeyView" ref="104809913"/>
 							<int key="NSsFlags">133650</int>
 							<reference key="NSVScroller" ref="263886132"/>
 							<reference key="NSHScroller" ref="104809913"/>
 							<reference key="NSContentView" ref="592092130"/>
 						</object>
+						<object class="NSTextField" id="226598158">
+							<reference key="NSNextResponder" ref="601455988"/>
+							<int key="NSvFlags">266</int>
+							<string key="NSFrame">{{17, 171}, {374, 17}}</string>
+							<reference key="NSSuperview" ref="601455988"/>
+							<reference key="NSNextKeyView" ref="912248093"/>
+							<bool key="NSEnabled">YES</bool>
+							<object class="NSTextFieldCell" key="NSCell" id="538358012">
+								<int key="NSCellFlags">67239488</int>
+								<int key="NSCellFlags2">272630784</int>
+								<string key="NSContents">Committing to branch default</string>
+								<reference key="NSSupport" ref="820427071"/>
+								<reference key="NSControlView" ref="226598158"/>
+								<reference key="NSBackgroundColor" ref="265951760"/>
+								<reference key="NSTextColor" ref="306507377"/>
+							</object>
+						</object>
 					</array>
 					<string key="NSFrameSize">{408, 208}</string>
+					<reference key="NSSuperview"/>
+					<reference key="NSNextKeyView" ref="226598158"/>
 				</object>
 				<string key="NSScreenRect">{{0, 0}, {1920, 1058}}</string>
 				<string key="NSMinSize">{300, 146}</string>
 					</object>
 					<int key="connectionID">300412</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">_commitBranchField</string>
+						<reference key="source" ref="798535885"/>
+						<reference key="destination" ref="226598158"/>
+					</object>
+					<int key="connectionID">300417</int>
+				</object>
 			</array>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<array key="orderedObjects">
 						<array class="NSMutableArray" key="children">
 							<reference ref="495508749"/>
 							<reference ref="999697967"/>
-							<reference ref="895980691"/>
 							<reference ref="912248093"/>
+							<reference ref="226598158"/>
 						</array>
 						<reference key="parent" ref="519367524"/>
 					</object>
 						<reference key="parent" ref="999697967"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">300064</int>
-						<reference key="object" ref="895980691"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="213363148"/>
-						</array>
-						<reference key="parent" ref="601455988"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">300065</int>
-						<reference key="object" ref="213363148"/>
-						<reference key="parent" ref="895980691"/>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">300083</int>
 						<reference key="object" ref="912248093"/>
 						<array class="NSMutableArray" key="children">
 						<reference key="object" ref="976917881"/>
 						<reference key="parent" ref="1043860070"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300415</int>
+						<reference key="object" ref="226598158"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="538358012"/>
+						</array>
+						<reference key="parent" ref="601455988"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">300416</int>
+						<reference key="object" ref="538358012"/>
+						<reference key="parent" ref="226598158"/>
+					</object>
 				</array>
 			</object>
 			<dictionary class="NSMutableDictionary" key="flattenedProperties">
 				<string key="300060.IBWindowTemplateEditedContentRect">{{404, 595}, {408, 208}}</string>
 				<integer value="0" key="300060.NSWindowTemplate.visibleAtLaunch"/>
 				<string key="300061.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="300064.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="300065.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 				<string key="300068.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 				<string key="300069.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 				<string key="300070.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 				<string key="300401.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 				<string key="300404.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 				<string key="300406.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="300415.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="300416.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 				<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 				<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
 			</dictionary>
 			<nil key="activeLocalization"/>
 			<dictionary class="NSMutableDictionary" key="localizations"/>
 			<nil key="sourceID"/>
-			<int key="maxID">300412</int>
+			<int key="maxID">300417</int>
 		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<object class="IBPartialClassDescription">
-					<string key="className">BWAnchoredButton</string>
-					<string key="superclassName">NSButton</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/BWAnchoredButton.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">BWAnchoredButtonBar</string>
-					<string key="superclassName">NSView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/BWAnchoredButtonBar.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">BWAnchoredButtonCell</string>
-					<string key="superclassName">NSButtonCell</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/BWAnchoredButtonCell.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">BWAnchoredPopUpButton</string>
-					<string key="superclassName">NSPopUpButton</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/BWAnchoredPopUpButton.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">BWAnchoredPopUpButtonCell</string>
-					<string key="superclassName">NSPopUpButtonCell</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/BWAnchoredPopUpButtonCell.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">BWGradientBox</string>
-					<string key="superclassName">NSView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/BWGradientBox.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">BWSplitView</string>
-					<string key="superclassName">NSSplitView</string>
-					<object class="NSMutableDictionary" key="actions">
-						<string key="NS.key.0">toggleCollapse:</string>
-						<string key="NS.object.0">id</string>
-					</object>
-					<object class="NSMutableDictionary" key="actionInfosByName">
-						<string key="NS.key.0">toggleCollapse:</string>
-						<object class="IBActionInfo" key="NS.object.0">
-							<string key="name">toggleCollapse:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/BWSplitView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">IconTextCell</string>
-					<string key="superclassName">NSTextFieldCell</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/IconTextCell.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">RepoController</string>
-					<string key="superclassName">NSWindowController</string>
-					<dictionary class="NSMutableDictionary" key="actions">
-						<string key="addRemove:">id</string>
-						<string key="addToRepository:">id</string>
-						<string key="beginPushSheetFilePicker:">id</string>
-						<string key="chooseRevisionFromPopUp:">id</string>
-						<string key="commitAllChanges:">id</string>
-						<string key="commitChanges:">id</string>
-						<string key="discardChanges:">id</string>
-						<string key="endCommitSheet:">id</string>
-						<string key="fileTableAction:">id</string>
-						<string key="infoChooserChanged:">id</string>
-						<string key="markResolved:">id</string>
-						<string key="merge:">id</string>
-						<string key="openInTerminal:">id</string>
-						<string key="openSelectedFile:">id</string>
-						<string key="openSelectedFileInWindow:">id</string>
-						<string key="pushPullRevisions:">id</string>
-						<string key="refreshStatus:">id</string>
-						<string key="remergeFiles:">id</string>
-						<string key="removeFromRepository:">id</string>
-						<string key="revealInFinder:">id</string>
-						<string key="revisionTableAction:">id</string>
-						<string key="showComparison:">id</string>
-						<string key="showDiff:">id</string>
-						<string key="showRevision:">id</string>
-						<string key="stopProgress:">id</string>
-						<string key="toggleShowsOnlyUncleanFiles:">id</string>
-						<string key="updateToLatest:">id</string>
-						<string key="updateToSelectedRevision:">id</string>
-						<string key="viewModeSelectorChanged:">id</string>
-					</dictionary>
-					<dictionary class="NSMutableDictionary" key="actionInfosByName">
-						<object class="IBActionInfo" key="addRemove:">
-							<string key="name">addRemove:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="addToRepository:">
-							<string key="name">addToRepository:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="beginPushSheetFilePicker:">
-							<string key="name">beginPushSheetFilePicker:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="chooseRevisionFromPopUp:">
-							<string key="name">chooseRevisionFromPopUp:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="commitAllChanges:">
-							<string key="name">commitAllChanges:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="commitChanges:">
-							<string key="name">commitChanges:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="discardChanges:">
-							<string key="name">discardChanges:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="endCommitSheet:">
-							<string key="name">endCommitSheet:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="fileTableAction:">
-							<string key="name">fileTableAction:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="infoChooserChanged:">
-							<string key="name">infoChooserChanged:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="markResolved:">
-							<string key="name">markResolved:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="merge:">
-							<string key="name">merge:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="openInTerminal:">
-							<string key="name">openInTerminal:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="openSelectedFile:">
-							<string key="name">openSelectedFile:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="openSelectedFileInWindow:">
-							<string key="name">openSelectedFileInWindow:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="pushPullRevisions:">
-							<string key="name">pushPullRevisions:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="refreshStatus:">
-							<string key="name">refreshStatus:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="remergeFiles:">
-							<string key="name">remergeFiles:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="removeFromRepository:">
-							<string key="name">removeFromRepository:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="revealInFinder:">
-							<string key="name">revealInFinder:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="revisionTableAction:">
-							<string key="name">revisionTableAction:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="showComparison:">
-							<string key="name">showComparison:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="showDiff:">
-							<string key="name">showDiff:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="showRevision:">
-							<string key="name">showRevision:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="stopProgress:">
-							<string key="name">stopProgress:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="toggleShowsOnlyUncleanFiles:">
-							<string key="name">toggleShowsOnlyUncleanFiles:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="updateToLatest:">
-							<string key="name">updateToLatest:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="updateToSelectedRevision:">
-							<string key="name">updateToSelectedRevision:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="viewModeSelectorChanged:">
-							<string key="name">viewModeSelectorChanged:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-					</dictionary>
-					<dictionary class="NSMutableDictionary" key="outlets">
-						<string key="_commitButton">NSButton</string>
-						<string key="_commitMessageField">NSTextView</string>
-						<string key="_commitSheet">NSPanel</string>
-						<string key="_hideShowUnmodifiedToolbarItem">NSSegmentedControl</string>
-						<string key="_infoChooser">NSSegmentedControl</string>
-						<string key="_infoImageView">NSImageView</string>
-						<string key="_infoView">NSTextView</string>
-						<string key="_outline">NSOutlineView</string>
-						<string key="_progressIndicator">NSProgressIndicator</string>
-						<string key="_progressMessageField">NSTextField</string>
-						<string key="_progressOutputField">NSTextField</string>
-						<string key="_progressSheet">NSPanel</string>
-						<string key="_progressStopButton">NSButton</string>
-						<string key="_pullUpdateCheckbox">NSButton</string>
-						<string key="_pushButton">NSButton</string>
-						<string key="_pushDescriptionField">NSTextField</string>
-						<string key="_pushSheet">NSPanel</string>
-						<string key="_pushURLField">NSComboBox</string>
-						<string key="_revisionTable">NSTableView</string>
-						<string key="_revisions">NSArrayController</string>
-						<string key="_tree">NSTreeController</string>
-						<string key="_viewModeButton">NSButton</string>
-					</dictionary>
-					<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
-						<object class="IBToOneOutletInfo" key="_commitButton">
-							<string key="name">_commitButton</string>
-							<string key="candidateClassName">NSButton</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_commitMessageField">
-							<string key="name">_commitMessageField</string>
-							<string key="candidateClassName">NSTextView</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_commitSheet">
-							<string key="name">_commitSheet</string>
-							<string key="candidateClassName">NSPanel</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_hideShowUnmodifiedToolbarItem">
-							<string key="name">_hideShowUnmodifiedToolbarItem</string>
-							<string key="candidateClassName">NSSegmentedControl</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_infoChooser">
-							<string key="name">_infoChooser</string>
-							<string key="candidateClassName">NSSegmentedControl</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_infoImageView">
-							<string key="name">_infoImageView</string>
-							<string key="candidateClassName">NSImageView</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_infoView">
-							<string key="name">_infoView</string>
-							<string key="candidateClassName">NSTextView</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_outline">
-							<string key="name">_outline</string>
-							<string key="candidateClassName">NSOutlineView</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_progressIndicator">
-							<string key="name">_progressIndicator</string>
-							<string key="candidateClassName">NSProgressIndicator</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_progressMessageField">
-							<string key="name">_progressMessageField</string>
-							<string key="candidateClassName">NSTextField</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_progressOutputField">
-							<string key="name">_progressOutputField</string>
-							<string key="candidateClassName">NSTextField</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_progressSheet">
-							<string key="name">_progressSheet</string>
-							<string key="candidateClassName">NSPanel</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_progressStopButton">
-							<string key="name">_progressStopButton</string>
-							<string key="candidateClassName">NSButton</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_pullUpdateCheckbox">
-							<string key="name">_pullUpdateCheckbox</string>
-							<string key="candidateClassName">NSButton</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_pushButton">
-							<string key="name">_pushButton</string>
-							<string key="candidateClassName">NSButton</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_pushDescriptionField">
-							<string key="name">_pushDescriptionField</string>
-							<string key="candidateClassName">NSTextField</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_pushSheet">
-							<string key="name">_pushSheet</string>
-							<string key="candidateClassName">NSPanel</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_pushURLField">
-							<string key="name">_pushURLField</string>
-							<string key="candidateClassName">NSComboBox</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_revisionTable">
-							<string key="name">_revisionTable</string>
-							<string key="candidateClassName">NSTableView</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_revisions">
-							<string key="name">_revisions</string>
-							<string key="candidateClassName">NSArrayController</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_tree">
-							<string key="name">_tree</string>
-							<string key="candidateClassName">NSTreeController</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="_viewModeButton">
-							<string key="name">_viewModeButton</string>
-							<string key="candidateClassName">NSButton</string>
-						</object>
-					</dictionary>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/RepoController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">RevisionGraphCell</string>
-					<string key="superclassName">NSImageCell</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/RevisionGraphCell.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">URLFormatter</string>
-					<string key="superclassName">NSFormatter</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/URLFormatter.h</string>
-					</object>
-				</object>
-			</array>
-		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes"/>
 		<int key="IBDocument.localizationMode">0</int>
 		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
 English.lproj/FileViewer.xib=1136b09c58fea5c87da69e2a1fdc7007
 English.lproj/MainMenu.xib=481b5b20475f1aedcf89bfc408754937
 English.lproj/Projects.xib=770fab372e314ce3a66f4c501d11d8ee
-English.lproj/Repo.xib=d11712d876088330484b449092d0f5c9
+English.lproj/Repo.xib=23cf5a0d53532aa46d32e0e762fff273
 French.lproj/FileViewer.strings=3180f066f393da424f8f32f60384cedf
 French.lproj/MainMenu.strings=d54b312e76454c8742206c78acb4a7e8
 French.lproj/Projects.strings=7f3632a7668f39432d8dbf4ffb770f55

Resources/Info.plist

 	<string>????</string>
 	<key>CFBundleVersion</key>
 	<string>0.8.4</string>
+	<key>LSApplicationCategoryType</key>
+	<string>public.app-category.developer-tools</string>
 	<key>NSHumanReadableCopyright</key>
 	<string>© Jens Alfke, 2008-2010</string>
 	<key>NSMainNibFile</key>

Source/HgRevision.h

 - (NSString*) compareFile: (HgFile*)file withRevisionNumber: (NSInteger)otherRev error: (NSError**)outError;
 - (NSString*) annotateFile: (HgFile*)file error: (NSError**)outError;
 
+- (NSString *) fetchBranch;
 - (NSArray*) outgoingRevisionsForRepository: (NSURL*)otherRepo;
 
 - (void) dumpTo: (NSMutableString*)dump;

Source/HgRevision.m

 
 - (NSString*) branch {
     if (!_date) [self _getDetails];
-    return _branch;
+    return _branch ? _branch : @"default";
+}
+
+- (NSString *) fetchBranch
+{
+    // always fetches branch from hg directly
+    HgOperation *op = [[HgOperation alloc] initWithDirectory:_repository.absolutePath command:@"branch", nil];
+    [op run];
+    NSString *branch = [[op output] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
+    [op release];
+    
+    return branch;
 }
 
 - (void) setBranch: (NSString*)branch {
     NSMutableAttributedString *desc = [sTemplate mutableCopy];
     replace(desc, @"DESCRIPTION",(_comment ?: @""));
     replaceAndLink(desc, @"AUTHOR",     self.author, email, self.email);
-    replace(desc, @"BRANCH",       self.branch ? self.branch : @"default");
+    replace(desc, @"BRANCH",       self.branch);
     replace(desc, @"DATE",       self.formattedDate);
     replace(desc, @"IDENTIFIER", self.identifierString);
     replace(desc, @"LOCAL",      _localNumber !=NSNotFound ?$sprintf(@"%i",_localNumber): nil);

Source/RepoController.h

     IBOutlet NSImageView *_infoImageView;
     
     IBOutlet NSPanel *_commitSheet;
+    IBOutlet NSTextField *_commitBranchField;
     IBOutlet NSTextView *_commitMessageField;
     IBOutlet NSButton *_commitButton;
     

Source/RepoController.m

         HgDir *root = _repo.uncommittedRevision.root;
         if (root.status != kClean)
             statusIcon = root.statusImage;
+        title = [NSString stringWithFormat: NSLocalizedString(@"%@ (branch: %@)", 
+                                                              @"Repository window title format (uncommitted)"),
+                 title, [_repo.uncommittedRevision fetchBranch]];
+        // TODO: Would be more elegant to rely on rev.branch here
     }
     
     self.window.title = title;

Source/RepoController_Actions.m

 - (void) _endCommitWarnSheet: (NSPanel*)sheet resultCode: (NSInteger)result context: (NSArray*)files
 {
     [sheet orderOut: self];
+    
+    // to which branch will we commit? Always fetch branch name here to be sure to be accurate
+    NSString *branch = [_repo.uncommittedRevision fetchBranch];
+    NSString *plainString = [NSString stringWithFormat:NSLocalizedString(@"Committing to branch %@", @"Branch name field"), branch];
+    NSMutableAttributedString *attrBranch = [[NSMutableAttributedString alloc] initWithString:plainString];
+    [attrBranch addAttribute:NSFontAttributeName
+                       value:[NSFont boldSystemFontOfSize:13.f]
+                       range:NSMakeRange([plainString length] - [branch length], [branch length])];
+    
+    [_commitBranchField setAttributedStringValue:attrBranch];
+    [attrBranch release];
+    
+    // show the sheet
     if( result == NSOKButton )
         [NSApp beginSheet: _commitSheet
            modalForWindow: self.window
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.