Merge lp:~bulldog98/kubuntu-dev-tools/trunk into lp:kubuntu-dev-tools

Proposed by Jonathan Kolberg
Status: Merged
Merged at revision: 119
Proposed branch: lp:~bulldog98/kubuntu-dev-tools/trunk
Merge into: lp:kubuntu-dev-tools
Diff against target: 874 lines (+733/-8)
16 files modified
TODO (+1/-2)
bin/kgetsource (+44/-6)
bin/khighestversion (+132/-0)
bin/kshowbranches (+31/-0)
bin/kshowseries (+32/-0)
debian/rules (+2/-0)
zsh_completion/_astyle-kubuntu (+3/-0)
zsh_completion/_batpaste (+3/-0)
zsh_completion/_kbranchmover (+2/-0)
zsh_completion/_kbzr (+422/-0)
zsh_completion/_kde-sc-build-status (+2/-0)
zsh_completion/_kgetsource (+48/-0)
zsh_completion/_klinksource (+5/-0)
zsh_completion/_kshowbranches (+2/-0)
zsh_completion/_kshowseries (+2/-0)
zsh_completion/_kubuntu-update-symbols (+2/-0)
To merge this branch: bzr merge lp:~bulldog98/kubuntu-dev-tools/trunk
Reviewer Review Type Date Requested Status
Kubuntu Packagers Pending
Review via email: mp+73672@code.launchpad.net

Description of the change

This adds 2 new functions using launchpadlib and zsh completion for most of the commands

To post a comment you must log in.
124. By Jonathan Kolberg

Added the helper Harald sugested

125. By Jonathan Kolberg

updated completion

126. By Jonathan Kolberg

Made kgetsource also update control

this bumps kde-sc-dev-latest to the version of the package

127. By Jonathan Kolberg

Also made the epoch optional (assumes 4:)

128. By Jonathan Kolberg

Made kgetsource also accept only one argument.

Then it autodects the latest stable tar on the server and downloads that and uses that as version.

129. By Jonathan Kolberg

Fixed a small bug in my Implementation

130. By Jonathan Kolberg

Updated TODO

131. By Jonathan Kolberg

Also install zsh completion files

132. By Jonathan Kolberg

Cleaned up the rules

133. By Jonathan Kolberg

Made completion for kgetsource better

134. By Jonathan Kolberg

