MacHg icon

Action Menu

The Action menu is, in general, concerned with operations on the files in a chosen repository. (Operations on the repository as a whole are accessed via the Repository menu.)

MacHg provides a front end for many of the standard commands present in Mercurial's standard command set. Below is a list of the menu items in the Action menu, together with their corresponding Mercurial versions. Also, with each Action menu item there is a description of its availability and its corresponding operation.

 

Fundamental commands acting on files:

Menu Item
Operation

Commit Selected Files...

Mercurial command: commit

Available: when one or more files are selected in the Browser View, if at least one of these is marked as Modified, Added or Removed.

Operation: Performing this operation opens a commit sheet with all the Modified, Added and Removed files contained within the selection. After entering a suitable documentation message, you can then commit the selected files to the repository in a new changeset.

External Help: commit wiki, MDG: Writing a commit message

Diff Selected Files

Mercurial command: diff

Available: when one or more files marked Modified are selected in the Browser View.

Operation: For a particular selected Modified file, performing this operation displays a graphical difference between the current state of this file and the file as of the current revision of the repository. The FileMerge tool is used to display these changes.

External Help: diff wiki, MDG: Making and reviewing changes

AddRemove Selected Files

Mercurial command: addremove --similarity

Available: when one or more files are selected in the Browser View, if at least one of these is marked Untracked or Missing.

Operation: Marks all Untracked files in the selection as Added files, and marks all Missing files in the selection as Removed files. Moreover, the similarity option is used to try to detect when a file has simply had its name changed. You can set the similarity factor in the MacHg preferences under the Mercurial tab. By default, MacHg uses a factor of 95% similarity; but this can be changed in the preferences.

External Help: AddRemove can track renames, MDG: Adding and removing files in one step

Commands for reverting, adding, removing, and renaming files:

Menu Item
Operation

Revert Selected Files

Mercurial command: revert

Available: when one or more files are selected in the Browser View, if at least one of these is marked Modified, Added or Removed.

Operation: Performing this operation will restore all selected Modified, Added and Removed files to their state as of the current revision of the repository.

External Help: revert wiki, MDG: Missing files

Revert Selected Files to Version...

Mercurial command: revert --rev

Available: when at least one file is selected in the Browser View.

Operation: A sheet of the history of the repository will be displayed, from which you select the revision to revert the files to. All of the contents of the selected files will be replaced with the contents of the files as of the version you are reverting to. However, the overall repository revision will remain the same. After reverting the selected files to the chosen revision, you subsequently need to commit these reverted files to incorporate the changes into the repository.

External Help: revert wiki, MDG: Missing files

Delete Selected Files

Mercurial command: -

Available: when one or more files and/or folders are selected in the Browser View.

Operation: Moves all of the selected files and folders to the trash. If a file was being tracked, then after deleting it, it will appear as missing in the browser.

Add Selected Files

Mercurial command: add

Available: when one or more files are selected in the Browser View, if at least one of these is marked Untracked.

Operation: Performing this operation changes selected files marked Untracked to ones marked Added, hence files that you presumably want to add to the repository. (To actually add files marked Added to the repository so that the repository can track them, you subsequently need to commit them.)

External Help: MDG: Starting a new project and adding files

Untrack Selected Files

Mercurial command: forget

Available: when one or more tracked files are selected in the Browser View. A tracked file is any file other than an Untracked file.

Operation: Marks all the selected files as being Untracked files, hence no longer tracked by the repository. You subsequently need to commit these tracking removals to incorporate the changes into the repository.

Rename Selected File...

Mercurial command: rename

Available: when you select one or more tracked files in the Browser View. A tracked file is anything other than a file marked Untracked.

Operation: Opens a sheet where you can choose a new name for the file. Renaming allows Mercurial to track the history of the file across the rename, whereas simply removing the file and adding it again will loose this history tracking.

External Help: MDG: Renaming files

Commands involving the merging of files:

Menu Item
Operation

Remerge Selected Files

Mercurial command: resolve

Available: after selecting one or more files which have changed due to a merge but are still unresolved.

Operation: Cleanly retries unresolved file merges using file revisions preserved from the last update or merge.

External Help: MDG: File resolution states

Mark Resolved Selected Files

Mercurial command: resolve --mark

Available: after selecting one or more files which have changed due to a merge.

Operation: Marks the selected merged files as resolved.

External Help: MDG: File resolution states

Commands involving all files:

Menu Item
Operation

Commit All Files...

Mercurial command: commit

Available: when the repository contains at least one file marked Modified, Added or Removed.

Operation: Performing this operation opens a commit sheet with all the Modified, Added and Removed files contained in the repository. After entering a suitable documentation/commit message, you can then commit all these files to the repository in a new changeset.

External Help: commit wiki, MDG: Writing a commit message

Diff All Files

Mercurial command: diff

Available: when the repository contains at least one file marked Modified.

Operation: Performing this operation displays, for each chosen Modified file in the repository, a graphical difference between the current state of the file and the file as of the current revision of the repository. The FileMerge tool is used to display these changes.

External Help: diff wiki, MDG: Making and reviewing changes

Commands for miscellaneous file operations:

Menu Item
Operation

Ignore Selected Files

Mercurial concept: .hgignore

Available: when one or more files are selected in the Browser View, but none of these is marked Ignored.

Operation: Performing this operation adds the selected files to the .hgignore file at the root of the repository. Mercurial consults this file to determine which files to ignore and which to track.

External Help: MDG: Permanently ignoring unwanted files and directories

UnIgnore Selected Files

Mercurial concept: .hgignore

Available: when one or more files are selected in the Browser View and they are all marked Ignored.

Operation: Performing this operation removes the selected files from the .hgignore file at the root of the repository. Mercurial consults this file to determine which files to ignore and which to track.

External Help: MDG: Permanently ignoring unwanted files and directories

Annotate Selected Files

Mercurial command: annotate

Available: when one or more files are selected in the Browser View and none of them are marked Untracked.

Operation: Lists a selected file, and on each line of the file, notes the most recent revision in which that line changed and when it changed and who made the change.

Rollback Last Commit

Mercurial command: rollback

Available: once a commit has been made. Rollback applies only to the last change.

Operation: Performing this operation restores the repository to its state before the last commit. Rollback can only be used once, ie., you can't apply rollback twice to rollback two commits (this is a Mercurial limitation). To do more serious editing changes, see editing history

External Help: MDG: Rolling back a transaction, MDG: Rollback only once