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
1=== modified file 'TODO'
2--- TODO 2009-01-13 13:29:10 +0000
3+++ TODO 2011-09-19 15:44:21 +0000
4@@ -1,6 +1,5 @@
5-* Add docbook for kubuntu-dev-tools (meta manpage for batscripts and gypsy)
6+* Add docbook for kubuntu-dev-tools
7 * Add readme
8-* Test centering around batbranch
9 * Don't bundle but push
10 * Maybe use bzr-builddeb?
11 + either way batbuild needs an option to just export the debian dir (e.g. for
12
13=== modified file 'bin/kgetsource'
14--- bin/kgetsource 2011-07-23 17:52:56 +0000
15+++ bin/kgetsource 2011-09-19 15:44:21 +0000
16@@ -1,6 +1,7 @@
17 #!/usr/bin/env ruby
18 #--
19 # Copyright (C) 2011 Harald Sitter <apachelogger@ubuntu.com>
20+# Copyright (C) 2011 Jonathan Kolberg <bulldog98@kubuntu.org>
21 #
22 # This program is free software; you can redistribute it and/or
23 # modify it under the terms of the GNU General Public License as
24@@ -33,6 +34,7 @@
25 if split_version.length > 1
26 return split_version[1]
27 end
28+ #TODO: test for \n and remove that
29 return @version
30 end
31 end
32@@ -79,23 +81,59 @@
33 if not File.exists?("build-area")
34 Dir.mkdir("build-area")
35 end
36+ puts ("scp ftpubuntu@ftpmaster.kde.org:/home/ftpubuntu/#{series}/#{version.upstream_version}/src/#{tar.name} build-area/")
37 `scp ftpubuntu@ftpmaster.kde.org:/home/ftpubuntu/#{series}/#{version.upstream_version}/src/#{tar.name} build-area/`
38 `cd build-area && ln -s #{tar.name} #{tar.orig_name}`
39 end
40
41 def update_changelog()
42- `cd #{name} && dch -v #{version.version}-0ubuntu1 -D UNRELEASED 'New upstream release'`
43+ #if @version.version = @version.upstream_version
44+ `cd #{name} && dch -v '4:#{version.upstream_version}-0ubuntu1' -D UNRELEASED 'New upstream release'`
45+ #else
46+ # `cd #{name} && dch -v #{version.version}-0ubuntu1 -D UNRELEASED 'New upstream release'`
47+ #end
48+ def stringReplace(fileName)
49+ aFile = File.open(fileName, "r")
50+ aString = aFile.read
51+ aFile.close
52+
53+ left = "kde-sc-dev-latest (>= "
54+ right = ")"
55+
56+ aString.gsub!(/#{Regexp.quote(left)}(.*?)#{Regexp.quote(right)}/m,
57+ "#{left}#{"4:"+@version.upstream_version}#{right}")
58+
59+ File.open(fileName, "w") { |file| file << aString }
60+ end
61+ stringReplace(@name+"/debian/control")
62 end
63 end
64
65-if ARGV[0].nil? or ARGV[1].nil? or ARGV[2].nil?
66+def more()
67 puts("NEED MORE ARGS YE BSTD")
68 exit(1)
69 end
70
71-source = Source.new(ARGV[0], ARGV[1], ARGV[2])
72+if ARGV[0].nil?
73+ more
74+end
75
76-source.get_bzr()
77-source.get_upstream()
78-source.update_changelog()
79+if ARGV[1].nil?
80+ vers=`khighestversion highest stable`
81+ source = Source.new(ARGV[0],"4:#{vers}","stable")
82+ source.get_bzr()
83+ source.get_upstream()
84+ source.update_changelog()
85+else
86+ if ARGV[2].nil?
87+ #TODO: make kgetsource autoguess the series
88+ more
89+ else
90+ source = Source.new(ARGV[0], ARGV[1], ARGV[2])
91+
92+ source.get_bzr()
93+ source.get_upstream()
94+ source.update_changelog()
95+ end
96+end
97
98
99=== added file 'bin/khighestversion'
100--- bin/khighestversion 1970-01-01 00:00:00 +0000
101+++ bin/khighestversion 2011-09-19 15:44:21 +0000
102@@ -0,0 +1,132 @@
103+#!/usr/bin/env ruby
104+#--
105+# Copyright (C) 2011 Jonathan Kolberg <bulldog98@kubuntu-de.org>
106+#
107+# This program is free software; you can redistribute it and/or
108+# modify it under the terms of the GNU General Public License as
109+# published by the Free Software Foundation; either version 2 of
110+# the License or (at your option) version 3 or any later version
111+# accepted by the membership of KDE e.V. (or its successor approved
112+# by the membership of KDE e.V.), which shall act as a proxy
113+# defined in Section 14 of version 3 of the license.
114+#
115+# This program is distributed in the hope that it will be useful,
116+# but WITHOUT ANY WARRANTY; without even the implied warranty of
117+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
118+# GNU General Public License for more details.
119+#
120+# You should have received a copy of the GNU General Public License
121+# along with this program. If not, see <http://www.gnu.org/licenses/>.
122+#--
123+
124+class Versions
125+ attr_reader :stable, :unstable, :versions, :highest, :higheststable, :result, :search, :name
126+
127+ def initialize(search,name)
128+ @stable = []
129+ tmp = `ssh ftpubuntu@ftpmaster.kde.org ls -c /home/ftpubuntu/stable/`
130+ for i in tmp
131+ if i =~ /^[1-9]\.[0-9]\.[0-9]/
132+ stable << i
133+ end
134+ end
135+ tmp2 = `ssh ftpubuntu@ftpmaster.kde.org ls -c /home/ftpubuntu/unstable/`
136+ @unstable = []
137+ for i in tmp2
138+ if i =~ /^[1-9]\.[0-9]\.[0-9]/
139+ unstable << i
140+ end
141+ end
142+ @versions = []
143+ @highest = "0.0.0"
144+ @higheststable = "0.0.0"
145+ @search = search + "\n"
146+ @versions = stable + unstable
147+ @name = name
148+ end
149+
150+ def sort!()
151+ versions.sort!
152+ versions.reverse!
153+ stable.sort!
154+ stable.reverse!
155+ unstable.sort!
156+ unstable.reverse!
157+ end
158+
159+ def higheststable!()
160+ stable.sort!
161+ @higheststable = stable.last
162+ end
163+
164+ def path!
165+ self.where!
166+ if @result.nil?
167+ puts("THIS VERSION DOESN'T EXIST")
168+ exit(1)
169+ end
170+ path = "/home/ftpubuntu" + @result + "/" + @search + "/src/" + @name
171+ puts
172+ end
173+
174+ private
175+ def where!()
176+ if @stable.include?(@search)
177+ @result = "stable"
178+ else
179+ if @unstable.include?(@search)
180+ @result = "unstable"
181+ end
182+ end
183+ end
184+end
185+
186+if ARGV[0].nil?
187+ puts("Y U NOT GIMME NARGS? :'(((((")
188+ exit(1)
189+end
190+
191+if ARGV[0] == "version"
192+ v = Versions.new("","")
193+ v.sort!
194+ puts v.versions
195+ exit(0)
196+end
197+
198+if ARGV[0] == "highest"
199+ if ARGV[1].nil?
200+ puts("Y U NOT GIMME NARGS? :'(((((")
201+ exit(1)
202+ end
203+ v = Versions.new("","")
204+ v.sort!
205+ if ARGV[1] == "all"
206+ puts v.versions.first
207+ exit(0)
208+ end
209+ if ARGV[1] == "stable"
210+ puts v.stable.first
211+ exit(0)
212+ end
213+ if ARGV[1] == "unstable"
214+ puts v.unstable.first
215+ exit(0)
216+ end
217+ puts ("Y U NOT GIMME RIGHT ARGS? :'((((")
218+ exit(1)
219+end
220+
221+if ARGV[0] == "path"
222+ if ARGV[1].nil? || ARGV[2].nil?
223+ puts("Y U NOT GIMME NARGS? :'(((((")
224+ exit(1)
225+ end
226+ #kgetsource_helper path NAME VERSION
227+ v = Versions.new(ARGS[2],ARGS[1])
228+ v.path!
229+end
230+
231+if ARGV[0]
232+ puts("Y U NOT GIMME RIGHT ARGS? :'((((")
233+ exit(1)
234+end
235
236=== added file 'bin/kshowbranches'
237--- bin/kshowbranches 1970-01-01 00:00:00 +0000
238+++ bin/kshowbranches 2011-09-19 15:44:21 +0000
239@@ -0,0 +1,31 @@
240+#!/usr/bin/python
241+#--
242+# Copyright (C) 2011 Jonathan Kolberg <bulldog98@kubuntu-de.org>
243+#
244+# This program is free software; you can redistribute it and/or
245+# modify it under the terms of the GNU General Public License as
246+# published by the Free Software Foundation; either version 2 of
247+# the License or (at your option) version 3 or any later version
248+# accepted by the membership of KDE e.V. (or its successor approved
249+# by the membership of KDE e.V.), which shall act as a proxy
250+# defined in Section 14 of version 3 of the license.
251+#
252+# This program is distributed in the hope that it will be useful,
253+# but WITHOUT ANY WARRANTY; without even the implied warranty of
254+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
255+# GNU General Public License for more details.
256+#
257+# You should have received a copy of the GNU General Public License
258+# along with this program. If not, see <http://www.gnu.org/licenses/>.
259+#--
260+
261+import sys
262+from launchpadlib.launchpad import Launchpad
263+
264+lp = Launchpad.login_with('kshowbranches', 'production')
265+
266+team = lp.people['kubuntu-packagers']
267+branches = team.getBranches()
268+
269+for branch in branches:
270+ print branch.bzr_identity
271\ No newline at end of file
272
273=== added file 'bin/kshowseries'
274--- bin/kshowseries 1970-01-01 00:00:00 +0000
275+++ bin/kshowseries 2011-09-19 15:44:21 +0000
276@@ -0,0 +1,32 @@
277+#!/usr/bin/python
278+#--
279+# Copyright (C) 2011 Jonathan Kolberg <bulldog98@kubuntu-de.org>
280+#
281+# This program is free software; you can redistribute it and/or
282+# modify it under the terms of the GNU General Public License as
283+# published by the Free Software Foundation; either version 2 of
284+# the License or (at your option) version 3 or any later version
285+# accepted by the membership of KDE e.V. (or its successor approved
286+# by the membership of KDE e.V.), which shall act as a proxy
287+# defined in Section 14 of version 3 of the license.
288+#
289+# This program is distributed in the hope that it will be useful,
290+# but WITHOUT ANY WARRANTY; without even the implied warranty of
291+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
292+# GNU General Public License for more details.
293+#
294+# You should have received a copy of the GNU General Public License
295+# along with this program. If not, see <http://www.gnu.org/licenses/>.
296+#--
297+
298+import sys
299+from launchpadlib.launchpad import Launchpad
300+
301+lp = Launchpad.login_with('kshowseries', 'production')
302+
303+ubuntu = lp.distributions["ubuntu"]
304+series = ubuntu.series_collection_link
305+
306+for serie in ubuntu.series:
307+ if serie.active:
308+ print serie.name
309\ No newline at end of file
310
311=== modified file 'debian/rules'
312--- debian/rules 2008-12-10 08:49:19 +0000
313+++ debian/rules 2011-09-19 15:44:21 +0000
314@@ -20,6 +20,8 @@
315 dh_clean -k
316 dh_installdirs
317 ruby setup.rb install --prefix=$(CURDIR)/debian/kubuntu-dev-tools
318+ mkdir -p $(CURDIR)/debian/kubuntu-dev-tools/usr/share/zsh/functions/Completion/
319+ cp zsh_completion/* $(CURDIR)/debian/kubuntu-dev-tools/usr/share/zsh/functions/Completion/
320
321 binary-indep: build install
322 dh_testdir
323
324=== added directory 'zsh_completion'
325=== added file 'zsh_completion/_astyle-kubuntu'
326--- zsh_completion/_astyle-kubuntu 1970-01-01 00:00:00 +0000
327+++ zsh_completion/_astyle-kubuntu 2011-09-19 15:44:21 +0000
328@@ -0,0 +1,3 @@
329+#compdef astyle-kubuntu
330+
331+_arguments "1: :."
332\ No newline at end of file
333
334=== added file 'zsh_completion/_batpaste'
335--- zsh_completion/_batpaste 1970-01-01 00:00:00 +0000
336+++ zsh_completion/_batpaste 2011-09-19 15:44:21 +0000
337@@ -0,0 +1,3 @@
338+#compdef batpaste
339+
340+_arguments '1:file to paste:_files'
341\ No newline at end of file
342
343=== added file 'zsh_completion/_kbranchmover'
344--- zsh_completion/_kbranchmover 1970-01-01 00:00:00 +0000
345+++ zsh_completion/_kbranchmover 2011-09-19 15:44:21 +0000
346@@ -0,0 +1,2 @@
347+#compdef kbranchmover
348+_message "no more arguments"
349\ No newline at end of file
350
351=== added file 'zsh_completion/_kbzr'
352--- zsh_completion/_kbzr 1970-01-01 00:00:00 +0000
353+++ zsh_completion/_kbzr 2011-09-19 15:44:21 +0000
354@@ -0,0 +1,422 @@
355+#compdef kbzr
356+
357+#This is a modified version of _bzr shipped with zsh
358+
359+local curcontext="$curcontext" state line expl cmd args ret=1
360+typeset -A opt_args
361+
362+_arguments -C \
363+ '1: :->cmd' \
364+ '*:: :->args' && ret=0
365+
366+if (( ! $+_bzr_cmds )); then
367+ typeset -gH _bzr_cmds
368+ _bzr_cmds=(${(f)"$(_call_program bzr bzr shell-complete)"})
369+fi
370+
371+if [[ $state != 'args' ]]; then
372+ _describe -t subcommand 'subcommand' _bzr_cmds
373+ return 0
374+fi
375+
376+cmd="$words[1]"
377+curcontext="${curcontext%:*:*}:bzr-$cmd:"
378+
379+(( $+functions[_bzr_unknownFiles] )) ||
380+_bzr_unknownFiles() {
381+ local fileList
382+ fileList=(${(ps:\0:)"$(bzr ls --null --unknown)"})
383+ compadd -af fileList
384+ return 0
385+}
386+
387+(( $+functions[_bzr_unknownRoot] )) ||
388+_bzr_unknownRoot() {
389+ local fileList
390+ fileList=(${(ps:\0:)"$(bzr ls --null --from-root --unknown)"})
391+ compadd -af fileList
392+ return 0
393+}
394+
395+(( $+functions[_bzr_versionedFiles] )) ||
396+_bzr_versionedFiles() {
397+ local fileList
398+ fileList=(${(ps:\0:)"$(bzr ls --null --versioned)"})
399+ compadd -af fileList
400+ return 0
401+}
402+
403+(( $+functions[_bzr_completeParents] )) ||
404+_bzr_completeParents() {
405+ local parentFile=$(bzr root 2>/dev/null)/.bzr/branch/parent
406+ [[ -r $parentFile ]] && compadd -X "Completing parents" $(cat $parentFile)
407+}
408+
409+(( $+functions[_kubuntu_completion] )) ||
410+_kubuntu_completion() {
411+ if ( [[ ${+_kubuntu_completion_cache_packages} -eq 0 ]] ||
412+ _cache_invalid KUBUNTU_PACKAGES_CACHE) && ! _retrieve_cache KUBUNTU_PACKAGES_CACHE;
413+ then
414+ _kubuntu_completion_cache_packages=(
415+ ${(f)"$(kshowbranches| grep "lp:~kubuntu-packagers/kubuntu-packaging/" |sed 's/lp:\~kubuntu-packagers\/kubuntu-packaging\///' 2>/dev/null)"}
416+ )
417+
418+ _store_cache KUBUNTU_PACKAGES_CACHE _kubuntu_completion_cache_packages
419+ fi
420+ typeset -gH _kubuntu_completion_cache_packages
421+
422+ compadd -x "branch name" -a _kubuntu_completion_cache_packages
423+}
424+
425+args=( '(-)'{--help,-h}'[show help message]' )
426+
427+case $cmd in
428+(add)
429+ args+=(
430+ '--dry-run[show what would be added without adding anything]'
431+ '--no-recurse[do not recurse into subdirectories]'
432+ '(-q --quiet -v --verbose)'{--quiet,-q}'[be quiet]'
433+ '(-v --verbose -q --quiet)'{--verbose,-v}'[display more information]'
434+ '*:unknown files:_bzr_unknownFiles'
435+ )
436+ ;;
437+
438+(annotate|blame|praise)
439+ args+=(
440+ '--all[show annotations on all lines]'
441+ '--long[show date in annotations]'
442+ '(-r --revision)'{--revision=,-r}'[the revision to show]:rev:'
443+ '*:files:_bzr_versionedFiles'
444+ )
445+ ;;
446+
447+(branch|get|clone)
448+ args+=(
449+ '(-r --revision)'{--revision=,-r}'[the revision to get]:rev:'
450+ '--basis=[specify basis branch]:basis:'
451+ )
452+ if (( CURRENT == 2 )); then
453+ args+=( '*:FROM_LOCATION:_kubuntu_completion' )
454+ elif (( CURRENT == 3 )); then
455+ args+=( '*:TO_LOCATION:_files -/' )
456+ fi
457+ ;;
458+
459+(checkout|co)
460+ args+=(
461+ '--lightweight[perform a lightweight checkout]'
462+ '(-r --revision)'{--revision=,-r}'[the revision to get]:rev:'
463+ _kubuntu_completion
464+ )
465+ ;;
466+
467+(rename|move|mv)
468+ if (( CURRENT == 2 )); then
469+ args+=( '*:files:_bzr_versionedFiles' )
470+ else
471+ args=( '*:destination dir:_files -/' )
472+ fi
473+ ;;
474+
475+(cat)
476+ args+=(
477+ '(-r --revision)'{--revision=,-r}'[revision]:rev:'
478+ '*:file:_bzr_versionedFiles'
479+ )
480+ ;;
481+
482+(root)
483+ args+=( '*:file:_files' )
484+ ;;
485+
486+(log)
487+ args+=(
488+ '--forward[reverse direction of revisions]'
489+ '(-l --long --short --log_format)--line[use log format with one line per revision. Same as "--log-format line"]'
490+ '(-l --long --short --line)--log-format=[use the specified log format]:log format:(line short long)'
491+ '(-l --long --short --line --log-format)'{--long,-l}'[use detailed log format. Same as "--log-format long"]'
492+ '(-l --long --log_format)--short[use moderately short log format. Same as "--log-format short"]'
493+ '(-m --message)'{--message=,-m}'[specify regexp]:regexp:'
494+ '(-r --revision)'{--revision=,-r}'[revision or range]:rev or rev range:'
495+ '--show-ids[show file IDs]'
496+ '--timezone=[specify timezone for dates]:timezone:'
497+ '(-v --verbose)'{--verbose,-v}'[show revision manifest]'
498+ '*:file:_bzr_versionedFiles'
499+ )
500+ ;;
501+
502+(resolve|resolved)
503+ args+=(
504+ '--all[resolve all conflicts in this tree]'
505+ '*:file:_bzr_versionedFiles'
506+ )
507+ ;;
508+
509+(status|st|stat)
510+ args+=(
511+ '--all[include unchanged versioned files]'
512+ '(-r --revision)'{--revision=,-r}'[compare working tree with revision]:revision:'
513+ '--show-ids[show file IDs]'
514+ '*:file:_bzr_versionedFiles'
515+ )
516+ ;;
517+
518+(check)
519+ args+=(
520+ '(-v --verbose)'{--verbose,-v}'[display more information]'
521+ '*:DIR:_files -/'
522+ )
523+ ;;
524+
525+(mkdir|renames|update)
526+ args+=( '*:DIR:_files -/' )
527+ ;;
528+
529+(init|upgrade)
530+ args+=(
531+ '--format=[format for repository]:format:(default knit metaweave weave)'
532+ '*:DIR:_files -/'
533+ )
534+ ;;
535+
536+(init-repo|init-repository)
537+ args+=(
538+ '--format=[format for repository]:format:(default knit metaweave weave)'
539+ '--trees[allows branches in repository to have a working tree]'
540+ '*:DIR:_files -/'
541+ )
542+ ;;
543+
544+(remove|rm)
545+ args+=(
546+ '(-v --verbose)'{--verbose,-v}'[display more information]'
547+ '*:file:_bzr_versionedFiles'
548+ )
549+ ;;
550+
551+(pull)
552+ args+=(
553+ '--overwrite[ignore differences, overwrite unconditionally]'
554+ '--remember[remember the specified location as a default]'
555+ '(-r --revision)'{--revision=,-r}'[get a particular revision]:revision:'
556+ '(-v --verbose)'{--verbose,-v}'[display more information]'
557+ '*:local repository:_files -/'
558+ )
559+ _bzr_completeParents
560+ ;;
561+
562+(missing)
563+ args+=(
564+ '(-l --long --short --log_format)--line[use log format with one line per revision. Same as "--log-format line"]'
565+ '(-l --long --short --line)--log-format=[use the specified log format]:log format:(line short long)'
566+ '(-l --long --short --line --log-format)'{--long,-l}'[use detailed log format. Same as "--log-format long"]'
567+ '(-l --long --log_format)--short[use moderately short log format. Same as "--log-format short"]'
568+ '--mine-only[display changes in the local branch only]'
569+ '--reverse[reverse the order of revisions]'
570+ '--show-ids[show internal object ids]'
571+ '--theirs-only[display changes in the remote branch only]'
572+ '(-v --verbose)'{--verbose,-v}'[display more information]'
573+ '*:local repository:_files -/'
574+ )
575+ _bzr_completeParents
576+ ;;
577+
578+(commit|checkin|ci)
579+ args+=(
580+ '(-F --file)'{--file=,-F}'[commit message from file]:message file:'
581+ '--local[perform a local only commit in a bound branch]'
582+ '(-m --message)'{--message=,-m}'[commit message]:message text:'
583+ '--strict[refuse to commit if there are unknown files]'
584+ '--unchanged[include unchanged files]'
585+ '(-q --quiet -v --verbose)'{--quiet,-q}'[be quiet]'
586+ '(-v --verbose -q --quiet)'{--verbose,-v}'[display more information]'
587+ '*:modified files:_bzr_versionedFiles'
588+ )
589+ ;;
590+
591+(bind|break-lock|reconcile)
592+ _bzr_completeParents
593+ ;;
594+
595+(register-branch)
596+ args+=(
597+ '--author=[email of the branch author, if not you]:email:'
598+ '--branch-description=[longer description of the branch]:description:'
599+ '--branch-name=[short name for the branch]:name:'
600+ '--branch-title=[one-sentence description of the branch]:title:'
601+ '--dry-run[prepare the request but do not actually send it]'
602+ '--link-bug=[the bug this branch fixes]:bug-ID:'
603+ '--product=[launchpad product short name to associate with the branch]:product:'
604+ )
605+ _bzr_completeParents
606+ ;;
607+
608+(remerge)
609+ args+=(
610+ '--merge-type=[the type of the merge]:type:'
611+ '--reprocess[reprocess to reduce spurious conflicts]'
612+ '--show-base[show base revision text in conflicts]'
613+ )
614+ _bzr_completeParents
615+ ;;
616+
617+(conflicts|added|deleted|modified|unknowns|directories|ignored|unbind|nick|revno|version)
618+ ;;
619+
620+(whoami)
621+ args+=( '--email[only show e-mail address]' )
622+ ;;
623+
624+(inventory)
625+ args+=(
626+ '--kind=[limit output by type]:kind:(file directory symlink)'
627+ '(-r --revision)'{--revision=,-r}'[show inventory of a revision]:revision:'
628+ '--show-ids[show file IDs]'
629+ )
630+ ;;
631+
632+(diff|dif|di)
633+ args+=(
634+ '(-r --revision)'{--revision=,-r}'[revision]:revision:'
635+ '--diff-options=[options to pass to gdiff]:diff options:'
636+ '(-p --prefix)'{--prefix,-p}'[set prefix added to old and new filenames]'
637+ '*:files:_files'
638+ )
639+ ;;
640+
641+(export)
642+ args+=(
643+ '(-r --revision)'{--revision=,-r}'[revision]:revision:'
644+ '--format=[format of exported file]:format:(dir tar tgz tbz2)'
645+ '--root=[root directory of patch]:_files -/'
646+ '*:destination:_files'
647+ )
648+ ;;
649+
650+(ignore)
651+ args+=( '*:NAME_PATTERN:_bzr_unknownRoot' )
652+ ;;
653+
654+(info)
655+ args+=(
656+ '(-v --verbose)'{--verbose,-v}'[display more information]'
657+ '*:branch:_files -/'
658+ )
659+ ;;
660+
661+(testament)
662+ args+=(
663+ '(-l --long)'{--long,-l}'[use long format]'
664+ '(-r --revision)'{--revision=,-r}'[revision]:revision:'
665+ '*:branch:_files -/'
666+ )
667+ ;;
668+
669+(revert|merge-revert)
670+ args+=(
671+ '--no-backup[skip generation of backup~ files]'
672+ '(-r --revision)'{--revision=,-r}'[revision]:revision:'
673+ '*:file:_bzr_versionedFiles'
674+ )
675+ ;;
676+
677+(merge)
678+ args+=(
679+ '--force[ignore uncommitted changes]'
680+ '--merge-type:merge type:(diff3 merge3 weave)'
681+ '--remember[remember the specified location as a default]'
682+ '--reprocess[reprocess to reduce spurious conflicts]'
683+ '(-r --revision)'{--revision=,-r}'[revision]:revision:'
684+ '--show-base[show base revision text in conflicts]'
685+ '*:local repository:_files -/'
686+ )
687+ _bzr_completeParents
688+ ;;
689+
690+(ls)
691+ args+=(
692+ '(-q --quiet -v --verbose)'{--quiet,-q}'[be quiet]'
693+ '(-v --verbose -q --quiet)'{--verbose,-v}'[display more information]'
694+ '(-r --revision)'{--revision=,-r}'[revision]:revision:'
695+ '--from-root[print all paths from the root of the branch]'
696+ '--non-recursive[do not recurse into subdirectories]'
697+ '--null[null separate the files]'
698+ '--ignored[print ignored files]'
699+ '--unknown[print unknown files]'
700+ '--versioned[print versioned files]'
701+ )
702+ ;;
703+
704+(switch)
705+ args+=(
706+ '--force[switch even if local commits will be lost]'
707+ '(-q --quiet -v --verbose)'{--quiet,-q}'[be quiet]'
708+ '(-v --verbose -q --quiet)'{--verbose,-v}'[display more information]'
709+ '*:local repository:_files -/'
710+ )
711+ _bzr_completeParents
712+ ;;
713+
714+(help)
715+ args=(
716+ '(-l --long)'{--long,-l}'[use long format]'
717+ '*:subcmds:->cmds'
718+ )
719+ _arguments -s "$args[@]" && ret=0
720+ _describe -t subcommand 'subcommand' _bzr_cmds
721+ return 0
722+ ;;
723+
724+ # Plugins
725+
726+(visualize|visualise|viz|vis)
727+ args+=( '(-r --revision)'{--revision=,-r}'[starting revision]:rev:' )
728+ ;;
729+
730+(gannotate|gblame|gpraise)
731+ args+=(
732+ '--all[show annotations on all lines]'
733+ '--plain[do not hightlight annotation lines]'
734+ '*:files:_bzr_versionedFiles'
735+ )
736+ ;;
737+
738+(push)
739+ args+=(
740+ '--create-prefix[create the path leading up to the branch when missing]'
741+ '--overwrite[ignore differences, overwrite unconditionally]'
742+ '--remember[remember the specified location as a default]'
743+ '*:local repository:_files -/'
744+ )
745+ _bzr_completeParents
746+ ;;
747+
748+(clean-tree)
749+ args+=(
750+ '--dry-run[show files to delete instead of deleting them]'
751+ '--ignored[delete all ignored files]'
752+ '--detritus[delete conflict files, merge backups, failed self-tests, *~, *.tmp, etc]'
753+ )
754+ ;;
755+
756+(uncommit)
757+ args+=(
758+ '--dry-run[do not make any changes]'
759+ '--force[say "yes" to all questions]'
760+ '(-r --revision)'{--revision=,-r}'[the earliest revision to delete]:rev:'
761+ '(-v --verbose)'{--verbose,-v}'[display more information]'
762+ )
763+ ;;
764+
765+(sign-my-commits)
766+ args+=( '--dry-run[do not actually sign anything]' )
767+ ;;
768+
769+(*)
770+ _message "unknown bzr command completion: $cmd"
771+ return 1
772+ ;;
773+esac
774+
775+_arguments -s "$args[@]" && ret=0
776+return $ret
777\ No newline at end of file
778
779=== added file 'zsh_completion/_kde-sc-build-status'
780--- zsh_completion/_kde-sc-build-status 1970-01-01 00:00:00 +0000
781+++ zsh_completion/_kde-sc-build-status 2011-09-19 15:44:21 +0000
782@@ -0,0 +1,2 @@
783+#compdef kde-sc-build-status
784+_message "no more arguments"
785\ No newline at end of file
786
787=== added file 'zsh_completion/_kgetsource'
788--- zsh_completion/_kgetsource 1970-01-01 00:00:00 +0000
789+++ zsh_completion/_kgetsource 2011-09-19 15:44:21 +0000
790@@ -0,0 +1,48 @@
791+#compdef kgetsource
792+#_arguments '1:name of the package:_getpackages' '2:version of the package:_print_valid_version' '3:series:_series'
793+function _name() {
794+
795+ #TODO: do something with following: ssh ftpubuntu@ftpmaster.kde.org ls -c /home/ftpubuntu/stable/4.7.0/src/
796+ if ( [[ ${+_kubuntu_completion_cache_packages} -eq 0 ]] ||
797+ _cache_invalid KUBUNTU_PACKAGES_CACHE) && ! _retrieve_cache KUBUNTU_PACKAGES_CACHE;
798+ then
799+ _kubuntu_completion_cache_packages=(
800+ ${(f)"$(kshowbranches| grep "lp:~kubuntu-packagers/kubuntu-packaging/" |sed 's/lp:\~kubuntu-packagers\/kubuntu-packaging\///' 2>/dev/null)"}
801+ )
802+
803+ _store_cache KUBUNTU_PACKAGES_CACHE _kubuntu_completion_cache_packages
804+ fi
805+ typeset -gH _kubuntu_completion_cache_packages
806+
807+ compadd -a _kubuntu_completion_cache_packages
808+}
809+
810+function _version() {
811+ if ( [[ ${+_kubuntu_completion_cache_versions} -eq 0 ]] ||
812+ _cache_invalid KUBUNTU_VERSIONS_CACHE) && ! _retrieve_cache KUBUNTU_VERSIONS_CACHE;
813+ then
814+ _kubuntu_completion_cache_versions=(
815+ ${(f)"$(khighestversion highest stable)"} ${(f)"$(khighestversion highest unstable)"}
816+ )
817+
818+ _store_cache KUBUNTU_VERSIONS_CACHE _kubuntu_completion_cache_versions
819+ fi
820+ typeset -gH _kubuntu_completion_cache_versions
821+
822+ compadd -a _kubuntu_completion_cache_versions
823+}
824+
825+function _series() {
826+ #do something with words[CURRENT-1]
827+ echo words[CURRENT-1]
828+ __series=('unstable' 'stable')
829+ typeset -gH __series
830+ compadd -a __series
831+}
832+
833+local ret=1
834+_arguments \
835+ ':package name:_name' \
836+ ':version:_version' \
837+ ':series:_series' && ret=0
838+return ret
839\ No newline at end of file
840
841=== added file 'zsh_completion/_klinksource'
842--- zsh_completion/_klinksource 1970-01-01 00:00:00 +0000
843+++ zsh_completion/_klinksource 2011-09-19 15:44:21 +0000
844@@ -0,0 +1,5 @@
845+#compdef klinksource
846+
847+#TODO: make it work
848+
849+_arguments "1:tar to link:_files -g '*-?*.tar.(gz|bz2|xz|lzma)'"
850\ No newline at end of file
851
852=== added file 'zsh_completion/_kshowbranches'
853--- zsh_completion/_kshowbranches 1970-01-01 00:00:00 +0000
854+++ zsh_completion/_kshowbranches 2011-09-19 15:44:21 +0000
855@@ -0,0 +1,2 @@
856+#compdef kshowbranches
857+_message "no more arguments"
858\ No newline at end of file
859
860=== added file 'zsh_completion/_kshowseries'
861--- zsh_completion/_kshowseries 1970-01-01 00:00:00 +0000
862+++ zsh_completion/_kshowseries 2011-09-19 15:44:21 +0000
863@@ -0,0 +1,2 @@
864+#compdef kshowseries
865+_message "no more arguments"
866\ No newline at end of file
867
868=== added file 'zsh_completion/_kubuntu-update-symbols'
869--- zsh_completion/_kubuntu-update-symbols 1970-01-01 00:00:00 +0000
870+++ zsh_completion/_kubuntu-update-symbols 2011-09-19 15:44:21 +0000
871@@ -0,0 +1,2 @@
872+#compdef kubuntu-update-symbols
873+_message "no more arguments"
874\ No newline at end of file

Subscribers

People subscribed via source and target branches