Updated kgetsource and made zsh completion better

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'TODO'
--- TODO 2009-01-13 13:29:10 +0000
+++ TODO 2011-09-19 15:44:21 +0000
@@ -1,6 +1,5 @@
1* Add docbook for kubuntu-dev-tools (meta manpage for batscripts and gypsy)1* Add docbook for kubuntu-dev-tools
2* Add readme2* Add readme
3* Test centering around batbranch
4* Don't bundle but push3* Don't bundle but push
5* Maybe use bzr-builddeb?4* Maybe use bzr-builddeb?
6 + either way batbuild needs an option to just export the debian dir (e.g. for5 + either way batbuild needs an option to just export the debian dir (e.g. for
76
=== modified file 'bin/kgetsource'
--- bin/kgetsource 2011-07-23 17:52:56 +0000
+++ bin/kgetsource 2011-09-19 15:44:21 +0000
@@ -1,6 +1,7 @@
1#!/usr/bin/env ruby1#!/usr/bin/env ruby
2#--2#--
3# Copyright (C) 2011 Harald Sitter <apachelogger@ubuntu.com>3# Copyright (C) 2011 Harald Sitter <apachelogger@ubuntu.com>
4# Copyright (C) 2011 Jonathan Kolberg <bulldog98@kubuntu.org>
4#5#
5# This program is free software; you can redistribute it and/or6# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License as7# modify it under the terms of the GNU General Public License as
@@ -33,6 +34,7 @@
33 if split_version.length > 134 if split_version.length > 1
34 return split_version[1]35 return split_version[1]
35 end36 end
37 #TODO: test for \n and remove that
36 return @version38 return @version
37 end39 end
38end40end
@@ -79,23 +81,59 @@
79 if not File.exists?("build-area")81 if not File.exists?("build-area")
80 Dir.mkdir("build-area")82 Dir.mkdir("build-area")
81 end83 end
84 puts ("scp ftpubuntu@ftpmaster.kde.org:/home/ftpubuntu/#{series}/#{version.upstream_version}/src/#{tar.name} build-area/")
82 `scp ftpubuntu@ftpmaster.kde.org:/home/ftpubuntu/#{series}/#{version.upstream_version}/src/#{tar.name} build-area/`85 `scp ftpubuntu@ftpmaster.kde.org:/home/ftpubuntu/#{series}/#{version.upstream_version}/src/#{tar.name} build-area/`
83 `cd build-area && ln -s #{tar.name} #{tar.orig_name}`86 `cd build-area && ln -s #{tar.name} #{tar.orig_name}`
84 end87 end
8588
86 def update_changelog()89 def update_changelog()
87 `cd #{name} && dch -v #{version.version}-0ubuntu1 -D UNRELEASED 'New upstream release'`90 #if @version.version = @version.upstream_version
91 `cd #{name} && dch -v '4:#{version.upstream_version}-0ubuntu1' -D UNRELEASED 'New upstream release'`
92 #else
93 # `cd #{name} && dch -v #{version.version}-0ubuntu1 -D UNRELEASED 'New upstream release'`
94 #end
95 def stringReplace(fileName)
96 aFile = File.open(fileName, "r")
97 aString = aFile.read
98 aFile.close
99
100 left = "kde-sc-dev-latest (>= "
101 right = ")"
102
103 aString.gsub!(/#{Regexp.quote(left)}(.*?)#{Regexp.quote(right)}/m,
104 "#{left}#{"4:"+@version.upstream_version}#{right}")
105
106 File.open(fileName, "w") { |file| file << aString }
107 end
108 stringReplace(@name+"/debian/control")
88 end109 end
89end110end
90111
91if ARGV[0].nil? or ARGV[1].nil? or ARGV[2].nil?112def more()
92 puts("NEED MORE ARGS YE BSTD")113 puts("NEED MORE ARGS YE BSTD")
93 exit(1)114 exit(1)
94end115end
95116
96source = Source.new(ARGV[0], ARGV[1], ARGV[2])117if ARGV[0].nil?
118 more
119end
97120
98source.get_bzr()121if ARGV[1].nil?
99source.get_upstream()122 vers=`khighestversion highest stable`
100source.update_changelog()123 source = Source.new(ARGV[0],"4:#{vers}","stable")
124 source.get_bzr()
125 source.get_upstream()
126 source.update_changelog()
127else
128 if ARGV[2].nil?
129 #TODO: make kgetsource autoguess the series
130 more
131 else
132 source = Source.new(ARGV[0], ARGV[1], ARGV[2])
133
134 source.get_bzr()
135 source.get_upstream()
136 source.update_changelog()
137 end
138end
101139
102140
=== added file 'bin/khighestversion'
--- bin/khighestversion 1970-01-01 00:00:00 +0000
+++ bin/khighestversion 2011-09-19 15:44:21 +0000
@@ -0,0 +1,132 @@
1#!/usr/bin/env ruby
2#--
3# Copyright (C) 2011 Jonathan Kolberg <bulldog98@kubuntu-de.org>
4#
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License as
7# published by the Free Software Foundation; either version 2 of
8# the License or (at your option) version 3 or any later version
9# accepted by the membership of KDE e.V. (or its successor approved
10# by the membership of KDE e.V.), which shall act as a proxy
11# defined in Section 14 of version 3 of the license.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#--
21
22class Versions
23 attr_reader :stable, :unstable, :versions, :highest, :higheststable, :result, :search, :name
24
25 def initialize(search,name)
26 @stable = []
27 tmp = `ssh ftpubuntu@ftpmaster.kde.org ls -c /home/ftpubuntu/stable/`
28 for i in tmp
29 if i =~ /^[1-9]\.[0-9]\.[0-9]/
30 stable << i
31 end
32 end
33 tmp2 = `ssh ftpubuntu@ftpmaster.kde.org ls -c /home/ftpubuntu/unstable/`
34 @unstable = []
35 for i in tmp2
36 if i =~ /^[1-9]\.[0-9]\.[0-9]/
37 unstable << i
38 end
39 end
40 @versions = []
41 @highest = "0.0.0"
42 @higheststable = "0.0.0"
43 @search = search + "\n"
44 @versions = stable + unstable
45 @name = name
46 end
47
48 def sort!()
49 versions.sort!
50 versions.reverse!
51 stable.sort!
52 stable.reverse!
53 unstable.sort!
54 unstable.reverse!
55 end
56
57 def higheststable!()
58 stable.sort!
59 @higheststable = stable.last
60 end
61
62 def path!
63 self.where!
64 if @result.nil?
65 puts("THIS VERSION DOESN'T EXIST")
66 exit(1)
67 end
68 path = "/home/ftpubuntu" + @result + "/" + @search + "/src/" + @name
69 puts
70 end
71
72 private
73 def where!()
74 if @stable.include?(@search)
75 @result = "stable"
76 else
77 if @unstable.include?(@search)
78 @result = "unstable"
79 end
80 end
81 end
82end
83
84if ARGV[0].nil?
85 puts("Y U NOT GIMME NARGS? :'(((((")
86 exit(1)
87end
88
89if ARGV[0] == "version"
90 v = Versions.new("","")
91 v.sort!
92 puts v.versions
93 exit(0)
94end
95
96if ARGV[0] == "highest"
97 if ARGV[1].nil?
98 puts("Y U NOT GIMME NARGS? :'(((((")
99 exit(1)
100 end
101 v = Versions.new("","")
102 v.sort!
103 if ARGV[1] == "all"
104 puts v.versions.first
105 exit(0)
106 end
107 if ARGV[1] == "stable"
108 puts v.stable.first
109 exit(0)
110 end
111 if ARGV[1] == "unstable"
112 puts v.unstable.first
113 exit(0)
114 end
115 puts ("Y U NOT GIMME RIGHT ARGS? :'((((")
116 exit(1)
117end
118
119if ARGV[0] == "path"
120 if ARGV[1].nil? || ARGV[2].nil?
121 puts("Y U NOT GIMME NARGS? :'(((((")
122 exit(1)
123 end
124 #kgetsource_helper path NAME VERSION
125 v = Versions.new(ARGS[2],ARGS[1])
126 v.path!
127end
128
129if ARGV[0]
130 puts("Y U NOT GIMME RIGHT ARGS? :'((((")
131 exit(1)
132end
0133
=== added file 'bin/kshowbranches'
--- bin/kshowbranches 1970-01-01 00:00:00 +0000
+++ bin/kshowbranches 2011-09-19 15:44:21 +0000
@@ -0,0 +1,31 @@
1#!/usr/bin/python
2#--
3# Copyright (C) 2011 Jonathan Kolberg <bulldog98@kubuntu-de.org>
4#
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License as
7# published by the Free Software Foundation; either version 2 of
8# the License or (at your option) version 3 or any later version
9# accepted by the membership of KDE e.V. (or its successor approved
10# by the membership of KDE e.V.), which shall act as a proxy
11# defined in Section 14 of version 3 of the license.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#--
21
22import sys
23from launchpadlib.launchpad import Launchpad
24
25lp = Launchpad.login_with('kshowbranches', 'production')
26
27team = lp.people['kubuntu-packagers']
28branches = team.getBranches()
29
30for branch in branches:
31 print branch.bzr_identity
0\ No newline at end of file32\ No newline at end of file
133
=== added file 'bin/kshowseries'
--- bin/kshowseries 1970-01-01 00:00:00 +0000
+++ bin/kshowseries 2011-09-19 15:44:21 +0000
@@ -0,0 +1,32 @@
1#!/usr/bin/python
2#--
3# Copyright (C) 2011 Jonathan Kolberg <bulldog98@kubuntu-de.org>
4#
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License as
7# published by the Free Software Foundation; either version 2 of
8# the License or (at your option) version 3 or any later version
9# accepted by the membership of KDE e.V. (or its successor approved
10# by the membership of KDE e.V.), which shall act as a proxy
11# defined in Section 14 of version 3 of the license.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#--
21
22import sys
23from launchpadlib.launchpad import Launchpad
24
25lp = Launchpad.login_with('kshowseries', 'production')
26
27ubuntu = lp.distributions["ubuntu"]
28series = ubuntu.series_collection_link
29
30for serie in ubuntu.series:
31 if serie.active:
32 print serie.name
0\ No newline at end of file33\ No newline at end of file
134
=== modified file 'debian/rules'
--- debian/rules 2008-12-10 08:49:19 +0000
+++ debian/rules 2011-09-19 15:44:21 +0000
@@ -20,6 +20,8 @@
20 dh_clean -k20 dh_clean -k
21 dh_installdirs21 dh_installdirs
22 ruby setup.rb install --prefix=$(CURDIR)/debian/kubuntu-dev-tools22 ruby setup.rb install --prefix=$(CURDIR)/debian/kubuntu-dev-tools
23 mkdir -p $(CURDIR)/debian/kubuntu-dev-tools/usr/share/zsh/functions/Completion/
24 cp zsh_completion/* $(CURDIR)/debian/kubuntu-dev-tools/usr/share/zsh/functions/Completion/
2325
24binary-indep: build install26binary-indep: build install
25 dh_testdir27 dh_testdir
2628
=== added directory 'zsh_completion'
=== added file 'zsh_completion/_astyle-kubuntu'
--- zsh_completion/_astyle-kubuntu 1970-01-01 00:00:00 +0000
+++ zsh_completion/_astyle-kubuntu 2011-09-19 15:44:21 +0000
@@ -0,0 +1,3 @@
1#compdef astyle-kubuntu
2
3_arguments "1: :."
0\ No newline at end of file4\ No newline at end of file
15
=== added file 'zsh_completion/_batpaste'
--- zsh_completion/_batpaste 1970-01-01 00:00:00 +0000
+++ zsh_completion/_batpaste 2011-09-19 15:44:21 +0000
@@ -0,0 +1,3 @@
1#compdef batpaste
2
3_arguments '1:file to paste:_files'
0\ No newline at end of file4\ No newline at end of file
15
=== added file 'zsh_completion/_kbranchmover'
--- zsh_completion/_kbranchmover 1970-01-01 00:00:00 +0000
+++ zsh_completion/_kbranchmover 2011-09-19 15:44:21 +0000
@@ -0,0 +1,2 @@
1#compdef kbranchmover
2_message "no more arguments"
0\ No newline at end of file3\ No newline at end of file
14
=== added file 'zsh_completion/_kbzr'
--- zsh_completion/_kbzr 1970-01-01 00:00:00 +0000
+++ zsh_completion/_kbzr 2011-09-19 15:44:21 +0000
@@ -0,0 +1,422 @@
1#compdef kbzr
2
3#This is a modified version of _bzr shipped with zsh
4
5local curcontext="$curcontext" state line expl cmd args ret=1
6typeset -A opt_args
7
8_arguments -C \
9 '1: :->cmd' \
10 '*:: :->args' && ret=0
11
12if (( ! $+_bzr_cmds )); then
13 typeset -gH _bzr_cmds
14 _bzr_cmds=(${(f)"$(_call_program bzr bzr shell-complete)"})
15fi
16
17if [[ $state != 'args' ]]; then
18 _describe -t subcommand 'subcommand' _bzr_cmds
19 return 0
20fi
21
22cmd="$words[1]"
23curcontext="${curcontext%:*:*}:bzr-$cmd:"
24
25(( $+functions[_bzr_unknownFiles] )) ||
26_bzr_unknownFiles() {
27 local fileList
28 fileList=(${(ps:\0:)"$(bzr ls --null --unknown)"})
29 compadd -af fileList
30 return 0
31}
32
33(( $+functions[_bzr_unknownRoot] )) ||
34_bzr_unknownRoot() {
35 local fileList
36 fileList=(${(ps:\0:)"$(bzr ls --null --from-root --unknown)"})
37 compadd -af fileList
38 return 0
39}
40
41(( $+functions[_bzr_versionedFiles] )) ||
42_bzr_versionedFiles() {
43 local fileList
44 fileList=(${(ps:\0:)"$(bzr ls --null --versioned)"})
45 compadd -af fileList
46 return 0
47}
48
49(( $+functions[_bzr_completeParents] )) ||
50_bzr_completeParents() {
51 local parentFile=$(bzr root 2>/dev/null)/.bzr/branch/parent
52 [[ -r $parentFile ]] && compadd -X "Completing parents" $(cat $parentFile)
53}
54
55(( $+functions[_kubuntu_completion] )) ||
56_kubuntu_completion() {
57 if ( [[ ${+_kubuntu_completion_cache_packages} -eq 0 ]] ||
58 _cache_invalid KUBUNTU_PACKAGES_CACHE) && ! _retrieve_cache KUBUNTU_PACKAGES_CACHE;
59 then
60 _kubuntu_completion_cache_packages=(
61 ${(f)"$(kshowbranches| grep "lp:~kubuntu-packagers/kubuntu-packaging/" |sed 's/lp:\~kubuntu-packagers\/kubuntu-packaging\///' 2>/dev/null)"}
62 )
63
64 _store_cache KUBUNTU_PACKAGES_CACHE _kubuntu_completion_cache_packages
65 fi
66 typeset -gH _kubuntu_completion_cache_packages
67
68 compadd -x "branch name" -a _kubuntu_completion_cache_packages
69}
70
71args=( '(-)'{--help,-h}'[show help message]' )
72
73case $cmd in
74(add)
75 args+=(
76 '--dry-run[show what would be added without adding anything]'
77 '--no-recurse[do not recurse into subdirectories]'
78 '(-q --quiet -v --verbose)'{--quiet,-q}'[be quiet]'
79 '(-v --verbose -q --quiet)'{--verbose,-v}'[display more information]'
80 '*:unknown files:_bzr_unknownFiles'
81 )
82 ;;
83
84(annotate|blame|praise)
85 args+=(
86 '--all[show annotations on all lines]'
87 '--long[show date in annotations]'
88 '(-r --revision)'{--revision=,-r}'[the revision to show]:rev:'
89 '*:files:_bzr_versionedFiles'
90 )
91 ;;
92
93(branch|get|clone)
94 args+=(
95 '(-r --revision)'{--revision=,-r}'[the revision to get]:rev:'
96 '--basis=[specify basis branch]:basis:'
97 )
98 if (( CURRENT == 2 )); then
99 args+=( '*:FROM_LOCATION:_kubuntu_completion' )
100 elif (( CURRENT == 3 )); then
101 args+=( '*:TO_LOCATION:_files -/' )
102 fi
103 ;;
104
105(checkout|co)
106 args+=(
107 '--lightweight[perform a lightweight checkout]'
108 '(-r --revision)'{--revision=,-r}'[the revision to get]:rev:'
109 _kubuntu_completion
110 )
111 ;;
112
113(rename|move|mv)
114 if (( CURRENT == 2 )); then
115 args+=( '*:files:_bzr_versionedFiles' )
116 else
117 args=( '*:destination dir:_files -/' )
118 fi
119 ;;
120
121(cat)
122 args+=(
123 '(-r --revision)'{--revision=,-r}'[revision]:rev:'
124 '*:file:_bzr_versionedFiles'
125 )
126 ;;
127
128(root)
129 args+=( '*:file:_files' )
130 ;;
131
132(log)
133 args+=(
134 '--forward[reverse direction of revisions]'
135 '(-l --long --short --log_format)--line[use log format with one line per revision. Same as "--log-format line"]'
136 '(-l --long --short --line)--log-format=[use the specified log format]:log format:(line short long)'
137 '(-l --long --short --line --log-format)'{--long,-l}'[use detailed log format. Same as "--log-format long"]'
138 '(-l --long --log_format)--short[use moderately short log format. Same as "--log-format short"]'
139 '(-m --message)'{--message=,-m}'[specify regexp]:regexp:'
140 '(-r --revision)'{--revision=,-r}'[revision or range]:rev or rev range:'
141 '--show-ids[show file IDs]'
142 '--timezone=[specify timezone for dates]:timezone:'
143 '(-v --verbose)'{--verbose,-v}'[show revision manifest]'
144 '*:file:_bzr_versionedFiles'
145 )
146 ;;
147
148(resolve|resolved)
149 args+=(
150 '--all[resolve all conflicts in this tree]'
151 '*:file:_bzr_versionedFiles'
152 )
153 ;;
154
155(status|st|stat)
156 args+=(
157 '--all[include unchanged versioned files]'
158 '(-r --revision)'{--revision=,-r}'[compare working tree with revision]:revision:'
159 '--show-ids[show file IDs]'
160 '*:file:_bzr_versionedFiles'
161 )
162 ;;
163
164(check)
165 args+=(
166 '(-v --verbose)'{--verbose,-v}'[display more information]'
167 '*:DIR:_files -/'
168 )
169 ;;
170
171(mkdir|renames|update)
172 args+=( '*:DIR:_files -/' )
173 ;;
174
175(init|upgrade)
176 args+=(
177 '--format=[format for repository]:format:(default knit metaweave weave)'
178 '*:DIR:_files -/'
179 )
180 ;;
181
182(init-repo|init-repository)
183 args+=(
184 '--format=[format for repository]:format:(default knit metaweave weave)'
185 '--trees[allows branches in repository to have a working tree]'
186 '*:DIR:_files -/'
187 )
188 ;;
189
190(remove|rm)
191 args+=(
192 '(-v --verbose)'{--verbose,-v}'[display more information]'
193 '*:file:_bzr_versionedFiles'
194 )
195 ;;
196
197(pull)
198 args+=(
199 '--overwrite[ignore differences, overwrite unconditionally]'
200 '--remember[remember the specified location as a default]'
201 '(-r --revision)'{--revision=,-r}'[get a particular revision]:revision:'
202 '(-v --verbose)'{--verbose,-v}'[display more information]'
203 '*:local repository:_files -/'
204 )
205 _bzr_completeParents
206 ;;
207
208(missing)
209 args+=(
210 '(-l --long --short --log_format)--line[use log format with one line per revision. Same as "--log-format line"]'
211 '(-l --long --short --line)--log-format=[use the specified log format]:log format:(line short long)'
212 '(-l --long --short --line --log-format)'{--long,-l}'[use detailed log format. Same as "--log-format long"]'
213 '(-l --long --log_format)--short[use moderately short log format. Same as "--log-format short"]'
214 '--mine-only[display changes in the local branch only]'
215 '--reverse[reverse the order of revisions]'
216 '--show-ids[show internal object ids]'
217 '--theirs-only[display changes in the remote branch only]'
218 '(-v --verbose)'{--verbose,-v}'[display more information]'
219 '*:local repository:_files -/'
220 )
221 _bzr_completeParents
222 ;;
223
224(commit|checkin|ci)
225 args+=(
226 '(-F --file)'{--file=,-F}'[commit message from file]:message file:'
227 '--local[perform a local only commit in a bound branch]'
228 '(-m --message)'{--message=,-m}'[commit message]:message text:'
229 '--strict[refuse to commit if there are unknown files]'
230 '--unchanged[include unchanged files]'
231 '(-q --quiet -v --verbose)'{--quiet,-q}'[be quiet]'
232 '(-v --verbose -q --quiet)'{--verbose,-v}'[display more information]'
233 '*:modified files:_bzr_versionedFiles'
234 )
235 ;;
236
237(bind|break-lock|reconcile)
238 _bzr_completeParents
239 ;;
240
241(register-branch)
242 args+=(
243 '--author=[email of the branch author, if not you]:email:'
244 '--branch-description=[longer description of the branch]:description:'
245 '--branch-name=[short name for the branch]:name:'
246 '--branch-title=[one-sentence description of the branch]:title:'
247 '--dry-run[prepare the request but do not actually send it]'
248 '--link-bug=[the bug this branch fixes]:bug-ID:'
249 '--product=[launchpad product short name to associate with the branch]:product:'
250 )
251 _bzr_completeParents
252 ;;
253
254(remerge)
255 args+=(
256 '--merge-type=[the type of the merge]:type:'
257 '--reprocess[reprocess to reduce spurious conflicts]'
258 '--show-base[show base revision text in conflicts]'
259 )
260 _bzr_completeParents
261 ;;
262
263(conflicts|added|deleted|modified|unknowns|directories|ignored|unbind|nick|revno|version)
264 ;;
265
266(whoami)
267 args+=( '--email[only show e-mail address]' )
268 ;;
269
270(inventory)
271 args+=(
272 '--kind=[limit output by type]:kind:(file directory symlink)'
273 '(-r --revision)'{--revision=,-r}'[show inventory of a revision]:revision:'
274 '--show-ids[show file IDs]'
275 )
276 ;;
277
278(diff|dif|di)
279 args+=(
280 '(-r --revision)'{--revision=,-r}'[revision]:revision:'
281 '--diff-options=[options to pass to gdiff]:diff options:'
282 '(-p --prefix)'{--prefix,-p}'[set prefix added to old and new filenames]'
283 '*:files:_files'
284 )
285 ;;
286
287(export)
288 args+=(
289 '(-r --revision)'{--revision=,-r}'[revision]:revision:'
290 '--format=[format of exported file]:format:(dir tar tgz tbz2)'
291 '--root=[root directory of patch]:_files -/'
292 '*:destination:_files'
293 )
294 ;;
295
296(ignore)
297 args+=( '*:NAME_PATTERN:_bzr_unknownRoot' )
298 ;;
299
300(info)
301 args+=(
302 '(-v --verbose)'{--verbose,-v}'[display more information]'
303 '*:branch:_files -/'
304 )
305 ;;
306
307(testament)
308 args+=(
309 '(-l --long)'{--long,-l}'[use long format]'
310 '(-r --revision)'{--revision=,-r}'[revision]:revision:'
311 '*:branch:_files -/'
312 )
313 ;;
314
315(revert|merge-revert)
316 args+=(
317 '--no-backup[skip generation of backup~ files]'
318 '(-r --revision)'{--revision=,-r}'[revision]:revision:'
319 '*:file:_bzr_versionedFiles'
320 )
321 ;;
322
323(merge)
324 args+=(
325 '--force[ignore uncommitted changes]'
326 '--merge-type:merge type:(diff3 merge3 weave)'
327 '--remember[remember the specified location as a default]'
328 '--reprocess[reprocess to reduce spurious conflicts]'
329 '(-r --revision)'{--revision=,-r}'[revision]:revision:'
330 '--show-base[show base revision text in conflicts]'
331 '*:local repository:_files -/'
332 )
333 _bzr_completeParents
334 ;;
335
336(ls)
337 args+=(
338 '(-q --quiet -v --verbose)'{--quiet,-q}'[be quiet]'
339 '(-v --verbose -q --quiet)'{--verbose,-v}'[display more information]'
340 '(-r --revision)'{--revision=,-r}'[revision]:revision:'
341 '--from-root[print all paths from the root of the branch]'
342 '--non-recursive[do not recurse into subdirectories]'
343 '--null[null separate the files]'
344 '--ignored[print ignored files]'
345 '--unknown[print unknown files]'
346 '--versioned[print versioned files]'
347 )
348 ;;
349
350(switch)
351 args+=(
352 '--force[switch even if local commits will be lost]'
353 '(-q --quiet -v --verbose)'{--quiet,-q}'[be quiet]'
354 '(-v --verbose -q --quiet)'{--verbose,-v}'[display more information]'
355 '*:local repository:_files -/'
356 )
357 _bzr_completeParents
358 ;;
359
360(help)
361 args=(
362 '(-l --long)'{--long,-l}'[use long format]'
363 '*:subcmds:->cmds'
364 )
365 _arguments -s "$args[@]" && ret=0
366 _describe -t subcommand 'subcommand' _bzr_cmds
367 return 0
368 ;;
369
370 # Plugins
371
372(visualize|visualise|viz|vis)
373 args+=( '(-r --revision)'{--revision=,-r}'[starting revision]:rev:' )
374 ;;
375
376(gannotate|gblame|gpraise)
377 args+=(
378 '--all[show annotations on all lines]'
379 '--plain[do not hightlight annotation lines]'
380 '*:files:_bzr_versionedFiles'
381 )
382 ;;
383
384(push)
385 args+=(
386 '--create-prefix[create the path leading up to the branch when missing]'
387 '--overwrite[ignore differences, overwrite unconditionally]'
388 '--remember[remember the specified location as a default]'
389 '*:local repository:_files -/'
390 )
391 _bzr_completeParents
392 ;;
393
394(clean-tree)
395 args+=(
396 '--dry-run[show files to delete instead of deleting them]'
397 '--ignored[delete all ignored files]'
398 '--detritus[delete conflict files, merge backups, failed self-tests, *~, *.tmp, etc]'
399 )
400 ;;
401
402(uncommit)
403 args+=(
404 '--dry-run[do not make any changes]'
405 '--force[say "yes" to all questions]'
406 '(-r --revision)'{--revision=,-r}'[the earliest revision to delete]:rev:'
407 '(-v --verbose)'{--verbose,-v}'[display more information]'
408 )
409 ;;
410
411(sign-my-commits)
412 args+=( '--dry-run[do not actually sign anything]' )
413 ;;
414
415(*)
416 _message "unknown bzr command completion: $cmd"
417 return 1
418 ;;
419esac
420
421_arguments -s "$args[@]" && ret=0
422return $ret
0\ No newline at end of file423\ No newline at end of file
1424
=== added file 'zsh_completion/_kde-sc-build-status'
--- zsh_completion/_kde-sc-build-status 1970-01-01 00:00:00 +0000
+++ zsh_completion/_kde-sc-build-status 2011-09-19 15:44:21 +0000
@@ -0,0 +1,2 @@
1#compdef kde-sc-build-status
2_message "no more arguments"
0\ No newline at end of file3\ No newline at end of file
14
=== added file 'zsh_completion/_kgetsource'
--- zsh_completion/_kgetsource 1970-01-01 00:00:00 +0000
+++ zsh_completion/_kgetsource 2011-09-19 15:44:21 +0000
@@ -0,0 +1,48 @@
1#compdef kgetsource
2#_arguments '1:name of the package:_getpackages' '2:version of the package:_print_valid_version' '3:series:_series'
3function _name() {
4
5 #TODO: do something with following: ssh ftpubuntu@ftpmaster.kde.org ls -c /home/ftpubuntu/stable/4.7.0/src/
6 if ( [[ ${+_kubuntu_completion_cache_packages} -eq 0 ]] ||
7 _cache_invalid KUBUNTU_PACKAGES_CACHE) && ! _retrieve_cache KUBUNTU_PACKAGES_CACHE;
8 then
9 _kubuntu_completion_cache_packages=(
10 ${(f)"$(kshowbranches| grep "lp:~kubuntu-packagers/kubuntu-packaging/" |sed 's/lp:\~kubuntu-packagers\/kubuntu-packaging\///' 2>/dev/null)"}
11 )
12
13 _store_cache KUBUNTU_PACKAGES_CACHE _kubuntu_completion_cache_packages
14 fi
15 typeset -gH _kubuntu_completion_cache_packages
16
17 compadd -a _kubuntu_completion_cache_packages
18}
19
20function _version() {
21 if ( [[ ${+_kubuntu_completion_cache_versions} -eq 0 ]] ||
22 _cache_invalid KUBUNTU_VERSIONS_CACHE) && ! _retrieve_cache KUBUNTU_VERSIONS_CACHE;
23 then
24 _kubuntu_completion_cache_versions=(
25 ${(f)"$(khighestversion highest stable)"} ${(f)"$(khighestversion highest unstable)"}
26 )
27
28 _store_cache KUBUNTU_VERSIONS_CACHE _kubuntu_completion_cache_versions
29 fi
30 typeset -gH _kubuntu_completion_cache_versions
31
32 compadd -a _kubuntu_completion_cache_versions
33}
34
35function _series() {
36 #do something with words[CURRENT-1]
37 echo words[CURRENT-1]
38 __series=('unstable' 'stable')
39 typeset -gH __series
40 compadd -a __series
41}
42
43local ret=1
44_arguments \
45 ':package name:_name' \
46 ':version:_version' \
47 ':series:_series' && ret=0
48return ret
0\ No newline at end of file49\ No newline at end of file
150
=== added file 'zsh_completion/_klinksource'
--- zsh_completion/_klinksource 1970-01-01 00:00:00 +0000
+++ zsh_completion/_klinksource 2011-09-19 15:44:21 +0000
@@ -0,0 +1,5 @@
1#compdef klinksource
2
3#TODO: make it work
4
5_arguments "1:tar to link:_files -g '*-?*.tar.(gz|bz2|xz|lzma)'"
0\ No newline at end of file6\ No newline at end of file
17
=== added file 'zsh_completion/_kshowbranches'
--- zsh_completion/_kshowbranches 1970-01-01 00:00:00 +0000
+++ zsh_completion/_kshowbranches 2011-09-19 15:44:21 +0000
@@ -0,0 +1,2 @@
1#compdef kshowbranches
2_message "no more arguments"
0\ No newline at end of file3\ No newline at end of file
14
=== added file 'zsh_completion/_kshowseries'
--- zsh_completion/_kshowseries 1970-01-01 00:00:00 +0000
+++ zsh_completion/_kshowseries 2011-09-19 15:44:21 +0000
@@ -0,0 +1,2 @@
1#compdef kshowseries
2_message "no more arguments"
0\ No newline at end of file3\ No newline at end of file
14
=== added file 'zsh_completion/_kubuntu-update-symbols'
--- zsh_completion/_kubuntu-update-symbols 1970-01-01 00:00:00 +0000
+++ zsh_completion/_kubuntu-update-symbols 2011-09-19 15:44:21 +0000
@@ -0,0 +1,2 @@
1#compdef kubuntu-update-symbols
2_message "no more arguments"
0\ No newline at end of file3\ No newline at end of file

Subscribers

People subscribed via source and target branches