20
20
"""QBzr - Qt-based frontend for Bazaar
23
qannotate, qbrowse, qcat, qcommit, qconfig, qdiff, qlog, qpull, qpush
24
and more, see output of `bzr help commands | grep qbzr` for full list.
22
QBzr provided GUI frontend for many core bzr commands and several universal
23
dialogs and helper commands. Equivalents for core bzr commands
24
has the same names as CLI commands but with prefix "q".
28
* qadd - GUI for adding files or directories.
29
* qannotate - Show the origin of each line in a file.
30
* qbind - Convert the current branch into a checkout of the supplied branch.
31
* qbranch - Create a new copy of a branch.
32
* qcat - View the contents of a file as of a given revision.
33
* qcommit - GUI for committing revisions.
34
* qconflicts - Show conflicts.
35
* qdiff - Show differences in working tree in a GUI window.
36
* qexport - Export current or past revision to a destination directory or archive.
37
* qinfo - Shows information about the current location.
38
* qinit - Initializes a new branch or shared repository.
39
* qlog - Show log of a repository, branch, file, or directory in a Qt window.
40
* qmerge - Perform a three-way merge.
41
* qplugins - Display information about installed plugins.
42
* qpull - Turn this branch into a mirror of another branch.
43
* qpush - Update a mirror of this branch.
44
* qrevert - Revert changes files.
45
* qsend - Mail or create a merge-directive for submitting changes.
46
* qswitch - Set the branch of a checkout and update.
48
* qunbind - Convert the current checkout into a regular branch.
49
* qupdate - Update working tree with latest changes in the branch.
50
* qversion - Show version/system information.
54
* qgetnew - Creates a new working tree (either a checkout or full branch).
55
* qgetupdates - Fetches external changes into the working tree.
59
* qbrowse - Show inventory or working tree.
60
* qconfig - Configure Bazaar and QBzr.
61
* qviewer - Simple file viewer.
65
* bug-url - print full URL to a specific bug, or open it in your browser.
68
version_info = (0, 14, 0, 'dev', 0)
69
__version__ = '.'.join(map(str, version_info))
27
72
from bzrlib import registry
28
73
from bzrlib.commands import register_command, plugin_cmds
31
version_info = (0, 14, 0, 'dev', 0)
32
__version__ = '.'.join(map(str, version_info))
35
76
class LazyCommandProxy(registry._LazyObjectGetter):
37
78
def __init__(self, module, name, aliases):
63
104
#except AttributeError:
64
105
register_command(LazyCommandProxy(module, name, aliases), decorate)
67
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_merge', [], decorate=True) # provides merge --qpreview
107
# merge --qpreview disabled for 0.14 because it makes qbzr incompatible with bzr-pipeline plugin
108
# see bug https://bugs.launchpad.net/bugs/395817
109
#register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_merge', [], decorate=True) # provides merge --qpreview
68
110
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qadd', [])
69
111
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qannotate', ['qann', 'qblame'])
112
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qbind', [])
70
113
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qbranch', [])
71
114
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qbrowse', ['qbw'])
72
115
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qmain', [])
75
118
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qconfig', ['qconfigure'])
76
119
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qconflicts', ['qresolve'])
77
120
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qdiff', ['qdi'])
121
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qexport', [])
78
122
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qgetnew', ['qgetn'])
79
123
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qgetupdates', ['qgetu', 'qgetup'])
80
124
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qhelp', [])
82
126
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qinit', [])
83
127
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qlog', [])
84
128
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qmerge', [])
129
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qplugins', [])
85
130
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qpull', [])
86
131
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qpush', [])
87
132
register_lazy_command('bzrlib.plugins.qbzr.lib.commands', 'cmd_qrevert', [])
102
147
def post_uncommit_hook(local, master, old_revno, old_tip, new_revno, hook_new_tip):
148
from bzrlib.plugins.qbzr.lib.commit_data import QBzrCommitData
103
149
branch = local or master
104
message = branch.repository.get_revision(old_tip).message
105
config = branch.get_config()
106
config.set_user_option('qbzr_commit_message', message.strip())
150
ci_data = QBzrCommitData(branch=branch)
151
ci_data.set_data_on_uncommit(old_tip, hook_new_tip)
108
154
from bzrlib.branch import Branch
109
Branch.hooks.install_named_hook('post_uncommit', post_uncommit_hook, 'Remember uncomitted message for qcommit')
155
Branch.hooks.install_named_hook('post_uncommit', post_uncommit_hook,
156
'Remember uncomitted revision data for qcommit')
112
159
def load_tests(basic_tests, module, loader):