# eric7.Plugins.VcsPlugins.vcsMercurial.ProjectBrowserHelper

Module implementing the VCS project browser helper for Mercurial.

### Global Attributes

None

### Classes

HgProjectBrowserHelper | Class implementing the VCS project browser helper for Mercurial.

### Functions

None

## HgProjectBrowserHelper

Class implementing the VCS project browser helper for Mercurial.

### Derived from

VcsProjectBrowserHelper

### Class Attributes

None

### Class Methods

None

### Methods

HgProjectBrowserHelper | Constructor
__HgAnnotate | Private slot called by the context menu to show the annotations of a file.
__HgConfigure | Private method to open the configuration dialog.
__HgCopy | Private slot called by the context menu to copy the selected file.
__HgExtendedDiff | Private slot called by the context menu to show the difference of a file to the repository.
__HgForget | Private slot called by the context menu to remove the selected file from the Mercurial repository leaving a copy in the project directory.
__HgMove | Private slot called by the context menu to move the selected file.
__HgReMerge | Private slot called by the context menu to re-merge a file.
__HgResolved | Private slot called by the context menu to mark conflicts of a file as being resolved.
__HgRevert | Private slot called by the context menu to revert changes made.
__HgSbsDiff | Private slot called by the context menu to show the difference of a file to the repository side-by-side.
__HgSbsExtendedDiff | Private slot called by the context menu to show the difference of a file to the repository side-by-side.
__HgUnresolved | Private slot called by the context menu to mark conflicts of a file as being unresolved.
__addExtensionsMenu | Private method to add an extension menu entry.
__showExtensionMenu | Private slot showing the extensions menu.
_addVCSMenu | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuBack | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuDir | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuDirMulti | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuMulti | Protected method used to add the VCS menu for multi selection to all project browsers.
showContextMenu | Public slot called before the context menu is shown.
showContextMenuDir | Public slot called before the context menu is shown.
showContextMenuDirMulti | Public slot called before the context menu is shown.
showContextMenuMulti | Public slot called before the context menu (multiple selections) is shown.

### Static Methods

None

#### HgProjectBrowserHelper (Constructor)

HgProjectBrowserHelper(vcsObject, browserObject, projectObject, isTranslationsBrowser, parent=None, name=None, )

Constructor

vcsObject
  reference to the vcs object
browserObject
  reference to the project browser object
projectObject
  reference to the project object
isTranslationsBrowser
  flag indicating, the helper is requested for the translations browser (this needs some special treatment)
parent
  parent widget (QWidget)
name
  name of this object (string)

#### HgProjectBrowserHelper.__HgAnnotate

__HgAnnotate()

Private slot called by the context menu to show the annotations of a file.

#### HgProjectBrowserHelper.__HgConfigure

__HgConfigure()

Private method to open the configuration dialog.

#### HgProjectBrowserHelper.__HgCopy

__HgCopy()

Private slot called by the context menu to copy the selected file.

#### HgProjectBrowserHelper.__HgExtendedDiff

__HgExtendedDiff()

Private slot called by the context menu to show the difference of a file to the repository.

This gives the chance to enter the revisions to compare.

#### HgProjectBrowserHelper.__HgForget

__HgForget()

Private slot called by the context menu to remove the selected file from the Mercurial repository leaving a copy in the project directory.

#### HgProjectBrowserHelper.__HgMove

__HgMove()

Private slot called by the context menu to move the selected file.

#### HgProjectBrowserHelper.__HgReMerge

__HgReMerge()

Private slot called by the context menu to re-merge a file.

#### HgProjectBrowserHelper.__HgResolved

__HgResolved()

Private slot called by the context menu to mark conflicts of a file as being resolved.

#### HgProjectBrowserHelper.__HgRevert

__HgRevert()

Private slot called by the context menu to revert changes made.

#### HgProjectBrowserHelper.__HgSbsDiff

__HgSbsDiff()

Private slot called by the context menu to show the difference of a file to the repository side-by-side.

#### HgProjectBrowserHelper.__HgSbsExtendedDiff

__HgSbsExtendedDiff()

Private slot called by the context menu to show the difference of a file to the repository side-by-side.

It allows the selection of revisions to compare.

#### HgProjectBrowserHelper.__HgUnresolved

__HgUnresolved()

Private slot called by the context menu to mark conflicts of a file as being unresolved.

#### HgProjectBrowserHelper.__addExtensionsMenu

__addExtensionsMenu(menu, key)

Private method to add an extension menu entry.

menu
  menu to add it to (QMenu)
key
  menu key (string, one of 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' or 'dirMultiMenu')

Return:
  reference to the menu action (QAction)

#### HgProjectBrowserHelper.__showExtensionMenu

__showExtensionMenu(key, controlled)

Private slot showing the extensions menu.

key
  menu key (string, one of 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' or 'dirMultiMenu')
controlled
  flag indicating to show the menu for a version controlled entry or a non-version controlled entry (boolean)

#### HgProjectBrowserHelper._addVCSMenu

_addVCSMenu(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu
  reference to the menu to be amended

#### HgProjectBrowserHelper._addVCSMenuBack

_addVCSMenuBack(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu
  reference to the menu to be amended

#### HgProjectBrowserHelper._addVCSMenuDir

_addVCSMenuDir(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu
  reference to the menu to be amended

#### HgProjectBrowserHelper._addVCSMenuDirMulti

_addVCSMenuDirMulti(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu
  reference to the menu to be amended

#### HgProjectBrowserHelper._addVCSMenuMulti

_addVCSMenuMulti(mainMenu)

Protected method used to add the VCS menu for multi selection to all project browsers.

mainMenu
  reference to the menu to be amended

#### HgProjectBrowserHelper.showContextMenu

showContextMenu(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the file status.

menu
  reference to the menu to be shown
standardItems
  array of standard items that need activation/deactivation depending on the overall VCS status

#### HgProjectBrowserHelper.showContextMenuDir

showContextMenuDir(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

menu
  reference to the menu to be shown
standardItems
  array of standard items that need activation/deactivation depending on the overall VCS status

#### HgProjectBrowserHelper.showContextMenuDirMulti

showContextMenuDirMulti(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

menu
  reference to the menu to be shown
standardItems
  array of standard items that need activation/deactivation depending on the overall VCS status

#### HgProjectBrowserHelper.showContextMenuMulti

showContextMenuMulti(menu, standardItems)

Public slot called before the context menu (multiple selections) is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the files status.

menu
  reference to the menu to be shown
standardItems
  array of standard items that need activation/deactivation depending on the overall VCS status

Up