Commits

Anonymous committed 3b59093

Menu item for addremove

Comments (0)

Files changed (5)

English.lproj/MainMenu.xib

 		<string key="IBDocument.HIToolboxVersion">353.00</string>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<integer value="106"/>
+			<integer value="300"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
 									<reference key="NSOnImage" ref="664567982"/>
 									<reference key="NSMixedImage" ref="578101116"/>
 								</object>
+								<object class="NSMenuItem" id="210479146">
+									<reference key="NSMenu" ref="502084290"/>
+									<string type="base64-UTF8" key="NSTitle">QWRkICYgUmVtb3ZlA</string>
+									<string key="NSKeyEquiv"/>
+									<int key="NSMnemonicLoc">2147483647</int>
+									<reference key="NSOnImage" ref="664567982"/>
+									<reference key="NSMixedImage" ref="578101116"/>
+								</object>
 								<object class="NSMenuItem" id="408059504">
 									<reference key="NSMenu" ref="502084290"/>
 									<string key="NSTitle">Add File To Repository</string>
 					</object>
 					<int key="connectionID">529</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBActionConnection" key="connection">
+						<string key="label">addRemove:</string>
+						<reference key="source" ref="1014"/>
+						<reference key="destination" ref="210479146"/>
+					</object>
+					<int key="connectionID">531</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
 							<reference ref="154748241"/>
 							<reference ref="483571193"/>
 							<reference ref="649192194"/>
+							<reference ref="210479146"/>
 						</object>
 						<reference key="parent" ref="626404410"/>
 					</object>
 						<reference key="object" ref="144478632"/>
 						<reference key="parent" ref="374024848"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">530</int>
+						<reference key="object" ref="210479146"/>
+						<reference key="parent" ref="502084290"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
 					<string>523.IBPluginDependency</string>
 					<string>527.IBPluginDependency</string>
 					<string>528.IBPluginDependency</string>
+					<string>530.IBPluginDependency</string>
 					<string>56.IBPluginDependency</string>
 					<string>56.ImportedFromIB2</string>
 					<string>57.IBEditorWindowLastContentRect</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-					<string>{{239, 671}, {296, 143}}</string>
+					<string>{{239, 651}, {296, 163}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>{{233, 693}, {296, 143}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 					<reference ref="9"/>
 					<string>{{89, 631}, {186, 183}}</string>
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">529</int>
+			<int key="maxID">531</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
 					<string key="className">NSWindow</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
 						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../MYUtilities/MYWindowUtils.h</string>
+						<string key="minorKey">../myutilities/MYWindowUtils.h</string>
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
 						<bool key="EncodedWithXMLCoder">YES</bool>
 						<object class="NSMutableArray" key="dict.sortedKeys">
 							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>addRemove:</string>
 							<string>addToRepository:</string>
 							<string>beginPushSheetFilePicker:</string>
 							<string>chooseRevisionFromPopUp:</string>
 							<string>id</string>
 							<string>id</string>
 							<string>id</string>
+							<string>id</string>
 						</object>
 					</object>
 					<object class="NSMutableDictionary" key="outlets">

Source/HgUncommittedRevision.h

 
 - (BOOL) updatePaths: (NSSet*)paths error: (NSError**)outError;
 
+- (BOOL) addRemoveWithError:(NSError**)outError;
 - (BOOL) addFiles: (NSArray*)files error: (NSError**)outError;
 - (BOOL) removeFiles: (NSArray*)files error: (NSError**)outError;
 - (BOOL) revertFiles: (NSArray*)files

Source/HgUncommittedRevision.m

     return result && [self updateStatus: _root error: outError];
 }
 
+- (BOOL) addRemoveWithError: (NSError**)outError
+{
+    return [self applyCommand:@"addremove" arguments:nil toFiles:nil error:outError];
+}
 
 - (BOOL) addFiles: (NSArray*)files error: (NSError**)outError
 {

Source/RepoController.h

 - (IBAction) showDiff: (id)sender;
 - (IBAction) showComparison: (id)sender;
 
+- (IBAction) addRemove: (id)sender;
 - (IBAction) addToRepository: (id)sender;
 - (IBAction) removeFromRepository: (id)sender;
 - (IBAction) discardChanges: (id)sender;

Source/RepoController_Actions.m

     return nil;
 }
 
+- (void) addRemove: (id)sender
+{
+    NSError *error = nil;
+    if (! [_repo.uncommittedRevision addRemoveWithError: &error]) {
+        [self presentError: error];
+    }
+}
 
 - (void) addToRepository: (id)sender
 {