Show: Object Pascal C++
Display Preferences

Commit (Mercurial)

From Appmethod Topics
Jump to: navigation, search

Go Up to Project Manager


View > Project Manager | right-click a file or a project under Mercurial version control | Mercurial > Commit

Code Editor | right-click a file under Mercurial version control | Version Control > Mercurial > Commit


Commit is a version control operation that sends the changes in the working files to the local repository.

When you select the Commit command, the first thing that happens is File > Save All. Then the Commit pane is displayed in the Code Editor window. The Commit pane is composed of two sections. The upper section lists all the files you can select to commit (unchanged files are not listed). The lower section is an entry field for your comments. To select a file to commit, select the check box in front of the file name. If the check box in front of a file is not selected, the file is ignored.

Item Description

Commit to: Location

Displays information about the files to be committed and their location in the system, including:

  • Name
  • Path
  • Ext (extension, such as .pas or .cpp)
  • Status (Modified, Added or Unversioned)

If you right-click a file in the Commit to: Location field, you can select from the following context menu commands:

Difference

Performs a diff (comparison) between the selected local working file and the repository version of the file.

Revert

Reverts the most recent change in the selected file.

Add

(Only shown if the file is unversioned) Adds the file to the commit.

Comment

Here you can write a comment for the Mercurial log (for example, the task ID or the changes that were made to the committed files).

Show unversioned files

Allows you to see or hide files that are not under version control but exist in the Commit to: Location. Right-click an unversioned file and select Add to add the file to version control.

Check or uncheck all

Checks or unchecks all the files to be committed.

Recent Comments

Shows all the comments saved with the committed files, and all comments that have been entered for commits but abandoned rather than saved.

Commit

Commits the selected files, saving them to the repository.


Push Your Changes to the Remote Mercurial Repository

To push your local changes from your local repository to the remote repository, you need to do it outside the IDE.

To push your local changes to a remote repository:

  1. Open the command-line tool.
  2. Navigate to the local folder for your repository.
  3. Type the following command:
    hg push
    hg push [URL]
  4. If it needs authentication, insert a user name and a password.

See Also

Personal tools
In other languages