eric6.Plugins.VcsPlugins.vcsMercurial.HgLogBrowserDialog

Module implementing a dialog to browse the log history.

Global Attributes

COLORNAMES
COLORS

Classes

HgLogBrowserDialog Class implementing a dialog to browse the log history.

Functions

None


HgLogBrowserDialog

Class implementing a dialog to browse the log history.

Derived from

QWidget, Ui_HgLogBrowserDialog

Class Attributes

AuthorColumn
BookmarksColumn
BranchColumn
ClosedIndicator
DateColumn
IconColumn
LargefilesCacheL
LargefilesCacheW
MessageColumn
PathSeparatorRe
PhaseColumn
RevisionColumn
TagsColumn

Class Methods

None

Methods

HgLogBrowserDialog Constructor
__actionMode Private method to get the selected action mode.
__bookmarkActTriggered Private slot to bookmark the selected revision.
__bookmarkMoveActTriggered Private slot to move a bookmark to the selected revision.
__branchColor Private method to calculate a color for a given branch name.
__diffRevisions Private method to do a diff of two revisions.
__fetchActTriggered Private slot to fetch changes from a remote repository.
__filterLogs Private method to filter the log entries.
__findItem Private slot to find an item matching the entered criteria.
__finish Private slot called when the process finished or the user pressed the button.
__generateEdges Private method to generate edge info for the give data.
__generateFileItem Private method to generate a changed files tree entry.
__generateIcon Private method to generate an icon containing the revision tree for the given data.
__generateLogItem Private method to generate a log tree entry.
__getClosedBranches Private method to get the list of closed branches.
__getColor Private method to get the (rotating) name of the color given an index.
__getLogEntries Private method to retrieve log entries from the repository.
__getParents Private method to get the parents of the currently viewed file/directory.
__graftActTriggered Private slot to handle the Copy Changesets action.
__identifyProject Private method to determine the revision of the project directory.
__initActionsMenu Private method to initialize the actions menu.
__initData Private method to (re-)initialize some data.
__lfPullActTriggered Private slot to pull large files of selected revisions.
__modifyForLargeFiles Private method to convert the displayed file name for a large file.
__phaseActTriggered Private slot to handle the Change Phase action.
__prepareFieldSearch Private slot to prepare the filed search data.
__procFinished Private slot connected to the finished signal.
__processBuffer Private method to process the buffered output of the hg log command.
__pullActTriggered Private slot to pull changes from a remote repository.
__pushActTriggered Private slot to push changes to a remote repository up to a selected changeset.
__pushAllActTriggered Private slot to push all changes to a remote repository.
__readStderr Private slot to handle the readyReadStandardError signal.
__readStdout Private slot to handle the readyReadStandardOutput signal.
__resetUI Private method to reset the user interface.
__resizeColumnsFiles Private method to resize the changed files tree columns.
__resizeColumnsLog Private method to resize the log tree columns.
__resortFiles Private method to resort the changed files tree.
__showError Private slot to show some error.
__stripActTriggered Private slot to strip changesets from the repository.
__switchActTriggered Private slot to switch the working directory to the selected revision.
__tagActTriggered Private slot to tag the selected revision.
__updateDiffButtons Private slot to update the enabled status of the diff buttons.
__updateGui Private slot to update GUI elements except tool menu actions.
__updateToolMenuActions Private slot to update the status of the tool menu actions and the tool menu button.
closeEvent Protected slot implementing a close event handler.
col2x Local function to calculate a x-position for a column.
keyPressEvent Protected slot to handle a key press event.
on_branchCombo_activated Private slot called, when a new branch is selected.
on_buttonBox_clicked Private slot called by a button of the button box clicked.
on_diffP1Button_clicked Private slot to handle the Diff to Parent 1 button.
on_diffP2Button_clicked Private slot to handle the Diff to Parent 2 button.
on_diffRevisionsButton_clicked Private slot to handle the Compare Revisions button.
on_fieldCombo_activated Private slot called, when a new filter field is selected.
on_findNextButton_clicked Private slot to find the next item matching the entered criteria.
on_findPrevButton_clicked Private slot to find the previous item matching the entered criteria.
on_fromDate_dateChanged Private slot called, when the from date changes.
on_input_returnPressed Private slot to handle the press of the return key in the input field.
on_logTree_currentItemChanged Private slot called, when the current item of the log tree changes.
on_logTree_itemSelectionChanged Private slot called, when the selection has changed.
on_modeComboBox_currentIndexChanged Private slot to react on mode changes.
on_nextButton_clicked Private slot to handle the Next button.
on_passwordCheckBox_toggled Private slot to handle the password checkbox toggled.
on_refreshButton_clicked Private slot to refresh the log.
on_rxEdit_returnPressed Private slot handling a press of the Return key in the rxEdit input.
on_rxEdit_textChanged Private slot called, when a filter expression is entered.
on_sendButton_clicked Private slot to send the input to the mercurial process.
on_stopCheckBox_clicked Private slot called, when the stop on copy/move checkbox is clicked.
on_toDate_dateChanged Private slot called, when the from date changes.
show Public slot to show the dialog.
start Public slot to start the hg log command.

