Mercurial: Committing Changes to the Repository
See Also
Once your working copies of version-controlled files have been edited,
you can then place changes into the repository using the Mercurial
Commit action. If you have an issue tracker set up with
your repository, the commit dialog box lets you associate your commit
action with an existing issue.
- Mercurial versioned files and folders must be recognized by the IDE
as such in order to call Mercurial actions on them. To do so, you
must first clone sources from an
external repository or place the project
under Mercurial control.
To commit changes in local files to the repository:
- Select a version-controlled file or folder (e.g. from the Projects,
Files, or Favorites window) and choose Mercurial > Commit from
the right-click menu. The Commit Dialog opens, listing all files that
contain local changes. If the files you want to commit do not already
exist in the repository, the commit action will add them.
- Enter a commit message in the Commit Message text area, indicating the
purpose of the commit.
- Click the Recent Messages icon (
) in the upper right corner of the
dialog to view recent commit messages.
- Click Commit. The IDE executes the commit and sends your local changes to
the repository. You can also view files being commited to the
repository from the Output window (Ctrl-4).
- When working in the Commit dialog, you can exclude individual files from a
commit. To do so, click on the Commit Action column for the specific file
and choose Exclude from Commit. The file name responds by displaying in
strike-through text.
Updating Issues
You can update an issue by associating your commit action with an existing issue
in your repository's issue tracker. To do so, click on the Update Issue
heading in the Commit dialog box to expand it, then specify the following:
- Issue Tracker: Specify the issue tracker that your repository
uses, by selecting an issue tracker from the drop-down list. The drop-down
provides you with a list of all issue trackers registered with the IDE. If
your repository's issue tracker is not registered, click the New
button to register it.
- Issue: Specify the issue ID. You can do this by typing in
the ID, or part of the description.
You can also specify the following options:
- Resolve as FIXED: When selected, the status of the issue is marked as Resolved.
- Add Commit Message from Above: When selected, the commit message
is added to the issue.
- Add Revision Information to the Issue: When selected, the issue is updated
to include the revision information such as the author, date, etc.
You can click Change Format to modify the format of the revision information
that is added to the issue.
- Add Issue Information to Commit Message: When selected, the issue ID and summary
are added to the commit message.
You can click Change Format to modify the format of the issue information
that is added to the message.
- After Commit: When selected, the issue is updated after you commit the changes.
- After Push: When selected, the issue is updated only after the changes are pushed to the repository.
Ignoring Files
If your local working directory includes files or directories that you do not
want to place under version control, you can set the IDE to ignore them
permanantly using the Ignore command.
- You cannot employ the Ignore command on files that already exist in the
repository.
To ignore local files in your working directory:
- Select the file or directory you wish to ignore from the
Projects, Files, Favorites, or
Status window.
- Choose Ignore (or Mercurial > Ignore) from the right-click
menu of selected file or directory. The IDE ignores the file
or directory whenever Mercurial commands are called on it or
on the directory within which it is stored.
- To change the status of ignored files so that they can be acted upon in
Mercurial, select the specific file and choose Mercurial > Unignore.
- See Also
- Cloning an External Mercurial Repository
- Comparing File Revisions
- About Issue Trackers
- Adding an Issue Tracker
Legal Notices