From d08f9d07de143ca5f8ae9bd1dfc2f69269cfcf6a Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Wed, 7 Apr 2010 03:29:10 -0700 Subject: [PATCH] views.revselect: Don't provide a default revision It's better to make users give us an explicit expression instead of assuming that 'HEAD' is always a good default. Signed-off-by: David Aguilar --- cola/views/actions.py | 4 +--- cola/views/revselect.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cola/views/actions.py b/cola/views/actions.py index 87569070..f13e07b5 100644 --- a/cola/views/actions.py +++ b/cola/views/actions.py @@ -94,9 +94,7 @@ class ActionDialog(standard.StandardDialog): ('Tag', gitcmds.tag_list()), ) revprompt = self.opts.get('revprompt', i18n.gettext('Revision')) - self.revselect = revselect.RevisionSelector(self, - revs=revs, - default_revision='HEAD') + self.revselect = revselect.RevisionSelector(self, revs=revs) self.revselect.set_revision_label(revprompt) self.layt.addWidget(self.revselect) if not opts.get('revprompt'): diff --git a/cola/views/revselect.py b/cola/views/revselect.py index 7d83a681..27e71f86 100644 --- a/cola/views/revselect.py +++ b/cola/views/revselect.py @@ -4,7 +4,7 @@ from PyQt4.QtCore import SIGNAL from cola import qtutils class RevisionSelector(QtGui.QWidget): - def __init__(self, parent=None, revs=None, default_revision=None): + def __init__(self, parent=None, revs=None): QtGui.QWidget.__init__(self, parent) self._revs = revs @@ -21,8 +21,6 @@ class RevisionSelector(QtGui.QWidget): self._rev_layt.addWidget(self._rev_label) self._revision = QtGui.QLineEdit() - if default_revision: - self._revision.setText(default_revision) self._rev_layt.addWidget(self._revision) self._layt.addLayout(self._rev_layt) -- 2.11.4.GIT