Static Methods

None

HgLogBrowserDialog (Constructor)

HgLogBrowserDialog(vcs, mode="log", parent=None)

Constructor

vcs
reference to the vcs object
mode
mode of the dialog (string; one of log, incoming, outgoing)
parent
parent widget (QWidget)

HgLogBrowserDialog.__actionMode

__actionMode()

Private method to get the selected action mode.

Returns:
selected action mode (string, one of filter or find)

HgLogBrowserDialog.__bookmarkActTriggered

__bookmarkActTriggered()

Private slot to bookmark the selected revision.

HgLogBrowserDialog.__bookmarkMoveActTriggered

__bookmarkMoveActTriggered()

Private slot to move a bookmark to the selected revision.

HgLogBrowserDialog.__branchColor

__branchColor(branchName)

Private method to calculate a color for a given branch name.

branchName
name of the branch (string)
Returns:
name of the color to use (string)

HgLogBrowserDialog.__diffRevisions

__diffRevisions(rev1, rev2)

Private method to do a diff of two revisions.

rev1
first revision number (integer)
rev2
second revision number (integer)

HgLogBrowserDialog.__fetchActTriggered

__fetchActTriggered()

Private slot to fetch changes from a remote repository.

HgLogBrowserDialog.__filterLogs

__filterLogs()

Private method to filter the log entries.

HgLogBrowserDialog.__findItem

__findItem(backwards=False, interactive=False)

Private slot to find an item matching the entered criteria.

backwards
flag indicating to search backwards (boolean)
interactive
flag indicating an interactive search (boolean)

HgLogBrowserDialog.__finish

__finish()

Private slot called when the process finished or the user pressed the button.

HgLogBrowserDialog.__generateEdges

__generateEdges(rev, parents)

Private method to generate edge info for the give data.

rev
revision to calculate edge info for (integer)
parents
list of parent revisions (list of integers)
Returns:
tuple containing the column and color index for the given node and a list of tuples indicating the edges between the given node and its parents (integer, integer, [(integer, integer, integer), ...])

HgLogBrowserDialog.__generateFileItem

__generateFileItem(action, path, copyfrom)

Private method to generate a changed files tree entry.

action
indicator for the change action ("A", "D" or "M")
path
path of the file in the repository (string)
copyfrom
path the file was copied from (string)
Returns:
reference to the generated item (QTreeWidgetItem)

HgLogBrowserDialog.__generateIcon

__generateIcon(column, color, bottomedges, topedges, dotColor, currentRev, closed)

Private method to generate an icon containing the revision tree for the given data.

column
column index of the revision (integer)
color
color of the node (integer)
bottomedges
list of edges for the bottom of the node (list of tuples of three integers)
topedges
list of edges for the top of the node (list of tuples of three integers)
dotColor
color to be used for the dot (QColor)
currentRev
flag indicating to draw the icon for the current revision (boolean)
closed
flag indicating to draw an icon for a closed branch (boolean)
Returns:
icon for the node (QIcon)

HgLogBrowserDialog.__generateLogItem

__generateLogItem(author, date, message, revision, changedPaths, parents, branches, tags, phase, bookmarks=None)

Private method to generate a log tree entry.

author
author info (string)
date
date info (string)
message
text of the log message (list of strings)
revision
revision info (string)
changedPaths
list of dictionary objects containing info about the changed files/directories
parents
list of parent revisions (list of integers)
branches
list of branches (list of strings)
tags
list of tags (string)
phase
phase of the entry (string)
bookmarks
list of bookmarks (string)
Returns:
reference to the generated item (QTreeWidgetItem)

