Add files to a local Mercurial repository
After a Mercurial repository for a project is initialized, you need to add the project data to it:
If you have specified enabled Mercurial for your project, AppCode suggests to put each new file under Mercurial control during the file creation.
You can add all unversioned files to Mercurial control or select files to add.
Add all unversioned files to Mercurial
Open the Commit tool window ⌥ 0.
Right-click the Unversioned Files node and choose from the context menu.
Click Commit or press ⌃ K.
Add specific file(s) to Mercurial
Open the Commit tool window ⌥ 0.
Expand the Unversioned Files node, select the files to be added. From the context menu, choose .
Click Commit or press ⌃ K.
Specify the commit options
In AppCode, you can run pre-commit checks, upload files to a server after the commit, or commit with advanced options.
Open the Commit tool window ⌥ 0 and click .
Select the necessary options:
In the Before Commit area, select the actions you want AppCode to perform before committing the selected files to the local repository.
The following options are available:
Reformat code: perform code formatting according to the Project Code Style settings.
Rearrange code: rearrange your code according to the arrangement rules preferences.
Optimize imports: remove redundant import statements.
Analyze code: analyze modified files before committing them. Click Choose profile to select an inspection profile from which the IDE will run inspections.
Check TODO (<filter name>): Review the TODO items matching the specified filter. Click Configure to choose an existing TODO filter, or open the TODO settings page and define a new filter to be applied.
Cleanup: batch-apply quick-fixes from code cleanup inspections. Click Choose profile to select a profile from which the IDE will run inspections.
Run Tests: run tests as pre-commit checks. Click Choose configuration near Run Tests and select which configuration you want to run.
Update copyright: add or update a copyright notice according to the selected copyright profile - scope combination.