# eric7.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.queues

Module implementing the queues extension interface.

### Global Attributes

None

### Classes

Queues | Class implementing the queues extension interface.

### Functions

None

## Queues

Class implementing the queues extension interface.

### Derived from

HgExtension

### Class Attributes

APPLIED_LIST
GOTO
POP
PUSH
QUEUE_ACTIVATE
QUEUE_DELETE
QUEUE_PURGE
SERIES_LIST
UNAPPLIED_LIST

### Class Methods

None

### Methods

Queues | Constructor
__getCommitMessage | Private method to get the commit message of the current patch.
__getCurrentPatch | Private method to get the name of the current patch.
__getPatchesList | Private method to get a list of patches of a given type.
getGuardsList | Public method to get a list of all guards defined.
hgQueueCreateRenameQueue | Public method to create a new queue or rename the active queue.
hgQueueDeletePatch | Public method to delete a selected unapplied patch.
hgQueueDeletePurgeActivateQueue | Public method to delete the reference to a queue and optionally remove the patch directory or set the active queue.
hgQueueFinishAppliedPatches | Public method to finish all applied patches.
hgQueueFoldUnappliedPatches | Public method to fold patches into the current patch.
hgQueueGuardsDeactivate | Public method to deactivate all active guards.
hgQueueGuardsDefine | Public method to define guards for the current or a named patch.
hgQueueGuardsDropAll | Public method to drop all guards of the current or a named patch.
hgQueueGuardsIdentifyActive | Public method to list all active guards.
hgQueueGuardsList | Public method to list the guards for the current or a named patch.
hgQueueGuardsListAll | Public method to list all guards of all patches.
hgQueueGuardsSetActive | Public method to set the active guards.
hgQueueInit | Public method to initialize a new queue repository.
hgQueueListPatches | Public method to show a list of all patches.
hgQueueListQueues | Public method to list available queues.
hgQueueNewPatch | Public method to create a new named patch.
hgQueuePushPopPatches | Public method to push patches onto the stack or pop patches off the stack.
hgQueueRefreshPatch | Public method to refresh the current patch.
hgQueueRenamePatch | Public method to rename the current or a selected patch.
hgQueueShowHeader | Public method to show the commit message of the current patch.
hgQueueShowPatch | Public method to show the contents of the current patch.
hgQueueStatus | Public method used to view the status of a queue repository.
shutdown | Public method used to shutdown the queues interface.

### Static Methods

None

#### Queues (Constructor)

Queues(vcs)

Constructor

vcs
  reference to the Mercurial vcs object

#### Queues.__getCommitMessage

__getCommitMessage()

Private method to get the commit message of the current patch.

Return:
  name of the current patch (string)

#### Queues.__getCurrentPatch

__getCurrentPatch()

Private method to get the name of the current patch.

Return:
  name of the current patch (string)

#### Queues.__getPatchesList

__getPatchesList(listType, withSummary=False)

Private method to get a list of patches of a given type.

listType
  type of patches list to get (Queues.APPLIED_LIST, Queues.UNAPPLIED_LIST, Queues.SERIES_LIST)
withSummary
  flag indicating to get a summary as well (boolean)

Return:
  list of patches (list of string)

Raises ValueError:
  raised to indicate an invalid patch list type

#### Queues.getGuardsList

getGuardsList(allGuards=True)

Public method to get a list of all guards defined.

allGuards
  flag indicating to get all guards (boolean)

Return:
  sorted list of guards (list of strings)

#### Queues.hgQueueCreateRenameQueue

hgQueueCreateRenameQueue(isCreate)

Public method to create a new queue or rename the active queue.

isCreate
  flag indicating to create a new queue (boolean)

#### Queues.hgQueueDeletePatch

hgQueueDeletePatch()

Public method to delete a selected unapplied patch.

#### Queues.hgQueueDeletePurgeActivateQueue

hgQueueDeletePurgeActivateQueue(operation)

Public method to delete the reference to a queue and optionally remove the patch directory or set the active queue.

operation
  operation to be performed (Queues.QUEUE_DELETE, Queues.QUEUE_PURGE, Queues.QUEUE_ACTIVATE)

Raises ValueError:
  raised to indicate an invalid operation

#### Queues.hgQueueFinishAppliedPatches

hgQueueFinishAppliedPatches()

Public method to finish all applied patches.

#### Queues.hgQueueFoldUnappliedPatches

hgQueueFoldUnappliedPatches()

Public method to fold patches into the current patch.

#### Queues.hgQueueGuardsDeactivate

hgQueueGuardsDeactivate()

Public method to deactivate all active guards.

#### Queues.hgQueueGuardsDefine

hgQueueGuardsDefine()

Public method to define guards for the current or a named patch.

#### Queues.hgQueueGuardsDropAll

hgQueueGuardsDropAll()

Public method to drop all guards of the current or a named patch.

#### Queues.hgQueueGuardsIdentifyActive

hgQueueGuardsIdentifyActive()

Public method to list all active guards.

#### Queues.hgQueueGuardsList

hgQueueGuardsList()

Public method to list the guards for the current or a named patch.

#### Queues.hgQueueGuardsListAll

hgQueueGuardsListAll()

Public method to list all guards of all patches.

#### Queues.hgQueueGuardsSetActive

hgQueueGuardsSetActive()

Public method to set the active guards.

#### Queues.hgQueueInit

hgQueueInit(name)

Public method to initialize a new queue repository.

name
  directory name (string)

#### Queues.hgQueueListPatches

hgQueueListPatches()

Public method to show a list of all patches.

#### Queues.hgQueueListQueues

hgQueueListQueues()

Public method to list available queues.

#### Queues.hgQueueNewPatch

hgQueueNewPatch()

Public method to create a new named patch.

#### Queues.hgQueuePushPopPatches

hgQueuePushPopPatches(operation, doAll=False, named=False, force=False)

Public method to push patches onto the stack or pop patches off the stack.

operation
  operation type to be performed (Queues.POP, Queues.PUSH, Queues.GOTO)
doAll
  flag indicating to push/pop all (boolean)
named
  flag indicating to push/pop until a named patch is at the top of the stack (boolean)
force
  flag indicating a forceful pop (boolean)

Return:
  flag indicating that the project should be reread (boolean)

Raises ValueError:
  raised to indicate an invalid operation

#### Queues.hgQueueRefreshPatch

hgQueueRefreshPatch(editMessage=False)

Public method to refresh the current patch.

editMessage
  flag indicating to edit the current commit message (boolean)

#### Queues.hgQueueRenamePatch

hgQueueRenamePatch()

Public method to rename the current or a selected patch.

#### Queues.hgQueueShowHeader

hgQueueShowHeader()

Public method to show the commit message of the current patch.

#### Queues.hgQueueShowPatch

hgQueueShowPatch(name)

Public method to show the contents of the current patch.

name
  file/directory name (string)

#### Queues.hgQueueStatus

hgQueueStatus(name)

Public method used to view the status of a queue repository.

name
  directory name (string)

#### Queues.shutdown

shutdown()

Public method used to shutdown the queues interface.

Up