HgLogBrowserDialog.__getClosedBranches

__getClosedBranches()

Private method to get the list of closed branches.

HgLogBrowserDialog.__getColor

__getColor(n)

Private method to get the (rotating) name of the color given an index.

n
color index (integer)
Returns:
color name (string)

HgLogBrowserDialog.__getLogEntries

__getLogEntries(startRev=None)

Private method to retrieve log entries from the repository.

startRev
revision number to start from (integer, string)

HgLogBrowserDialog.__getParents

__getParents(rev)

Private method to get the parents of the currently viewed file/directory.

rev
revision number to get parents for (string)
Returns:
list of parent revisions (list of integers)

HgLogBrowserDialog.__graftActTriggered

__graftActTriggered()

Private slot to handle the Copy Changesets action.

HgLogBrowserDialog.__identifyProject

__identifyProject()

Private method to determine the revision of the project directory.

HgLogBrowserDialog.__initActionsMenu

__initActionsMenu()

Private method to initialize the actions menu.

HgLogBrowserDialog.__initData

__initData()

Private method to (re-)initialize some data.

HgLogBrowserDialog.__lfPullActTriggered

__lfPullActTriggered()

Private slot to pull large files of selected revisions.

HgLogBrowserDialog.__modifyForLargeFiles

__modifyForLargeFiles(filename)

Private method to convert the displayed file name for a large file.

filename
file name to be processed (string)
Returns:
processed file name (string)

HgLogBrowserDialog.__phaseActTriggered

__phaseActTriggered()

Private slot to handle the Change Phase action.

HgLogBrowserDialog.__prepareFieldSearch

__prepareFieldSearch()

Private slot to prepare the filed search data.

Returns:
tuple of field index, search expression and flag indicating that the field index is a data role (integer, string, boolean)

HgLogBrowserDialog.__procFinished

__procFinished(exitCode, exitStatus)

Private slot connected to the finished signal.

exitCode
exit code of the process (integer)
exitStatus
exit status of the process (QProcess.ExitStatus)

HgLogBrowserDialog.__processBuffer

__processBuffer()

Private method to process the buffered output of the hg log command.

HgLogBrowserDialog.__pullActTriggered

__pullActTriggered()

Private slot to pull changes from a remote repository.

HgLogBrowserDialog.__pushActTriggered

__pushActTriggered()

Private slot to push changes to a remote repository up to a selected changeset.

HgLogBrowserDialog.__pushAllActTriggered

__pushAllActTriggered()

Private slot to push all changes to a remote repository.

HgLogBrowserDialog.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal.

It reads the error output of the process and inserts it into the error pane.

HgLogBrowserDialog.__readStdout

__readStdout()

Private slot to handle the readyReadStandardOutput signal.

It reads the output of the process and inserts it into a buffer.

HgLogBrowserDialog.__resetUI

__resetUI()

Private method to reset the user interface.

HgLogBrowserDialog.__resizeColumnsFiles

__resizeColumnsFiles()

Private method to resize the changed files tree columns.

HgLogBrowserDialog.__resizeColumnsLog

__resizeColumnsLog()

Private method to resize the log tree columns.

HgLogBrowserDialog.__resortFiles

__resortFiles()

Private method to resort the changed files tree.

HgLogBrowserDialog.__showError

__showError(out)

Private slot to show some error.

out
error to be shown (string)

HgLogBrowserDialog.__stripActTriggered

__stripActTriggered()

Private slot to strip changesets from the repository.

HgLogBrowserDialog.__switchActTriggered

__switchActTriggered()

Private slot to switch the working directory to the selected revision.

HgLogBrowserDialog.__tagActTriggered

__tagActTriggered()

Private slot to tag the selected revision.

HgLogBrowserDialog.__updateDiffButtons

__updateDiffButtons()

Private slot to update the enabled status of the diff buttons.

HgLogBrowserDialog.__updateGui

__updateGui(itm)

Private slot to update GUI elements except tool menu actions.

itm
reference to the item the update should be based on (QTreeWidgetItem)

HgLogBrowserDialog.__updateToolMenuActions

