##// END OF EJS Templates
bugzilla: allow change comment to mark bugs fixed...
bugzilla: allow change comment to mark bugs fixed Add a second regular expression used when scanning change comments. Bugs matched by this new regular expression have the bug comments and optionally hours updated as with the first regular expression, but they are also marked as fixed. The bug status and resolution to set to mark a bug as fixed can be configured. By default status is set to RESOLVED and resolution to FIXED, the default Bugzilla settings. For example, a change comment containing 'Fixes 1234 h1.5' will be added to bug 1234, the bug will have its working time increased by 1.65 hours, and the bug will be marked RESOLVED/FIXED. Change comments may contain both bug update and fix instructions. If the same bug ID occurs in both, the last instruction found takes precedence. The patch adds new bug states 'bug_status' and 'resolution' and actions to update them to the XMLRPC and XMLRPC/email access methods. XMLRPC does not support marking bugs as fixed when used with Bugzilla versions prior to 4.0. When used with an earlier Bugzilla version, a warning is issued and only comment and hours updated.

File last commit:

r16093:7e30f5f2 default
r16223:ac4fd323 default
Show More
uisetup.py
143 lines | 6.7 KiB | text/x-python | PythonLexer
various
hgext: add largefiles extension...
r15168 # Copyright 2009-2010 Gregory P. Ward
# Copyright 2009-2010 Intelerad Medical Systems Incorporated
# Copyright 2010-2011 Fog Creek Software
# Copyright 2010-2011 Unity Technologies
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''setup for largefiles extension: uisetup'''
from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
Martin Geisler
largefiles: handle merges between normal files and largefiles (issue3084)...
r15663 httprepo, localrepo, merge, sshrepo, sshserver, wireproto
various
hgext: add largefiles extension...
r15168 from mercurial.i18n import _
from mercurial.hgweb import hgweb_mod, protocol
import overrides
import proto
def uisetup(ui):
# Disable auto-status for some commands which assume that all
# files in the result are under Mercurial's control
Matt Mackall
largefiles: fix over-long lines
r15170 entry = extensions.wrapcommand(commands.table, 'add',
overrides.override_add)
various
hgext: add largefiles extension...
r15168 addopt = [('', 'large', None, _('add as largefile')),
Na'Tosha Bard
largefiles: add --normal option to hg add (issue3061)
r15944 ('', 'normal', None, _('add as normal file')),
Martin Geisler
largefiles: fix indentation
r15627 ('', 'lfsize', '', _('add all files above this size '
'(in megabytes) as largefiles '
'(default: 10)'))]
various
hgext: add largefiles extension...
r15168 entry[1].extend(addopt)
entry = extensions.wrapcommand(commands.table, 'addremove',
overrides.override_addremove)
Matt Mackall
largefiles: fix over-long lines
r15170 entry = extensions.wrapcommand(commands.table, 'remove',
overrides.override_remove)
entry = extensions.wrapcommand(commands.table, 'forget',
overrides.override_forget)
entry = extensions.wrapcommand(commands.table, 'status',
overrides.override_status)
entry = extensions.wrapcommand(commands.table, 'log',
overrides.override_log)
various
hgext: add largefiles extension...
r15168 entry = extensions.wrapcommand(commands.table, 'rollback',
Matt Mackall
largefiles: fix over-long lines
r15170 overrides.override_rollback)
entry = extensions.wrapcommand(commands.table, 'verify',
overrides.override_verify)
various
hgext: add largefiles extension...
r15168
verifyopt = [('', 'large', None, _('verify largefiles')),
('', 'lfa', None,
_('verify all revisions of largefiles not just current')),
('', 'lfc', None,
_('verify largefile contents not just existence'))]
entry[1].extend(verifyopt)
entry = extensions.wrapcommand(commands.table, 'outgoing',
overrides.override_outgoing)
outgoingopt = [('', 'large', None, _('display outgoing largefiles'))]
entry[1].extend(outgoingopt)
Matt Mackall
largefiles: fix over-long lines
r15170 entry = extensions.wrapcommand(commands.table, 'summary',
overrides.override_summary)
various
hgext: add largefiles extension...
r15168 summaryopt = [('', 'large', None, _('display outgoing largefiles'))]
entry[1].extend(summaryopt)
Matt Mackall
largefiles: fix over-long lines
r15170 entry = extensions.wrapcommand(commands.table, 'update',
overrides.override_update)
entry = extensions.wrapcommand(commands.table, 'pull',
overrides.override_pull)
Matt Mackall
merge: refactor unknown file conflict checking...
r16093 entry = extensions.wrapfunction(merge, '_checkunknownfile',
overrides.override_checkunknownfile)
Martin Geisler
largefiles: handle merges between normal files and largefiles (issue3084)...
r15663 entry = extensions.wrapfunction(merge, 'manifestmerge',
overrides.override_manifestmerge)
Matt Mackall
largefiles: fix over-long lines
r15170 entry = extensions.wrapfunction(filemerge, 'filemerge',
overrides.override_filemerge)
entry = extensions.wrapfunction(cmdutil, 'copy',
overrides.override_copy)
various
hgext: add largefiles extension...
r15168
# Backout calls revert so we need to override both the command and the
# function
Matt Mackall
largefiles: fix over-long lines
r15170 entry = extensions.wrapcommand(commands.table, 'revert',
overrides.override_revert)
entry = extensions.wrapfunction(commands, 'revert',
overrides.override_revert)
various
hgext: add largefiles extension...
r15168
# clone uses hg._update instead of hg.update even though they are the
# same function... so wrap both of them)
extensions.wrapfunction(hg, 'update', overrides.hg_update)
extensions.wrapfunction(hg, '_update', overrides.hg_update)
extensions.wrapfunction(hg, 'clean', overrides.hg_clean)
extensions.wrapfunction(hg, 'merge', overrides.hg_merge)
extensions.wrapfunction(archival, 'archive', overrides.override_archive)
Greg Ward
largefiles: drop more unnecessary compatibility checks
r15349 extensions.wrapfunction(cmdutil, 'bailifchanged',
overrides.override_bailifchanged)
various
hgext: add largefiles extension...
r15168
# create the new wireproto commands ...
wireproto.commands['putlfile'] = (proto.putlfile, 'sha')
wireproto.commands['getlfile'] = (proto.getlfile, 'sha')
wireproto.commands['statlfile'] = (proto.statlfile, 'sha')
# ... and wrap some existing ones
wireproto.commands['capabilities'] = (proto.capabilities, '')
wireproto.commands['heads'] = (proto.heads, '')
wireproto.commands['lheads'] = (wireproto.heads, '')
Greg Ward
largefiles: more work on cleaning up comments...
r15254 # make putlfile behave the same as push and {get,stat}lfile behave
# the same as pull w.r.t. permissions checks
various
hgext: add largefiles extension...
r15168 hgweb_mod.perms['putlfile'] = 'push'
hgweb_mod.perms['getlfile'] = 'pull'
hgweb_mod.perms['statlfile'] = 'pull'
# the hello wireproto command uses wireproto.capabilities, so it won't see
# our largefiles capability unless we replace the actual function as well.
proto.capabilities_orig = wireproto.capabilities
wireproto.capabilities = proto.capabilities
Greg Ward
largefiles: improve comments, internal docstrings...
r15252 # these let us reject non-largefiles clients and make them display
# our error messages
various
hgext: add largefiles extension...
r15168 protocol.webproto.refuseclient = proto.webproto_refuseclient
sshserver.sshserver.refuseclient = proto.sshproto_refuseclient
# can't do this in reposetup because it needs to have happened before
# wirerepo.__init__ is called
proto.ssh_oldcallstream = sshrepo.sshrepository._callstream
proto.http_oldcallstream = httprepo.httprepository._callstream
sshrepo.sshrepository._callstream = proto.sshrepo_callstream
httprepo.httprepository._callstream = proto.httprepo_callstream
# don't die on seeing a repo with the largefiles requirement
localrepo.localrepository.supported |= set(['largefiles'])
# override some extensions' stuff as well
for name, module in extensions.extensions():
if name == 'fetch':
extensions.wrapcommand(getattr(module, 'cmdtable'), 'fetch',
overrides.override_fetch)
if name == 'purge':
extensions.wrapcommand(getattr(module, 'cmdtable'), 'purge',
overrides.override_purge)
if name == 'rebase':
extensions.wrapcommand(getattr(module, 'cmdtable'), 'rebase',
overrides.override_rebase)
Na'Tosha Bard
largefiles: fix bad bug where transplanting a changeset with a largefile will result in an old largefile being comitted later on
r15383 if name == 'transplant':
extensions.wrapcommand(getattr(module, 'cmdtable'), 'transplant',
overrides.override_transplant)