by
Changes to 27 files · Browse files at dbe7b9b55bf1 Showing diff from parent 075b6dd8684e 6a19669f2de7 Diff from another changeset...
@@ -199,7 +199,7 @@ return
repo.thgbackup(path)
if revertall:
- commands.revert(repo.ui, repo, path)
+ commands.revert(repo.ui, repo, path, no_backup=True)
else:
wlock = repo.wlock()
try:
@@ -309,7 +309,7 @@ else:
repo.thgbackup(repo.wjoin(wfile))
wasadded = wfile in repo[None].added()
- commands.revert(repo.ui, repo, repo.wjoin(wfile))
+ commands.revert(repo.ui, repo, repo.wjoin(wfile), no_backup=True)
if wasadded:
os.unlink(repo.wjoin(wfile))
self.fileModified.emit()
|
@@ -249,27 +249,28 @@ def resizeEvent(self, e):
# re-size columns the smart way: the column holding Description
# is re-sized according to the total widget size.
- key = '%s/widget_width' % self.cfgname
- widget_width, ok = QSettings().value(key).toInt()
- if not ok:
- widget_width = 0
-
- if self.resized:
- model = self.model()
- vp_width = self.viewport().width()
- total_width = stretch_col = 0
+ if e.oldSize().width() != e.size().width():
+ key = '%s/widget_width' % self.cfgname
+ widget_width, ok = QSettings().value(key).toInt()
+ if not ok:
+ widget_width = 0
- if vp_width != widget_width:
- for c in range(model.columnCount(QModelIndex())):
- if model._columns[c] in model._stretchs:
- #save the description column
- stretch_col = c
- else:
- #total the other widths
- total_width += self.columnWidth(c)
+ if self.resized:
+ model = self.model()
+ vp_width = self.viewport().width()
+ total_width = stretch_col = 0
- width = max(vp_width - total_width, 100)
- self.setColumnWidth(stretch_col, width)
+ if vp_width != widget_width:
+ for c in range(model.columnCount(QModelIndex())):
+ if model._columns[c] in model._stretchs:
+ #save the description column
+ stretch_col = c
+ else:
+ #total the other widths
+ total_width += self.columnWidth(c)
+
+ width = max(vp_width - total_width, 100)
+ self.setColumnWidth(stretch_col, width)
super(HgRepoView, self).resizeEvent(e)
|
@@ -66,6 +66,7 @@ self.revset = set()
self.namedTabs = {}
self.repolen = len(repo)
+ self.destroyed.connect(self.repo.thginvalidate)
if repo.parents()[0].rev() == -1:
self._reload_rev = 'tip'
|
|
@@ -779,14 +779,19 @@ def refresh(self, *args):
# refresh config values
self.ini = self.loadIniFile(self.rcpath)
- self.readonly = not (hasattr(self.ini, 'write') and os.access(self.fn, os.W_OK))
+ self.readonly = not (hasattr(self.ini, 'write')
+ and os.access(self.fn, os.W_OK))
self.stack.setDisabled(self.readonly)
self.fnedit.setText(hglib.tounicode(self.fn))
for name, info, widgets in self.pages.values():
if name == 'extensions':
extsmentioned = False
for row, w in enumerate(widgets):
- val = self.readCPath('extensions.' + w.opts['label'])
+ key = w.opts['label']
+ for fullkey in (key, 'hgext.%s' % key, 'hgext/%s' % key):
+ val = self.readCPath('extensions.' + fullkey)
+ if val != None:
+ break
if val == None:
curvalue = False
elif len(val) and val[0] == '!':
@@ -796,6 +801,10 @@ curvalue = True
extsmentioned = True
w.setValue(curvalue)
+ if val == None:
+ w.opts['cpath'] = 'extensions.' + key
+ else:
+ w.opts['cpath'] = 'extensions.' + fullkey
if not extsmentioned:
# make sure widgets are shown properly,
# even when no extensions mentioned in the config file
@@ -975,18 +984,18 @@ if (not emitChanged) and chk.isDirty():
self.restartRequested.emit(_('Extensions'))
emitChanged = True
- key = chk.opts['label']
+ name = chk.opts['label']
+ section, key = chk.opts['cpath'].split('.', 1)
newvalue = chk.value()
- if newvalue and (key in enabledexts):
+ if newvalue and (name in enabledexts):
continue # unchanged
if newvalue:
self.ini.set(section, key, '')
else:
- for cand in (key, 'hgext.%s' % key, 'hgext/%s' % key):
- try:
- del self.ini[section][cand]
- except KeyError:
- pass
+ try:
+ del self.ini[section][key]
+ except KeyError:
+ pass
@pyqtSlot()
def validateextensions(self):
@@ -997,17 +1006,17 @@ if chk.isChecked())
invalidexts = hglib.validateextensions(selectedexts)
- def getinival(name):
+ def getinival(cpath):
if section not in self.ini:
return None
- for cand in (name, 'hgext.%s' % name, 'hgext/%s' % name):
- try:
- return self.ini[section][cand]
- except KeyError:
- pass
+ sect, key = cpath.split('.', 1)
+ try:
+ return self.ini[sect][key]
+ except KeyError:
+ pass
- def changable(name):
- curval = getinival(name)
+ def changable(name, cpath):
+ curval = getinival(cpath)
if curval not in ('', None):
# enabled or unspecified, official extensions only
return False
@@ -1023,7 +1032,7 @@ allexts = hglib.allextensions()
for chk in self.pages['extensions'][2]:
name = chk.opts['label']
- chk.setEnabled(changable(name))
+ chk.setEnabled(changable(name, chk.opts['cpath']))
invalmsg = invalidexts.get(name)
if invalmsg:
invalmsg = invalmsg.decode('utf-8')
|
@@ -448,6 +448,7 @@ index = self.repoTabsWidget.currentIndex()
if widget.closeRepoWidget():
self.repoTabsWidget.removeTab(index)
+ widget.deleteLater()
self.updateMenu()
def repoTabCloseRequested(self, index):
@@ -455,6 +456,7 @@ w = tw.widget(index)
if w and w.closeRepoWidget():
tw.removeTab(index)
+ w.deleteLater()
self.updateMenu()
def repoTabChanged(self, index=0):
|
@@ -75,8 +75,8 @@ ## tooltips
self.tips = gtklib.Tooltips()
self.tips.set_tip(frame,
- _('Commit message text for new changeset that reverses the'
- ' effect of the change being backed out.'))
+ _('Commit message text for new changeset that reverses the '
+ 'effect of the change being backed out.'))
## use English backout message option
self.eng_msg = gtk.CheckButton(_('Use English backout message'))
|
@@ -54,8 +54,8 @@ def get_error_text(self):
if self.__error_text__ == None:
text = '{{{\n#!python\n' # Wrap in Bitbucket wiki preformat markers
- text += _('** Please report this bug to'
- ' http://bitbucket.org/tortoisehg/stable/issues\n')
+ text += _('** Please report this bug to '
+ 'http://bitbucket.org/tortoisehg/stable/issues\n')
text += '** Mercurial version (%s). TortoiseHg version (%s)\n' % (
hglib.hgversion, version.version())
text += '** Command: %s\n' % (self.opts['cmd'])
|
@@ -76,7 +76,10 @@ def _get_bugtraq_object(self):
if self.bugtr == None:
obj = CreateObject(self.guid)
- self.bugtr = obj.QueryInterface(IBugTraqProvider2)
+ try:
+ self.bugtr = obj.QueryInterface(IBugTraqProvider2)
+ except COMError:
+ return None
return self.bugtr
def get_commit_message(self, parameters, logmessage):
@@ -133,7 +136,7 @@ try:
bugtr.HasOptions()
return True
- except ValueError:
+ except (ValueError, AttributeError):
return False
|
@@ -1116,17 +1116,17 @@
if sumlen and len(lines[0].rstrip()) > sumlen:
resp = gdialog.Confirm(_('Confirm Commit'), [], self,
- _('The summary line length of %i is greater than'
- ' %i.\n\nIgnore format policy and continue'
- ' commit?') %
+ _('The summary line length of %i is greater than '
+ '%i.\n\nIgnore format policy and continue '
+ 'commit?') %
(len(lines[0].rstrip()), sumlen)).run()
if resp != gtk.RESPONSE_YES:
return False
if sumlen and len(lines) > 1 and len(lines[1].strip()):
resp = gdialog.Confirm(_('Confirm Commit'), [], self,
- _('The summary line is not followed by a blank'
- ' line.\n\nIgnore format policy and continue'
- ' commit?')).run()
+ _('The summary line is not followed by a blank '
+ 'line.\n\nIgnore format policy and continue '
+ 'commit?')).run()
if resp != gtk.RESPONSE_YES:
return False
if maxlen:
@@ -1137,8 +1137,8 @@ if errs:
resp = gdialog.Confirm(_('Confirm Commit'), [], self,
_('The following lines are over the %i-'
- 'character limit: %s.\n\nIgnore format'
- ' policy and continue commit?') %
+ 'character limit: %s.\n\nIgnore format '
+ 'policy and continue commit?') %
(maxlen, ', '.join(errs))).run()
if resp != gtk.RESPONSE_YES:
return False
|
@@ -708,8 +708,8 @@ spacer.set_width_chars(24)
sniplbl = gtk.Label()
snipbox.pack_start(sniplbl, False, False)
- sniplbl.set_markup('<span size="large" weight="heavy"'
- ' font_family="monospace">...</span>')
+ sniplbl.set_markup('<span size="large" weight="heavy" '
+ 'font_family="monospace">...</span>')
sniplbl.set_angle(90)
snipbox.pack_start(gtk.Label())
self.csbox.pack_start(wrapbox, False, False, 2)
|
@@ -317,12 +317,12 @@ search_hbox.pack_start(search, False, False, 4)
self.tooltips.set_tip(search, _('Start this search'))
self.tooltips.set_tip(regexp, _('Regular expression search pattern'))
- self.tooltips.set_tip(includes, _('Comma separated list of'
- ' inclusion patterns. By default, the entire repository'
- ' is searched.'))
- self.tooltips.set_tip(excludes, _('Comma separated list of'
- ' exclusion patterns. Exclusion patterns are applied'
- ' after inclusion patterns.'))
+ self.tooltips.set_tip(includes, _('Comma separated list of '
+ 'inclusion patterns. By default, the entire repository '
+ 'is searched.'))
+ self.tooltips.set_tip(excludes, _('Comma separated list of '
+ 'exclusion patterns. Exclusion patterns are applied '
+ 'after inclusion patterns.'))
vbox.pack_start(search_hbox, False, False, 4)
hbox = gtk.HBox()
|
@@ -235,7 +235,8 @@ unkmodel = self.unktree.get_model()
while q.qsize():
wfile = q.get(0)
- unkmodel.append( [wfile, hglib.toutf(wfile)] )
+ if unkmodel is not None:
+ unkmodel.append( [wfile, hglib.toutf(wfile)] )
return thread.isAlive()
def save_settings(self):
|
@@ -98,39 +98,39 @@ self._normal = gtk.RadioButton(None, _('Send changesets as Hg patches'))
table.add_row(self._normal)
self.tips.set_tip(self._normal,
- _('Hg patches (as generated by export command) are compatible'
- ' with most patch programs. They include a header which'
- ' contains the most important changeset metadata.'))
+ _('Hg patches (as generated by export command) are compatible '
+ 'with most patch programs. They include a header which '
+ 'contains the most important changeset metadata.'))
self._git = gtk.RadioButton(self._normal,
_('Use extended (git) patch format'))
table.add_row(self._git)
self.tips.set_tip(self._git,
- _('Git patches can describe binary files, copies, and'
- ' permission changes, but recipients may not be able to'
- ' use them if they are not using git or Mercurial.'))
+ _('Git patches can describe binary files, copies, and '
+ 'permission changes, but recipients may not be able to '
+ 'use them if they are not using git or Mercurial.'))
self._plain = gtk.RadioButton(self._normal,
_('Plain, do not prepend Hg header'))
table.add_row(self._plain)
self.tips.set_tip(self._plain,
- _('Stripping Mercurial header removes username and parent'
- ' information. Only useful if recipient is not using'
- ' Mercurial (and does not like to see the headers).'))
+ _('Stripping Mercurial header removes username and parent '
+ 'information. Only useful if recipient is not using '
+ 'Mercurial (and does not like to see the headers).'))
self._bundle = gtk.RadioButton(self._normal,
_('Send single binary bundle, not patches'))
table.add_row(self._bundle)
if revargs[0] in ('--outgoing', '-o'):
self.tips.set_tip(self._bundle,
- _('Bundles store complete changesets in binary form.'
- ' Upstream users can pull from them. This is the safest'
- ' way to send changes to recipient Mercurial users.'))
+ _('Bundles store complete changesets in binary form. '
+ 'Upstream users can pull from them. This is the safest '
+ 'way to send changes to recipient Mercurial users.'))
else:
self._bundle.set_sensitive(False)
self.tips.set_tip(self._bundle,
- _('This feature is only available when sending outgoing'
- ' changesets. It is not applicable with revision ranges.'))
+ _('This feature is only available when sending outgoing '
+ 'changesets. It is not applicable with revision ranges.'))
self._attach = gtk.CheckButton(_('attach'))
self.tips.set_tip(self._attach,
@@ -229,12 +229,12 @@ self._frombox.child.set_text(hglib.fromutf(getfromaddr(repo.ui)))
self._subjbox.child.set_text(hglib.fromutf(repo.ui.config('email', 'subject', '')))
self.tips.set_tip(self._eventbox,
- _('Patch series description is sent in initial summary'
- ' email with [PATCH 0 of N] subject. It should describe'
- ' the effects of the entire patch series. When emailing'
- ' a bundle, these fields make up the message subject and'
- ' body. Flags is a comma separated list of tags'
- ' which are inserted into the message subject prefix.')
+ _('Patch series description is sent in initial summary '
+ 'email with [PATCH 0 of N] subject. It should describe '
+ 'the effects of the entire patch series. When emailing '
+ 'a bundle, these fields make up the message subject and '
+ 'body. Flags is a comma separated list of tags '
+ 'which are inserted into the message subject prefix.')
)
gtklib.addspellcheck(self.descview, self.repo.ui)
fill_history(history, self._tolist, 'email.to')
|
@@ -224,7 +224,12 @@ def refresh(self):
hglib.invalidaterepo(self.repo)
matcher = match.always(self.repo.root, self.repo.root)
- unknown = self.repo.status(match=matcher, unknown=True)[4]
+ try:
+ unknown = self.repo.status(match=matcher, unknown=True)[4]
+ except (EnvironmentError, util.Abort), inst:
+ gdialog.Prompt(_('Error while reading status'),
+ hglib.toutf(str(inst)), self).run()
+ return
self.unkmodel.clear()
for u in unknown:
self.unkmodel.append([hglib.toutf(u), u])
@@ -252,7 +257,7 @@ createmode=None)
f.writelines(out)
f.rename()
- except IOError, e:
+ except EnvironmentError, e:
dialog.error_dialog(self, _('Unable to write .hgignore file'),
hglib.tounicode(str(e)))
shlib.shell_notify([self.ignorefile])
|
@@ -797,8 +797,8 @@ [('', 'delay', None, _('wait until the second ticks over')),
('n', 'notify', [], _('notify the shell for paths given')),
('', 'remove', None, _('remove the status cache')),
- ('s', 'show', None, _('show the contents of the'
- ' status cache (no update)')),
+ ('s', 'show', None, _('show the contents of the '
+ 'status cache (no update)')),
('', 'all', None, _('udpate all repos in current dir')) ],
_('hgtk thgstatus [OPTION]')),
"^update|checkout|co": (update,
|
@@ -194,8 +194,8 @@ def before_close(self):
if len(self.repo.parents()) == 2:
ret = gdialog.Confirm(_('Confirm Exit'), [], self,
- _('To complete merging, you need to commit'
- ' merged files in working directory.\n\n'
+ _('To complete merging, you need to commit '
+ 'merged files in working directory.\n\n'
'Do you want to exit?')).run()
if ret != gtk.RESPONSE_YES:
return False
@@ -213,8 +213,8 @@ # '.' is safer than self.localrev, in case the user has
# pulled a fast one on us and updated from the CLI
ret = gdialog.Confirm(_('Confirm Discard Changes'), [], self,
- _('The changes from revision %s and all unmerged parents'
- ' will be discarded.\n\n'
+ _('The changes from revision %s and all unmerged parents '
+ 'will be discarded.\n\n'
'Are you sure this is what you want to do?')
% (self.otherframe.get_data('revid'))).run()
if ret != gtk.RESPONSE_YES:
|
@@ -56,8 +56,8 @@ self._toolbutton(gtk.STOCK_UNDO,
_('Rollback'),
self._rollback_clicked,
- tip=_('Rollback (undo) last transaction to'
- ' repository (pull, commit, etc)')),
+ tip=_('Rollback (undo) last transaction to '
+ 'repository (pull, commit, etc)')),
gtk.SeparatorToolItem(),
self._toolbutton(gtk.STOCK_CLEAR,
_('Recover'),
|
@@ -365,8 +365,8 @@ _('name to show in web pages (default: working dir)')),
('', 'web-conf', '',
_('name of the hgweb config file (serve more than one repository)')),
- ('', 'webdir-conf', '', _('name of the webdir config file'
- ' (DEPRECATED)')),
+ ('', 'webdir-conf', '', _('name of the webdir config file '
+ '(DEPRECATED)')),
('', 'pid-file', '', _('name of file to write process ID to')),
('', 'stdio', None, _('for remote clients')),
('t', 'templates', '', _('web templates to use')),
|
@@ -23,7 +23,6 @@
self.set_default_size(400, -1)
self.set_title(_('TortoiseHg Shell Configuration'))
- self.setWindowIcon(qtlib.geticon('detect_rename'))
okay = gtk.Button(_('OK'))
cancel = gtk.Button(_('Cancel'))
@@ -149,7 +148,7 @@ hbox = gtk.HBox()
tvbox.pack_start(hbox, False, False, 2)
hbox.pack_start(gtk.Label(
- _('Warning: affects all Tortoises, logoff required after change')),
+ _('Warning: affects all Tortoises, logoff required after change')),
False, False, 2)
hbox = gtk.HBox()
@@ -189,7 +188,7 @@ hbox = gtk.HBox()
tvbox.pack_start(hbox, False, False, 2)
hbox.pack_start(gtk.Label(
- _('*: not used by TortoiseHg')),
+ _('*: not used by TortoiseHg')),
False, False, 2)
## Taskbar group
@@ -208,8 +207,8 @@ # Tooltips
tips = gtklib.Tooltips()
- tooltip = _('Do not show menu items on unversioned folders'
- ' (use shift + click to override)')
+ tooltip = _('Do not show menu items on unversioned folders '
+ '(use shift + click to override)')
tips.set_tip(self.hide_context_menu, tooltip)
tooltip = _('Show overlay icons in Mercurial repositories')
tips.set_tip(self.ovenable, tooltip)
|
@@ -56,29 +56,29 @@ self.toolbutton(gtk.STOCK_GO_DOWN,
_('Incoming'),
self.incoming_clicked,
- tip=_('Display changes that can be pulled'
- ' from selected repository')),
+ tip=_('Display changes that can be pulled '
+ 'from selected repository')),
self.toolbutton(gtk.STOCK_GOTO_BOTTOM,
_(' Pull '),
self.pull_clicked,
- tip=_('Pull changes from selected'
- ' repository')),
+ tip=_('Pull changes from selected '
+ 'repository')),
gtk.SeparatorToolItem(),
self.toolbutton(gtk.STOCK_GO_UP,
_('Outgoing'),
self.outgoing_clicked,
tip=_('Display local changes that will be '
- ' pushed to selected repository')),
+ 'pushed to selected repository')),
self.toolbutton(gtk.STOCK_GOTO_TOP,
_('Push'),
self.push_clicked,
- tip=_('Push local changes to selected'
- ' repository')),
+ tip=_('Push local changes to selected '
+ 'repository')),
self.toolbutton(gtk.STOCK_GOTO_LAST,
_('Email'),
self.email_clicked,
- tip=_('Email local outgoing changes to'
- ' one or more recipients')),
+ tip=_('Email local outgoing changes to '
+ 'one or more recipients')),
self.toolbutton(gtk.STOCK_UNDO,
_('Shelve'),
self.shelve_clicked,
@@ -172,8 +172,8 @@ ## checkbox options
chkopthbox = gtk.HBox()
self.force = gtk.CheckButton(_('Force pull or push'))
- self.tips.set_tip(self.force, _('Run even when remote repository'
- ' is unrelated.'))
+ self.tips.set_tip(self.force,
+ _('Run even when remote repository is unrelated.'))
self.newbranch = gtk.CheckButton(_('Push new branch'))
self.tips.set_tip(self.newbranch, _('Allow pushing a new branch'))
self.use_proxy = gtk.CheckButton(_('Use proxy server'))
@@ -192,8 +192,9 @@ revhbox.pack_start(self.reventry, True, True, 2)
reveventbox = gtk.EventBox()
reveventbox.add(revhbox)
- self.tips.set_tip(reveventbox, _('A specific revision up to which you'
- ' would like to push or pull.'))
+ self.tips.set_tip(reveventbox,
+ _('A specific revision up to which you '
+ 'would like to push or pull.'))
## remote command option
cmdhbox = gtk.HBox()
@@ -202,8 +203,8 @@ cmdhbox.pack_start(self.cmdentry, True, True, 2)
cmdeventbox = gtk.EventBox()
cmdeventbox.add(cmdhbox)
- self.tips.set_tip(cmdeventbox, _('Name of hg executable on remote'
- ' machine.'))
+ self.tips.set_tip(cmdeventbox,
+ _('Name of hg executable on remote machine.'))
revvbox = gtk.VBox()
revvbox.pack_start(chkopthbox, False, False, 8)
|
|
|
@@ -43,192 +43,192 @@ (_('UI Language'), 'tortoisehg.ui.language', i18n.availablelanguages(),
_('Specify your preferred user interface language (restart needed)')),
(_('Three-way Merge Tool'), 'ui.merge', [],
- _('Graphical merge program for resolving merge conflicts. If left'
- ' unspecified, Mercurial will use the first applicable tool it finds'
- ' on your system or use its internal merge tool that leaves conflict'
- ' markers in place. Chose internal:merge to force conflict markers,'
- ' internal:prompt to always select local or other, or internal:dump'
- ' to leave files in the working directory for manual merging')),
+ _('Graphical merge program for resolving merge conflicts. If left '
+ 'unspecified, Mercurial will use the first applicable tool it finds '
+ 'on your system or use its internal merge tool that leaves conflict '
+ 'markers in place. Chose internal:merge to force conflict markers, '
+ 'internal:prompt to always select local or other, or internal:dump '
+ 'to leave files in the working directory for manual merging')),
(_('Visual Diff Tool'), 'tortoisehg.vdiff', [],
- _('Specify visual diff tool, as described in the [merge-tools]'
- ' section of your Mercurial configuration files. If left'
- ' unspecified, TortoiseHg will use the selected merge tool.'
- ' Failing that it uses the first applicable tool it finds.')),
+ _('Specify visual diff tool, as described in the [merge-tools] '
+ 'section of your Mercurial configuration files. If left '
+ 'unspecified, TortoiseHg will use the selected merge tool. '
+ 'Failing that it uses the first applicable tool it finds.')),
(_('Visual Editor'), 'tortoisehg.editor', [],
_('Specify the visual editor used to view files, etc')),
(_('CLI Editor'), 'ui.editor', [],
- _('The editor to use during a commit and other instances where'
- ' Mercurial needs multiline input from the user. Used by'
- ' command line commands, including patch import.')),
+ _('The editor to use during a commit and other instances where '
+ 'Mercurial needs multiline input from the user. Used by '
+ 'command line commands, including patch import.')),
(_('Tab Width'), 'tortoisehg.tabwidth', [],
- _('Specify the number of spaces that tabs expand to in various'
- ' TortoiseHg windows.'
- ' Default: Not expanded')),
+ _('Specify the number of spaces that tabs expand to in various '
+ 'TortoiseHg windows. '
+ 'Default: Not expanded')),
(_('Max Diff Size'), 'tortoisehg.maxdiff', ['1024', '0'],
_('The maximum size file (in KB) that TortoiseHg will '
- 'show changes for in the changelog, status, and commit windows.'
- ' A value of zero implies no limit. Default: 1024 (1MB)')),
+ 'show changes for in the changelog, status, and commit windows. '
+ 'A value of zero implies no limit. Default: 1024 (1MB)')),
(_('Bottom Diffs'), 'gtools.diffbottom', ['False', 'True'],
- _('Show the diff panel below the file list in status, shelve, and'
- ' commit dialogs.'
- ' Default: False (show diffs to right of file list)')),
+ _('Show the diff panel below the file list in status, shelve, and '
+ 'commit dialogs. '
+ 'Default: False (show diffs to right of file list)')),
(_('Capture stderr'), 'tortoisehg.stderrcapt', ['True', 'False'],
- _('Redirect stderr to a buffer which is parsed at the end of'
- ' the process for runtime errors. Default: True')),
+ _('Redirect stderr to a buffer which is parsed at the end of '
+ 'the process for runtime errors. Default: True')),
(_('Fork hgtk'), 'tortoisehg.hgtkfork', ['True', 'False'],
- _('When running hgtk from the command line, fork a background'
- ' process to run graphical dialogs. Default: True')),
+ _('When running hgtk from the command line, fork a background '
+ 'process to run graphical dialogs. Default: True')),
(_('Full Path Title'), 'tortoisehg.fullpath', ['False', 'True'],
- _('Show a full directory path of the repository in the dialog title'
- ' instead of just the root directory name. Default: False')),
+ _('Show a full directory path of the repository in the dialog title '
+ 'instead of just the root directory name. Default: False')),
) + (gtklib.hasspellcheck() and
((_('Spell Check Language'), 'tortoisehg.spellcheck', [],
- _('Default language for spell check. System language is'
- ' used if not specified. Examples: en, en_GB, en_US')),) or ())),
+ _('Default language for spell check. System language is '
+ 'used if not specified. Examples: en, en_GB, en_US')),) or ())),
({'name': 'commit', 'label': _('Commit'), 'icon': 'menucommit.ico'}, (
(_('Username'), 'ui.username', [],
_('Name associated with commits')),
(_('Summary Line Length'), 'tortoisehg.summarylen', ['0', '70'],
- _('Maximum length of the commit message summary line.'
- ' If set, TortoiseHg will issue a warning if the'
- ' summary line is too long or not separated by a'
- ' blank line. Default: 0 (unenforced)')),
+ _('Maximum length of the commit message summary line. '
+ 'If set, TortoiseHg will issue a warning if the '
+ 'summary line is too long or not separated by a '
+ 'blank line. Default: 0 (unenforced)')),
(_('Message Line Length'), 'tortoisehg.messagewrap', ['0', '80'],
- _('Word wrap length of the commit message. If'
- ' set, the popup menu can be used to format'
- ' the message and a warning will be issued'
- ' if any lines are too long at commit.'
- ' Default: 0 (unenforced)')),
+ _('Word wrap length of the commit message. If '
+ 'set, the popup menu can be used to format '
+ 'the message and a warning will be issued '
+ 'if any lines are too long at commit. '
+ 'Default: 0 (unenforced)')),
(_('Close After Commit'), 'tortoisehg.closeci', ['False', 'True'],
- _('Close the commit tool after every successful'
- ' commit. Default: False')),
+ _('Close the commit tool after every successful '
+ 'commit. Default: False')),
(_('Push After Commit'), 'tortoisehg.pushafterci', ['False', 'True'],
- _('Attempt to push to default push target after every successful'
- ' commit. Default: False')),
+ _('Attempt to push to default push target after every successful '
+ 'commit. Default: False')),
(_('Auto Commit List'), 'tortoisehg.autoinc', [],
- _('Comma separated list of files that are automatically included'
- ' in every commit. Intended for use only as a repository setting.'
- ' Default: None (leave blank)')),
+ _('Comma separated list of files that are automatically included '
+ 'in every commit. Intended for use only as a repository setting. '
+ 'Default: None (leave blank)')),
(_('Auto Exclude List'), 'tortoisehg.ciexclude', [],
- _('Comma separated list of files that are automatically unchecked'
- ' when the status, commit, and shelve dialogs are opened.'
- ' Default: None (leave blank)')),
+ _('Comma separated list of files that are automatically unchecked '
+ 'when the status, commit, and shelve dialogs are opened. '
+ 'Default: None (leave blank)')),
(_('English Messages'), 'tortoisehg.engmsg', ['False', 'True'],
- _('Generate English commit messages even if LANGUAGE or LANG'
- ' environment variables are set to a non-English language.'
- ' This setting is used by the Merge, Tag and Backout dialogs.'
- ' Default: False')),
+ _('Generate English commit messages even if LANGUAGE or LANG '
+ 'environment variables are set to a non-English language. '
+ 'This setting is used by the Merge, Tag and Backout dialogs. '
+ 'Default: False')),
(_('Default Tab'), 'tortoisehg.statustab', ['0', '1', '2'],
- _('The tab on which the status and commit tools will open.'
- ' 0 - TextDiff, 1 - Hunk Selection, 2 - Commit Preview.'
- ' Default: 0')),
+ _('The tab on which the status and commit tools will open. '
+ '0 - TextDiff, 1 - Hunk Selection, 2 - Commit Preview. '
+ 'Default: 0')),
)),
({'name': 'log', 'label': _('Repository Explorer'),
'icon': 'menulog.ico'}, (
(_('Author Coloring'), 'tortoisehg.authorcolor', ['False', 'True'],
- _('Color changesets by author name. If not enabled,'
- ' the changes are colored green for merge, red for'
- ' non-trivial parents, black for normal.'
- ' Default: False')),
+ _('Color changesets by author name. If not enabled, '
+ 'the changes are colored green for merge, red for '
+ 'non-trivial parents, black for normal. '
+ 'Default: False')),
(_('Long Summary'), 'tortoisehg.longsummary', ['False', 'True'],
- _('If true, concatenate multiple lines of changeset summary'
- ' until they reach 80 characters.'
- ' Default: False')),
+ _('If true, concatenate multiple lines of changeset summary '
+ 'until they reach 80 characters. '
+ 'Default: False')),
(_('Log Batch Size'), 'tortoisehg.graphlimit', ['500'],
- _('The number of revisions to read and display in the'
- ' changelog viewer in a single batch.'
- ' Default: 500')),
+ _('The number of revisions to read and display in the '
+ 'changelog viewer in a single batch. '
+ 'Default: 500')),
(_('Dead Branches'), 'tortoisehg.deadbranch', [],
- _('Comma separated list of branch names that should be ignored'
- ' when building a list of branch names for a repository.'
- ' Default: None (leave blank)')),
+ _('Comma separated list of branch names that should be ignored '
+ 'when building a list of branch names for a repository. '
+ 'Default: None (leave blank)')),
(_('Branch Colors'), 'tortoisehg.branchcolors', [],
- _('Space separated list of branch names and colors of the form'
- ' branch:#XXXXXX. Spaces and colons in the branch name must be'
- ' escaped using a backslash (\\). Likewise some other characters'
- ' can be escaped in this way, e.g. \\u0040 will be decoded to the'
- ' @ character, and \\n to a linefeed.'
- ' Default: None (leave blank)')),
+ _('Space separated list of branch names and colors of the form '
+ 'branch:#XXXXXX. Spaces and colons in the branch name must be'
+ 'escaped using a backslash (\\). Likewise some other characters '
+ 'can be escaped in this way, e.g. \\u0040 will be decoded to the '
+ '@ character, and \\n to a linefeed. '
+ 'Default: None (leave blank)')),
(_('Hide Tags'), 'tortoisehg.hidetags', [],
- _('Space separated list of tags that will not be shown.'
- ' Useful example: Specify "qbase qparent qtip" to hide the'
- ' standard tags inserted by the Mercurial Queues Extension.'
- ' Default: None (leave blank)')),
+ _('Space separated list of tags that will not be shown. '
+ 'Useful example: Specify "qbase qparent qtip" to hide the '
+ 'standard tags inserted by the Mercurial Queues Extension. '
+ 'Default: None (leave blank)')),
(_('Use Expander'), 'tortoisehg.changeset-expander', ['False', 'True'],
_('Show changeset details with an expander')),
(_('Toolbar Style'), 'tortoisehg.logtbarstyle',
['small', 'large', 'theme'],
- _('Adjust the display of the main toolbar in the Repository'
- ' Explorer. Values: small, large, or theme. Default: theme')),
+ _('Adjust the display of the main toolbar in the Repository '
+ 'Explorer. Values: small, large, or theme. Default: theme')),
# (_('F/S Encodings'), 'tortoisehg.fsencodings', [],
-# _('Comma separated list of encodings used for filenames'
-# ' on this computer. Default: none')),
+# _('Comma separated list of encodings used for filenames '
+# 'on this computer. Default: none')),
)),
({'name': 'sync', 'label': _('Synchronize'), 'icon': 'menusynch.ico',
'extra': True}, (
(_('After Pull Operation'), 'tortoisehg.postpull',
['none', 'update', 'fetch', 'rebase'],
- _('Operation which is performed directly after a successful pull.'
- ' update equates to pull --update, fetch equates to the fetch'
- ' extension, rebase equates to pull --rebase. Default: none')),
+ _('Operation which is performed directly after a successful pull. '
+ 'update equates to pull --update, fetch equates to the fetch '
+ 'extension, rebase equates to pull --rebase. Default: none')),
)),
({'name': 'web', 'label': _('Web Server'), 'icon': 'proxy.ico'}, (
(_('Name'), 'web.name', ['unknown'],
- _('Repository name to use in the web interface.'
- ' Default is the working directory.')),
+ _('Repository name to use in the web interface. '
+ 'Default is the working directory.')),
(_('Description'), 'web.description', ['unknown'],
- _("Textual description of the repository's purpose or"
- ' contents.')),
+ _("Textual description of the repository's purpose or "
+ 'contents.')),
(_('Contact'), 'web.contact', ['unknown'],
- _('Name or email address of the person in charge of the'
- ' repository.')),
+ _('Name or email address of the person in charge of the '
+ 'repository.')),
(_('Style'), 'web.style',
['paper', 'monoblue', 'coal', 'spartan', 'gitweb', 'old'],
_('Which template map style to use')),
(_('Archive Formats'), 'web.allow_archive', ['bz2', 'gz', 'zip'],
- _('Comma separated list of archive formats allowed for'
- ' downloading')),
+ _('Comma separated list of archive formats allowed for '
+ 'downloading')),
(_('Port'), 'web.port', ['8000'], _('Port to listen on')),
(_('Push Requires SSL'), 'web.push_ssl', ['True', 'False'],
- _('Whether to require that inbound pushes be transported'
- ' over SSL to prevent password sniffing.')),
+ _('Whether to require that inbound pushes be transported '
+ 'over SSL to prevent password sniffing.')),
(_('Stripes'), 'web.stripes', ['1', '0'],
- _('How many lines a "zebra stripe" should span in multiline output.'
- ' Default is 1; set to 0 to disable.')),
+ _('How many lines a "zebra stripe" should span in multiline output. '
+ 'Default is 1; set to 0 to disable.')),
(_('Max Files'), 'web.maxfiles', ['10'],
_('Maximum number of files to list per changeset.')),
(_('Max Changes'), 'web.maxchanges', ['10'],
_('Maximum number of changes to list on the changelog.')),
(_('Allow Push'), 'web.allow_push', ['*'],
- _('Whether to allow pushing to the repository. If empty or not'
- ' set, push is not allowed. If the special value "*", any remote'
- ' user can push, including unauthenticated users. Otherwise, the'
- ' remote user must have been authenticated, and the authenticated'
- ' user name must be present in this list (separated by whitespace'
- ' or ","). The contents of the allow_push list are examined after'
- ' the deny_push list.')),
+ _('Whether to allow pushing to the repository. If empty or not '
+ 'set, push is not allowed. If the special value "*", any remote '
+ 'user can push, including unauthenticated users. Otherwise, the '
+ 'remote user must have been authenticated, and the authenticated '
+ 'user name must be present in this list (separated by whitespace '
+ 'or ","). The contents of the allow_push list are examined after '
+ 'the deny_push list.')),
(_('Deny Push'), 'web.deny_push', ['*'],
- _('Whether to deny pushing to the repository. If empty or not set,'
- ' push is not denied. If the special value "*", all remote users'
- ' are denied push. Otherwise, unauthenticated users are all'
- ' denied, and any authenticated user name present in this list'
- ' (separated by whitespace or ",") is also denied. The contents'
- ' of the deny_push list are examined before the allow_push list.')),
+ _('Whether to deny pushing to the repository. If empty or not set, '
+ 'push is not denied. If the special value "*", all remote users '
+ 'are denied push. Otherwise, unauthenticated users are all '
+ 'denied, and any authenticated user name present in this list '
+ '(separated by whitespace or ",") is also denied. The contents '
+ 'of the deny_push list are examined before the allow_push list.')),
(_('Encoding'), 'web.encoding', ['UTF-8'],
_('Character encoding name')),
)),
({'name': 'proxy', 'label': _('Proxy'), 'icon': 'general.ico'}, (
(_('Host'), 'http_proxy.host', [],
- _('Host name and (optional) port of proxy server, for'
- ' example "myproxy:8000"')),
+ _('Host name and (optional) port of proxy server, for '
+ 'example "myproxy:8000"')),
(_('Bypass List'), 'http_proxy.no', [],
- _('Optional. Comma-separated list of host names that'
- ' should bypass the proxy')),
+ _('Optional. Comma-separated list of host names that '
+ 'should bypass the proxy')),
(_('User'), 'http_proxy.user', [],
_('Optional. User name to authenticate with at the proxy server')),
(_('Password'), 'http_proxy.passwd', [],
@@ -237,82 +237,82 @@
({'name': 'email', 'label': _('Email'), 'icon': gtk.STOCK_GOTO_LAST}, (
(_('From'), 'email.from', [],
- _('Email address to use in the "From" header and for'
- ' the SMTP envelope')),
+ _('Email address to use in the "From" header and for '
+ 'the SMTP envelope')),
(_('To'), 'email.to', [],
_('Comma-separated list of recipient email addresses')),
(_('Cc'), 'email.cc', [],
_('Comma-separated list of carbon copy recipient email addresses')),
(_('Bcc'), 'email.bcc', [],
- _('Comma-separated list of blind carbon copy recipient'
- ' email addresses')),
+ _('Comma-separated list of blind carbon copy recipient '
+ 'email addresses')),
(_('method'), 'email.method', ['smtp'],
- _('Optional. Method to use to send email messages. If value is'
- ' "smtp" (default), use SMTP (configured below). Otherwise, use as'
- ' name of program to run that acts like sendmail (takes "-f" option'
- ' for sender, list of recipients on command line, message on stdin).'
- ' Normally, setting this to "sendmail" or "/usr/sbin/sendmail"'
- ' is enough to use sendmail to send messages.')),
+ _('Optional. Method to use to send email messages. If value is '
+ '"smtp" (default), use SMTP (configured below). Otherwise, use as '
+ 'name of program to run that acts like sendmail (takes "-f" option '
+ 'for sender, list of recipients on command line, message on stdin). '
+ 'Normally, setting this to "sendmail" or "/usr/sbin/sendmail" '
+ 'is enough to use sendmail to send messages.')),
(_('SMTP Host'), 'smtp.host', [], _('Host name of mail server')),
(_('SMTP Port'), 'smtp.port', ['25'],
- _('Port to connect to on mail server.'
- ' Default: 25')),
+ _('Port to connect to on mail server. '
+ 'Default: 25')),
(_('SMTP TLS'), 'smtp.tls', ['False', 'True'],
- _('Connect to mail server using TLS.'
- ' Default: False')),
+ _('Connect to mail server using TLS. '
+ 'Default: False')),
(_('SMTP Username'), 'smtp.username', [],
_('Username to authenticate to mail server with')),
(_('SMTP Password'), 'smtp.password', [],
_('Password to authenticate to mail server with')),
(_('Local Hostname'), 'smtp.local_hostname', [],
- _('Hostname the sender can use to identify itself to the'
- ' mail server.')),
+ _('Hostname the sender can use to identify itself to the '
+ 'mail server.')),
)),
({'name': 'diff', 'label': _('Diff'), 'icon': gtk.STOCK_JUSTIFY_FILL}, (
(_('Patch EOL'), 'patch.eol', ['auto', 'strict', 'crlf', 'lf'],
- _('Normalize file line endings during and after patch to lf or'
- ' crlf. Strict does no normalization. Auto does per-file'
- ' detection, and is the recommended setting.'
- ' Default: strict')),
+ _('Normalize file line endings during and after patch to lf or '
+ 'crlf. Strict does no normalization. Auto does per-file '
+ 'detection, and is the recommended setting. '
+ 'Default: strict')),
(_('Git Format'), 'diff.git', ['False', 'True'],
- _('Use git extended diff header format.'
- ' Default: False')),
+ _('Use git extended diff header format. '
+ 'Default: False')),
(_('No Dates'), 'diff.nodates', ['False', 'True'],
- _('Do not include modification dates in diff headers.'
- ' Default: False')),
+ _('Do not include modification dates in diff headers. '
+ 'Default: False')),
(_('Show Function'), 'diff.showfunc', ['False', 'True'],
- _('Show which function each change is in.'
- ' Default: False')),
+ _('Show which function each change is in. '
+ 'Default: False')),
(_('Ignore White Space'), 'diff.ignorews', ['False', 'True'],
- _('Ignore white space when comparing lines.'
- ' Default: False')),
+ _('Ignore white space when comparing lines. '
+ 'Default: False')),
(_('Ignore WS Amount'), 'diff.ignorewsamount', ['False', 'True'],
- _('Ignore changes in the amount of white space.'
- ' Default: False')),
+ _('Ignore changes in the amount of white space. '
+ 'Default: False')),
(_('Ignore Blank Lines'), 'diff.ignoreblanklines', ['False', 'True'],
- _('Ignore changes whose lines are all blank.'
- ' Default: False')),
+ _('Ignore changes whose lines are all blank. '
+ 'Default: False')),
(_('Coloring Style'), 'tortoisehg.diffcolorstyle',
['none', 'foreground', 'background'],
- _('Adjust the coloring style of diff lines in the changeset'
- ' viewer. Default: foreground')),
+ _('Adjust the coloring style of diff lines in the changeset '
+ 'viewer. Default: foreground')),
)),
({'name': 'font', 'label': _('Font'), 'icon': gtk.STOCK_SELECT_FONT,
'extra': True, 'width': 16}, (
(_('Commit Message'), 'gtools.fontcomment', [],
- _('Font used in changeset viewer and commit log text.'
- ' Default: monospace 10')),
+ _('Font used in changeset viewer and commit log text. '
+ 'Default: monospace 10')),
(_('Diff Text'), 'gtools.fontdiff', [],
- _('Font used for diffs in status and commit tools.'
- ' Default: monospace 10')),
+ _('Font used for diffs in status and commit tools. '
+ 'Default: monospace 10')),
(_('File List'), 'gtools.fontlist', [],
- _('Font used in file lists in status and commit tools.'
- ' Default: sans 9')),
+ _('Font used in file lists in status and commit tools. '
+ 'Default: sans 9')),
(_('Command Output'), 'gtools.fontlog', [],
- _('Font used in command output window.'
- ' Default: monospace 10')),
+ _('Font used in command output window. '
+ 'Default: monospace 10')),
)),
({'name': 'extensions', 'label': _('Extensions'), 'icon': gtk.STOCK_EXECUTE,
|
@@ -158,7 +158,7 @@ dialog = gtklib.MessageDialog(flags=gtk.DIALOG_MODAL)
dialog.set_title(_('Shelve'))
dialog.set_markup(_('<b>Shelve file exists!</b>'))
- dialog.add_buttons(_('Overwrite'), 1,
+ dialog.add_buttons(_('Replace'), 1,
_('Append'), 2,
_('Cancel'), -1)
dialog.set_transient_for(self)
|
@@ -86,8 +86,8 @@ self.expander.connect('notify::expanded', self.options_expanded)
### force option (fixed)
- self.forceopt = gtk.CheckButton(_('Discard local changes, no backup'
- ' (-f/--force)'))
+ self.forceopt = gtk.CheckButton(_('Discard local changes, no backup '
+ '(-f/--force)'))
table.add_row(self.expander, self.forceopt)
# signal handlers
@@ -109,8 +109,8 @@ self.butable.add_row(None, radio, ypad=0)
return radio
self.buopt_all = add_type(_('Backup all (default)'))
- self.buopt_part = add_type(_('Backup unrelated changesets'
- ' (-b/--backup)'))
+ self.buopt_part = add_type(_('Backup unrelated changesets '
+ '(-b/--backup)'))
self.buopt_none = add_type(_('No backup (-n/--nobackup)'))
# layout group
@@ -212,8 +212,8 @@ else:
if not isclean():
ret = gdialog.CustomPrompt(_('Confirm Strip'),
- _('Detected uncommitted local changes.\nDo'
- ' you want to discard them and continue?'),
+ _('Detected uncommitted local changes.\nDo '
+ 'you want to discard them and continue?'),
self, (_('&Yes (--force)'), _('&No')),
default=1, esc=1).run()
if ret == 0:
|
@@ -367,8 +367,8 @@ self.copies = cpy
self.ui = repo.ui
- lbl = gtk.Label(_('Temporary files are removed when this dialog'
- ' is closed'))
+ lbl = gtk.Label(_('Temporary files are removed when this dialog '
+ 'is closed'))
self.vbox.pack_start(lbl, False, False, 2)
scroller = gtk.ScrolledWindow()
|
@@ -176,7 +176,7 @@ return type, rawpath.split('/', 1)[-1]
files = {}
- pf = open(self._path)
+ pf = open(self._path, 'rb')
try:
try:
# consume comments and headers
|
@@ -180,15 +180,11 @@
if not self.rej:
return
- if self.hunks != 1:
- hunkstr = "s"
- else:
- hunkstr = ""
fname = self.fname + ".rej"
self.ui.warn(
- _("%d out of %d hunk%s FAILED -- saving rejects to file %s\n") %
- (len(self.rej), self.hunks, hunkstr, fname))
+ _("%d out of %d hunks FAILED -- saving rejects to file %s\n") %
+ (len(self.rej), self.hunks, fname))
try: os.unlink(fname)
except:
pass
|
Loading...