__updateToolMenuActions()

Private slot to update the status of the tool menu actions and the tool menu button.

HgLogBrowserDialog.closeEvent

closeEvent(e)

Protected slot implementing a close event handler.

e
close event (QCloseEvent)

HgLogBrowserDialog.col2x

col2x(radius)

Local function to calculate a x-position for a column.

col
column number (integer)
radius
radius of the indicator circle (integer)

HgLogBrowserDialog.keyPressEvent

keyPressEvent(evt)

Protected slot to handle a key press event.

evt
the key press event (QKeyEvent)

HgLogBrowserDialog.on_branchCombo_activated

on_branchCombo_activated(txt)

Private slot called, when a new branch is selected.

txt
text of the selected branch (string)

HgLogBrowserDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
button that was clicked (QAbstractButton)

HgLogBrowserDialog.on_diffP1Button_clicked

on_diffP1Button_clicked()

Private slot to handle the Diff to Parent 1 button.

HgLogBrowserDialog.on_diffP2Button_clicked

on_diffP2Button_clicked()

Private slot to handle the Diff to Parent 2 button.

HgLogBrowserDialog.on_diffRevisionsButton_clicked

on_diffRevisionsButton_clicked()

Private slot to handle the Compare Revisions button.

HgLogBrowserDialog.on_fieldCombo_activated

on_fieldCombo_activated(txt)

Private slot called, when a new filter field is selected.

txt
text of the selected field (string)

HgLogBrowserDialog.on_findNextButton_clicked

on_findNextButton_clicked()

Private slot to find the next item matching the entered criteria.

HgLogBrowserDialog.on_findPrevButton_clicked

on_findPrevButton_clicked()

Private slot to find the previous item matching the entered criteria.

HgLogBrowserDialog.on_fromDate_dateChanged

on_fromDate_dateChanged(date)

Private slot called, when the from date changes.

date
new date (QDate)

HgLogBrowserDialog.on_input_returnPressed

on_input_returnPressed()

Private slot to handle the press of the return key in the input field.

HgLogBrowserDialog.on_logTree_currentItemChanged

on_logTree_currentItemChanged(current, previous)

Private slot called, when the current item of the log tree changes.

current
reference to the new current item (QTreeWidgetItem)
previous
reference to the old current item (QTreeWidgetItem)

HgLogBrowserDialog.on_logTree_itemSelectionChanged

on_logTree_itemSelectionChanged()

Private slot called, when the selection has changed.

HgLogBrowserDialog.on_modeComboBox_currentIndexChanged

on_modeComboBox_currentIndexChanged(index)

Private slot to react on mode changes.

index
index of the selected entry (integer)

HgLogBrowserDialog.on_nextButton_clicked

on_nextButton_clicked()

Private slot to handle the Next button.

HgLogBrowserDialog.on_passwordCheckBox_toggled

on_passwordCheckBox_toggled(isOn)

Private slot to handle the password checkbox toggled.

isOn
flag indicating the status of the check box (boolean)

HgLogBrowserDialog.on_refreshButton_clicked

on_refreshButton_clicked()

Private slot to refresh the log.

HgLogBrowserDialog.on_rxEdit_returnPressed

on_rxEdit_returnPressed()

Private slot handling a press of the Return key in the rxEdit input.

HgLogBrowserDialog.on_rxEdit_textChanged

on_rxEdit_textChanged(txt)

Private slot called, when a filter expression is entered.

txt
filter expression (string)

HgLogBrowserDialog.on_sendButton_clicked

on_sendButton_clicked()

Private slot to send the input to the mercurial process.

HgLogBrowserDialog.on_stopCheckBox_clicked

on_stopCheckBox_clicked(checked)

Private slot called, when the stop on copy/move checkbox is clicked.

checked
flag indicating the state of the check box (boolean)

HgLogBrowserDialog.on_toDate_dateChanged

on_toDate_dateChanged(date)

Private slot called, when the from date changes.

date
new date (QDate)

HgLogBrowserDialog.show

show()

Public slot to show the dialog.

HgLogBrowserDialog.start

start(fn, bundle=None, isFile=False)

Public slot to start the hg log command.

fn
filename to show the log for (string)
bundle=
name of a bundle file (string)
isFile=
flag indicating log for a file is to be shown (boolean)
Up