Rev 5644: (jelmer) Remove obsolete scripts from contrib/ (Jelmer Vernooij) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Feb 4 17:32:10 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5644 [merge]
revision-id: pqm at pqm.ubuntu.com-20110204173207-8dzx1ym1ney4td3i
parent: pqm at pqm.ubuntu.com-20110204062039-77vw2rkha647pg2c
parent: jelmer at samba.org-20110204133526-itnsfzx4vpvli09n
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2011-02-04 17:32:07 +0000
message:
  (jelmer) Remove obsolete scripts from contrib/ (Jelmer Vernooij)
removed:
  contrib/add-bzr-to-baz         add-bzr-to-baz-20050505024326-1cf5f9aa30541c92
  contrib/newinventory.py        newinventory.py-20050330222648-12642a6a7ae875e9
  contrib/pwclient.full          pwclient.full-20050620042426-0204070fbc47f1e9
  contrib/pwk                    pwk-20050620015048-974d9719ed8a5c16
=== removed file 'contrib/add-bzr-to-baz'
--- a/contrib/add-bzr-to-baz	2005-09-19 06:05:19 +0000
+++ b/contrib/add-bzr-to-baz	1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-#! /bin/sh -e
-
-# Take a file that is versioned by bzr and
-# add it to baz with the same file-id.
-
-if [ $# -lt 1 ]
-then
-    echo "usage: $0 FILE" >&2
-    exit 1
-fi
-
-for f
-do
-    baz add -i "$( bzr file-id "$f" )" "$f"
-done
-

=== removed file 'contrib/newinventory.py'
--- a/contrib/newinventory.py	2009-03-23 14:59:43 +0000
+++ b/contrib/newinventory.py	1970-01-01 00:00:00 +0000
@@ -1,144 +0,0 @@
-# (C) 2005 Canonical Ltd
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-from bzrlib.xml import ElementTree, Element
-
-
-def write_inventory(inv, f):
-    el = Element('inventory', {'version': '2'})
-    el.text = '\n'
-
-    root = Element('root_directory', {'id': inv.root.file_id})
-    root.tail = root.text = '\n'
-    el.append(root)
-
-    def descend(parent_el, ie):
-        kind = ie.kind
-        el = Element(kind, {'name': ie.name,
-                            'id': ie.file_id,})
-        
-        if kind == 'file':
-            if ie.text_id:
-                el.set('text_id', ie.text_id)
-            if ie.text_sha1:
-                el.set('text_sha1', ie.text_sha1)
-            if ie.text_size is not None:
-                el.set('text_size', ('%d' % ie.text_size))
-        elif kind != 'directory':
-            raise BzrError('unknown InventoryEntry kind %r' % kind)
-
-        el.tail = '\n'
-        parent_el.append(el)
-
-        if kind == 'directory':
-            el.text = '\n' # break before having children
-            l = ie.children.items()
-            l.sort()
-            for child_name, child_ie in l:
-                descend(el, child_ie)
-                
-        
-    # walk down through inventory, adding all directories
-
-    l = inv.root.children.items()
-    l.sort()
-    for entry_name, ie in l:
-        descend(root, ie)
-    
-    ElementTree(el).write(f, 'utf-8')
-    f.write('\n')
-
-
-
-def escape_attr(text):
-    return text.replace("&", "&") \
-           .replace("'", "'") \
-           .replace('"', """) \
-           .replace("<", "<") \
-           .replace(">", ">")
-
-
-# This writes out an inventory without building an XML tree first,
-# just to see if it's faster.  Not currently used.
-def write_slacker_inventory(inv, f):
-    def descend(ie):
-        kind = ie.kind
-        f.write('<%s name="%s" id="%s" ' % (kind, escape_attr(ie.name),
-                                            escape_attr(ie.file_id)))
-
-        if kind == 'file':
-            if ie.text_id:
-                f.write('text_id="%s" ' % ie.text_id)
-            if ie.text_sha1:
-                f.write('text_sha1="%s" ' % ie.text_sha1)
-            if ie.text_size is not None:
-                f.write('text_size="%d" ' % ie.text_size)
-            f.write('/>\n')
-        elif kind == 'directory':
-            f.write('>\n')
-            
-            l = ie.children.items()
-            l.sort()
-            for child_name, child_ie in l:
-                descend(child_ie)
-
-            f.write('</directory>\n')
-        else:
-            raise BzrError('unknown InventoryEntry kind %r' % kind)
-
-    f.write('<inventory>\n')
-    f.write('<root_directory id="%s">\n' % escape_attr(inv.root.file_id))
-
-    l = inv.root.children.items()
-    l.sort()
-    for entry_name, ie in l:
-        descend(ie)
-
-    f.write('</root_directory>\n')
-    f.write('</inventory>\n')
-    
-
-
-def read_new_inventory(f):
-    from inventory import Inventory, InventoryEntry
-    
-    def descend(parent_ie, el):
-        kind = el.tag
-        name = el.get('name')
-        file_id = el.get('id')
-        ie = InventoryEntry(file_id, name, el.tag)
-        parent_ie.children[name] = ie
-        inv._byid[file_id] = ie
-        if kind == 'directory':
-            for child_el in el:
-                descend(ie, child_el)
-        elif kind == 'file':
-            assert len(el) == 0
-            ie.text_id = el.get('text_id')
-            v = el.get('text_size')
-            ie.text_size = v and int(v)
-            ie.text_sha1 = el.get('text_sha1')
-        else:
-            raise BzrError("unknown inventory entry %r" % kind)
-
-    inv_el = ElementTree().parse(f)
-    assert inv_el.tag == 'inventory'
-    root_el = inv_el[0]
-    assert root_el.tag == 'root_directory'
-
-    inv = Inventory(inv_el.get('file_id'))
-    for el in root_el:
-        descend(inv.root, el)

=== removed file 'contrib/pwclient.full'
--- a/contrib/pwclient.full	2009-03-23 14:59:43 +0000
+++ b/contrib/pwclient.full	1970-01-01 00:00:00 +0000
@@ -1,643 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Patchwork - automated patch tracking system
-# Copyright (C) 2005 Jeremy Kerr <jk at ozlabs.org>
-#
-# This file is part of the Patchwork package.
-#
-# Patchwork is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# Patchwork is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Patchwork; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-use strict;
-use lib '../lib';
-
-use SOAP::Lite;
-use Getopt::Std;
-
-my $uri = 'urn:SOAPInterface';
-# this URI has the address of the soap.pl script, followed by the project name
-my $proxy = 'http://patchwork.ozlabs.org/soap.pl/bazaar-ng';
-my $soap;
-my ($rows, $cols);
-
-my %actions = (
-	list   => 'List all patches (restrict to a state with -s <state>)',
-	view   => 'View a patch',
-	get    => 'Download a patch and save it locally',
-	apply  => 'Apply a patch (in the current dir, using -p1)',
-	search => 'Search for patches (by name)'
-);
-
-sub page($@)
-{
-	my $str = shift;
-	my $lines;
-	if (@_) {
-		($lines) = @_;
-	} else {
-		my @l = split(/\n/, $str);
-		$lines = $#l;
-	}
-	if ($rows && $lines >= $rows) {
-		my $pager = $ENV{PAGER} || 'more';
-		open(FH, "|-", $pager) || die "Couldn't run pager '$pager': $!";
-		print FH $str;
-		close(FH);
-	} else {
-		print $str;
-	}
-}
-
-sub patch_list(@)
-{
-	my @patches = @_;
-	my $states = 
-	return "No patches\n" unless @patches;
-	my $str = list_header();
-	my $max = $cols - 9;
-	$max = 10 if $max < 10;
-	foreach my $patch (@patches) {
-		my $name = $patch->name();
-		if ($cols && length($name) > $max) {
-			$name = substr($name, 0, $max - 1).'$';
-		}
-		$str .= sprintf "%4d %3s %s\n", $patch->id(),
-				substr(states($patch->state()), 0, 3),
-				$name;
-	}
-	return $str;
-}
-
-sub _get_patch($)
-{
-	my ($id) = @_;
-	unless ($id) {
-		print STDERR "No id given to retrieve a patch\n";
-		exit 1;
-	}
-
-	unless ($id =~ m/^[0-9]+$/) {
-		print STDERR "Invalid patch id '$id'\n'";
-		exit 1;
-	}
-
-	my $res = $soap->get_patch($id);
-	die "SOAP fault: ".$res->faultstring if $res->fault;
-	my $patch = $res->result;
-	unless ($patch) {
-		print STDERR "Patch not found\n";
-		exit 1;
-	}
-	return $patch;
-}
-
-sub list()
-{
-	my %opts;
-	my $res;
-	getopts('s:', \%opts);
-	if ($opts{s}) {
-		$res = $soap->get_patches_by_state(state_from_name($opts{s}));
-	} else {
-		$res = $soap->get_patches();
-	}
-	die "SOAP fault: ".$res->faultstring if $res->fault;
-	my $patches = $res->result;
-	page(patch_list(@$patches), $#{$patches} + 2);
-	return 1;
-}
-
-sub search()
-{
-	my $query = join(' ', map { '"'.$_.'"' } @ARGV);
-	my $res = $soap->search($query);
-	die "SOAP fault: ".$res->faultstring if $res->fault;
-	my $patches = $res->result;
-	my $str = '';
-	unless ($patches && @{$patches}) {
-		print "No patches found\n";
-		return 1;
-	}
-	
-	$str .= list_header();
-	page(patch_list(@$patches), $#{$patches});
-	return 1;
-}
-
-sub view()
-{
-	my ($id) = @ARGV;
-	my $patch = _get_patch($id);
-	page($patch->content());
-	return 1;
-}
-
-sub get()
-{
-	my ($id) = @ARGV;
-	my $patch = _get_patch($id);
-	if (-e $patch->filename()) {
-		printf STDERR "Patch file:\n\t%s\nalready exists\n",
-			$patch->filename();
-		exit 1;
-	}
-	open(FH, ">", $patch->filename())
-		or die "Couldn't open ".$patch->filename()." for writing: $!";
-	print FH $patch->content;
-	close(FH);
-	printf "Saved '%s'\n\tto: %s\n", $patch->name, $patch->filename();
-	return 1;
-}
-
-sub apply()
-{
-	my ($id) = @ARGV;
-	my $patch = _get_patch($id);
-	open(FH, "|-", "patch", "-p1")
-		or die "Couldn't execute 'patch -p1'";
-	print FH $patch->content;
-	close(FH);
-	return 1;
-}
-
-sub usage()
-{
-	printf STDERR "Usage: %s <action> [options]\n", $0;
-	printf STDERR "Where <action> is one of:\n";
-	printf STDERR "\t%-6s : %s\n", $_, $actions{$_} for sort keys %actions;
-}
-
-sub list_header()
-{
-	return sprintf "%4s %3s %s\n", 'ID', 'Sta', 'Name';
-}
-
-my %_states;
-sub states(@)
-{
-	my $state = @_ ? shift : undef;
-	unless (%_states) {
-		my $res = $soap->get_states();
-		die "SOAP fault: ".$res->faultstring if $res->fault;
-		my $stateref = $res->result;
-		%_states = %$stateref;
-	}
-	return $state ? $_states{$state} : %_states;
-}
-
-sub state_from_name($)
-{
-	my ($name) = @_;
-	my @matches;
-	my %states = states();
-	foreach my $id (keys(%states)) {
-		push(@matches, $id) if ($states{$id} =~ m/^$name/i);
-	}
-	if ($#matches < 0) {
-		print STDERR "No such state '$name'\n";
-		exit 1;
-	} elsif ($#matches > 0) {
-		printf STDERR "Multiple states match '$name':\n";
-		printf STDERR "\t%s\n", $states{$_} for @matches;
-		exit 1;
-	}
-	return $matches[0];
-}
-
-my $action = shift;
-unless ($action) {
-	usage();
-	exit 1;
-}
-
-if (eval "require Term::Size") {
-	($cols, $rows) = Term::Size::chars(*STDOUT);
-} else {
-	($cols, $rows) = (0,0);
-}
-
-$soap = new SOAP::Lite(uri => $uri, proxy => $proxy);
-
-foreach (sort(keys(%actions))) {
-	if ($_ eq $action) {
-		eval "return &$action()" or die $@;
-		exit 0;
-	}
-}
-printf STDERR "No such action '%s'\n", $action;
-usage();
-exit 1;
-
-# Patchwork - automated patch tracking system
-# Copyright (C) 2005 Jeremy Kerr <jk at ozlabs.org>
-#
-# This file is part of the Patchwork package.
-#
-# Patchwork is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# Patchwork is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Patchwork; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-package PatchWork::Comment;
-
-use strict;
-
-# internal variables
-#  id
-#  msgid
-#  submitter
-#  content
-#  date
-#  @refs
-
-sub new($)
-{
-	my ($cls) = @_;
-	my $obj = {};
-	bless($obj, $cls);
-	return $obj;
-}
-
-sub id(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{id} = shift }
-	return $obj->{id};
-}
-
-sub submitter(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{submitter} = shift }
-	return $obj->{submitter};
-}
-
-sub msgid(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{msgid} = shift }
-	return $obj->{msgid};
-}
-
-sub date(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{date} = shift }
-	return $obj->{date};
-}
-
-sub content(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{content} = shift }
-	return $obj->{content};
-}
-
-sub refs(@)
-{
-	my ($obj) = shift;
-	push(@{$obj->{refs}}, @_) if @_;
-	return $obj->{refs};
-}
-
-1;
-
-# Patchwork - automated patch tracking system
-# Copyright (C) 2005 Jeremy Kerr <jk at ozlabs.org>
-#
-# This file is part of the Patchwork package.
-#
-# Patchwork is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# Patchwork is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Patchwork; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-package PatchWork::Person;
-
-use strict;
-
-# internal variables
-#   email
-#   name
-
-sub new(@)
-{
-	my $cls = shift;
-	my $obj = {};
-	bless($obj, $cls);
-	$obj->{email} = shift;
-	$obj->{name} = shift;
-	return $obj;
-}
-
-sub parse_from($$)
-{
-	my ($obj, $str) = @_;
-
-	if ($str =~ m/"?(.*?)"?\s*<([^>]+)>/) {
-		$obj->{email} = $2;
-		$obj->{name} = $1;
-	
-	} elsif ($str =~ m/"?(.*?)"?\s*\(([^\)]+)\)/) {
-		$obj->{email} = $1;
-		$obj->{name} = $2;
-	
-	} else {
-		$obj->{email} = $str;
-	}
-}
-
-sub id(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{id} = shift }
-	return $obj->{id};
-}
-
-sub email(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{email} = shift }
-	return $obj->{email};
-}
-
-sub name(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{name} = shift }
-	return $obj->{name};
-}
-
-sub username(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{username} = shift }
-	return $obj->{username};
-}
-
-1;
-
-# Patchwork - automated patch tracking system
-# Copyright (C) 2005 Jeremy Kerr <jk at ozlabs.org>
-#
-# This file is part of the Patchwork package.
-#
-# Patchwork is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# Patchwork is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Patchwork; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-package PatchWork::Patch;
-
-use strict;
-
-# internal variables
-#  id
-#  msgid
-#  date
-#  name
-#  content
-#  filename
-#  submitter
-#  comments
-#  @trees
-
-sub new($)
-{
-	my ($cls) = @_;
-	my $obj = {};
-	bless($obj, $cls);
-	$obj->{comments} = [];
-	$obj->{trees} = {};
-	$obj->{archived} = 0;
-	$obj->{state} = 1;
-	return $obj;
-}
-
-sub id(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{id} = shift }
-	return $obj->{id};
-}
-
-sub msgid(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{msgid} = shift }
-	return $obj->{msgid};
-}
-
-sub date(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{date} = shift }
-	return $obj->{date};
-}
-
-sub state(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{state} = shift }
-	return $obj->{state};
-}
-
-sub name(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{name} = shift }
-	return $obj->{name};
-}
-
-sub filename(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{filename} = shift }
-	return $obj->{filename};
-}
-
-sub submitter(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{submitter} = shift }
-	return $obj->{submitter};
-}
-
-sub content(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{content} = shift }
-	return $obj->{content};
-}
-
-sub archived(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{archived} = shift }
-	return $obj->{archived};
-}
-
-sub add_comment($$)
-{
-	my ($obj, $comment) = @_;
-	push(@{$obj->{comments}}, $comment);
-}
-
-sub comments($)
-{
-	my ($obj) = @_;
-	return $obj->{comments};
-}
-
-sub trees(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{trees} = shift }
-	return $obj->{trees};
-}
-
-1;
-
-# Patchwork - automated patch tracking system
-# Copyright (C) 2005 Jeremy Kerr <jk at ozlabs.org>
-#
-# This file is part of the Patchwork package.
-#
-# Patchwork is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# Patchwork is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Patchwork; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-package PatchWork::Tree;
-
-use strict;
-
-# internal variables
-#   id
-#   name
-#   url
-
-sub new($$)
-{
-	my ($cls, $id) = @_;
-	my $obj = {};
-	bless($obj, $cls);
-	$obj->{id} = $id;
-	return $obj;
-}
-
-sub id($)
-{
-	my ($obj) = @_;
-	return $obj->{id};
-
-}
-
-sub name(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{name} = shift }
-	return $obj->{name};
-}
-
-sub url(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{url} = shift }
-	return $obj->{url};
-}
-
-1;
-
-# Patchwork - automated patch tracking system
-# Copyright (C) 2005 Jeremy Kerr <jk at ozlabs.org>
-#
-# This file is part of the Patchwork package.
-#
-# Patchwork is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# Patchwork is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Patchwork; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-package PatchWork::User;
- at PatchWork::User::ISA = ('PatchWork::Person');
-
-use strict;
-
-# internal variables
-#   username
-
-sub new($$)
-{
-	my ($cls, $id) = @_;
-	my $obj = {};
-	bless($obj, $cls);
-	$obj->{id} = $id;
-	return $obj;
-}
-
-sub username(@)
-{
-	my ($obj) = shift;
-	if (@_) { $obj->{username} = shift }
-	return $obj->{username};
-}
-
-1;
-

=== removed file 'contrib/pwk'
--- a/contrib/pwk	2006-02-28 14:45:51 +0000
+++ b/contrib/pwk	1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
-#! /bin/sh -pe
-
-# take patches from patchwork into bzr
-
-# authentication must be in ~/.netrc
-
-# TODO: Scan all pending patches and say which ones apply cleanly.
-
-# these should be moved into some kind of per-project configuration
-PWK_ROOT='http://patchwork.ozlabs.org/bazaar-ng'
-PWK_AUTH_ROOT='https://patchwork.ozlabs.org/bazaar-ng'
-
-usage() {
-    cat <<EOF
-usage: 
-   pwk cat PATCH-ID       show the patch text
-   pwk try PATCH-ID        see if the patch applies cleanly
-   pwk apply PATCH-ID      apply patch into current directory
-EOF
-}
-
-catpatch() {
-    curl --silent --show-error --get -d id=$1 $PWK_ROOT/patchcontent
-}
-
-if [ $# -lt 1 ]
-then
-    usage
-    exit 1
-fi
-
-
-case "$1" in
-help|-h|--help)
-    usage
-    exit 0
-    ;;
-cat)
-    catpatch $2 | ${PAGER:-less}
-    ;;
-try)
-    catpatch $2 | patch -p1 --dry-run
-    ;;
-apply)
-    catpatch $2 | patch -p1
-    ;;
-*)
-    usage
-    exit 1
-esac




More information about the bazaar-commits mailing list