diff options
author | Chris Ball <cjb@laptop.org> | 2009-07-02 14:00:04 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2009-07-02 14:00:04 -0400 |
commit | 64f62aa2bb841c483e8cb2b663434b3ad3038f4c (patch) | |
tree | 644cfa2fef611ad265d3116ac83026bf0181f7c1 | |
parent | 21a0bb0ae113ad9eaa6d94d36c8d0e5ca8508d7f (diff) | |
parent | a536332660c8374e2000541e2db5ad6cea3b0e5e (diff) | |
download | bugseverywhere-64f62aa2bb841c483e8cb2b663434b3ad3038f4c.tar.gz |
Pull darcs fix, copyright updates from W. Trevor King
43 files changed, 242 insertions, 60 deletions
@@ -1,6 +1,14 @@ Bugs Everywhere was written by: Aaron Bentley +Alexander Belchenko +Ben Finney +Chris Ball +Gianluca Montecchi +James Rowe +Jelmer Vernooij +Marien Zwart +Moritz Barsnick Oleg Romanyshyn Thomas Gerigk -Marien Zwart +Thomas Habets W. Trevor King @@ -4,7 +4,9 @@ # Makefile # Part of Bugs Everywhere, a distributed bug tracking system. # -# Copyright © 2008 Ben Finney <ben+python@benfinney.id.au> +# Copyright (C) 2008-2009 Ben Finney <benf@cybersource.com.au> +# Chris Ball <cjb@laptop.org> +# W. Trevor King <wking@drexel.edu> # This is free software; you may copy, modify and/or distribute this work # under the terms of the GNU General Public License, version 2 or later. # No warranty expressed or implied. See the file COPYING for details. @@ -1,5 +1,8 @@ #!/usr/bin/env python -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Chris Ball <cjb@laptop.org> +# Oleg Romanyshyn <oromanyshyn@panoramicfeedback.com> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/assign.py b/becommands/assign.py index 2f9ff21..985cfdd 100644 --- a/becommands/assign.py +++ b/becommands/assign.py @@ -1,4 +1,7 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Marien Zwart <marienz@gentoo.org> +# Thomas Gerigk <tgerigk@gmx.de> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/close.py b/becommands/close.py index d8826b0..deaccce 100644 --- a/becommands/close.py +++ b/becommands/close.py @@ -1,4 +1,7 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Marien Zwart <marienz@gentoo.org> +# Thomas Gerigk <tgerigk@gmx.de> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/comment.py b/becommands/comment.py index 09f246a..0b3a576 100644 --- a/becommands/comment.py +++ b/becommands/comment.py @@ -1,4 +1,6 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Chris Ball <cjb@laptop.org> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/diff.py b/becommands/diff.py index c090fa8..2bdea93 100644 --- a/becommands/diff.py +++ b/becommands/diff.py @@ -1,4 +1,5 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/help.py b/becommands/help.py index 7e0209d..b0b182d 100644 --- a/becommands/help.py +++ b/becommands/help.py @@ -1,4 +1,6 @@ -# Copyright (C) 2006 Thomas Gerigk +# Copyright (C) 2006-2009 Aaron Bentley and Panometrics, Inc. +# Thomas Gerigk <tgerigk@gmx.de> +# W. Trevor King <wking@drexel.edu> # <tgerigk@gmx.de> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/init.py b/becommands/init.py index e3896e9..390dd15 100644 --- a/becommands/init.py +++ b/becommands/init.py @@ -1,4 +1,5 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify @@ -29,7 +30,7 @@ def execute(args, test=False): ... except bugdir.NoBugDir, e: ... True True - >>> execute([dir.path], test=True) + >>> execute(['--root', dir.path], test=True) No revision control detected. Directory initialized. >>> del(dir) @@ -46,11 +47,11 @@ def execute(args, test=False): >>> rcs.cleanup() >>> try: - ... execute(['.'], test=True) + ... execute(['--root', '.'], test=True) ... except cmdutil.UserError, e: ... str(e).startswith("Directory already initialized: ") True - >>> execute(['/highly-unlikely-to-exist'], test=True) + >>> execute(['--root', '/highly-unlikely-to-exist'], test=True) Traceback (most recent call last): UserError: No such directory: /highly-unlikely-to-exist >>> os.chdir('/') @@ -58,19 +59,17 @@ def execute(args, test=False): parser = get_parser() options, args = parser.parse_args(args) cmdutil.default_complete(options, args, parser) - if len(args) > 1: + if len(args) > 0: raise cmdutil.UsageError - if len(args) == 1: - basedir = args[0] - else: - basedir = "." try: - bd = bugdir.BugDir(basedir, from_disk=False, sink_to_existing_root=False, assert_new_BugDir=True, + bd = bugdir.BugDir(options.root_dir, from_disk=False, + sink_to_existing_root=False, + assert_new_BugDir=True, manipulate_encodings=not test) except bugdir.NoRootEntry: - raise cmdutil.UserError("No such directory: %s" % basedir) + raise cmdutil.UserError("No such directory: %s" % options.root_dir) except bugdir.AlreadyInitialized: - raise cmdutil.UserError("Directory already initialized: %s" % basedir) + raise cmdutil.UserError("Directory already initialized: %s" % options.root_dir) bd.save() if bd.rcs.name is not "None": print "Using %s for revision control." % bd.rcs.name @@ -79,7 +78,10 @@ def execute(args, test=False): print "Directory initialized." def get_parser(): - parser = cmdutil.CmdOptionParser("be init [DIRECTORY]") + parser = cmdutil.CmdOptionParser("be init") + parser.add_option("-r", "--root", metavar="DIR", dest="root_dir", + help="Set root dir to something other than the current directory.", + default=".") return parser longhelp=""" @@ -90,9 +92,9 @@ system. You can use "be set rcs_name" to change the rcs being used. The directory defaults to your current working directory. It is usually a good idea to put the Bugs Everywhere root at the source code -root, but you can put it anywhere. If you run "be init" in a subdirectory, -then only bugs created in that subdirectory (and its children) will appear -there. +root, but you can put it anywhere. If you root Bugs Everywhere in a +subdirectory, then only bugs created in that subdirectory (and its children) +will appear there. """ def help(): diff --git a/becommands/list.py b/becommands/list.py index c397024..443704b 100644 --- a/becommands/list.py +++ b/becommands/list.py @@ -1,4 +1,7 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Chris Ball <cjb@laptop.org> +# Oleg Romanyshyn <oromanyshyn@panoramicfeedback.com> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/merge.py b/becommands/merge.py index 8232282..4bec6bf 100644 --- a/becommands/merge.py +++ b/becommands/merge.py @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/new.py b/becommands/new.py index 1c5246c..32e070a 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -1,4 +1,5 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/open.py b/becommands/open.py index 7a18fd0..f9abcbb 100644 --- a/becommands/open.py +++ b/becommands/open.py @@ -1,4 +1,7 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Marien Zwart <marienz@gentoo.org> +# Thomas Gerigk <tgerigk@gmx.de> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/remove.py b/becommands/remove.py index fa264b8..213a8d9 100644 --- a/becommands/remove.py +++ b/becommands/remove.py @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/set.py b/becommands/set.py index c8bbe4f..e771018 100644 --- a/becommands/set.py +++ b/becommands/set.py @@ -1,4 +1,8 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Chris Ball <cjb@laptop.org> +# Marien Zwart <marienz@gentoo.org> +# Thomas Gerigk <tgerigk@gmx.de> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/severity.py b/becommands/severity.py index 5d27222..f8a0c02 100644 --- a/becommands/severity.py +++ b/becommands/severity.py @@ -1,4 +1,7 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Marien Zwart <marienz@gentoo.org> +# Thomas Gerigk <tgerigk@gmx.de> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/show.py b/becommands/show.py index b33a96b..ff434ab 100644 --- a/becommands/show.py +++ b/becommands/show.py @@ -1,4 +1,8 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Chris Ball <cjb@laptop.org> +# Thomas Gerigk <tgerigk@gmx.de> +# Thomas Habets <thomas@habets.pp.se> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/status.py b/becommands/status.py index 40e9b51..d8bd4c4 100644 --- a/becommands/status.py +++ b/becommands/status.py @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/becommands/target.py b/becommands/target.py index b2d1ffd..283998a 100644 --- a/becommands/target.py +++ b/becommands/target.py @@ -1,4 +1,9 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Chris Ball <cjb@laptop.org> +# Gianluca Montecchi <gian@grys.it> +# Marien Zwart <marienz@gentoo.org> +# Thomas Gerigk <tgerigk@gmx.de> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/doc/module.mk b/doc/module.mk index 1b365c8..828f15f 100644 --- a/doc/module.mk +++ b/doc/module.mk @@ -3,7 +3,7 @@ # doc/module.mk # Part of Bugs Everywhere, a distributed bug tracking system. # -# Copyright © 2008 Ben Finney <ben+python@benfinney.id.au> +# Copyright (C) 2008-2009 Chris Ball <cjb@laptop.org> # This is free software; you may copy, modify and/or distribute this work # under the terms of the GNU General Public License, version 2 or later. # No warranty expressed or implied. See the file COPYING for details. diff --git a/libbe/arch.py b/libbe/arch.py index 441c5a9..3051b34 100644 --- a/libbe/arch.py +++ b/libbe/arch.py @@ -1,4 +1,7 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Ben Finney <ben+python@benfinney.id.au> +# James Rowe <jnrowe@ukfsn.org> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/beuuid.py b/libbe/beuuid.py index e2435ea..de67cb7 100644 --- a/libbe/beuuid.py +++ b/libbe/beuuid.py @@ -1,4 +1,4 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/bug.py b/libbe/bug.py index 3bd0566..dfa49f2 100644 --- a/libbe/bug.py +++ b/libbe/bug.py @@ -1,4 +1,6 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2008-2009 Chris Ball <cjb@laptop.org> +# Thomas Habets <thomas@habets.pp.se> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/bugdir.py b/libbe/bugdir.py index 3ad5824..d4a39cb 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -1,4 +1,8 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Alexander Belchenko <bialix@ukr.net> +# Chris Ball <cjb@laptop.org> +# Oleg Romanyshyn <oromanyshyn@panoramicfeedback.com> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/bzr.py b/libbe/bzr.py index 21030e2..d73392a 100644 --- a/libbe/bzr.py +++ b/libbe/bzr.py @@ -1,4 +1,7 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Ben Finney <ben+python@benfinney.id.au> +# Marien Zwart <marienz@gentoo.org> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py index 5873607..edc6442 100644 --- a/libbe/cmdutil.py +++ b/libbe/cmdutil.py @@ -1,4 +1,6 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Oleg Romanyshyn <oromanyshyn@panoramicfeedback.com> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/comment.py b/libbe/comment.py index 9fa4a30..9d4f744 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -1,5 +1,7 @@ # Bugs Everywhere, a distributed bugtracker -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2008-2009 Chris Ball <cjb@laptop.org> +# Thomas Habets <thomas@habets.pp.se> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/config.py b/libbe/config.py index e696eeb..7f600a5 100644 --- a/libbe/config.py +++ b/libbe/config.py @@ -1,4 +1,5 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/darcs.py b/libbe/darcs.py index a3b52b6..43af99a 100644 --- a/libbe/darcs.py +++ b/libbe/darcs.py @@ -1,5 +1,4 @@ -# Copyright (C) 2007 Chris Ball <chris@printf.net>, -# 2009 W. Trevor King <wking@drexel.edu> +# Copyright (C) 2009 W. Trevor King <wking@drexel.edu> # # 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 @@ -131,8 +130,7 @@ class Darcs(RCS): if revision==None: RCS._rcs_duplicate_repo(self, directory, revision) else: - self._u_invoke_client("put", "--no-pristine-tree", - "--to-patch", revision, directory) + self._u_invoke_client("put", "--to-patch", revision, directory) def _rcs_commit(self, commitfile): id = self.get_user_id() if '@' not in id: diff --git a/libbe/diff.py b/libbe/diff.py index 17d6c50..a349e14 100644 --- a/libbe/diff.py +++ b/libbe/diff.py @@ -1,4 +1,5 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/editor.py b/libbe/editor.py index 4a63e5c..6638ed9 100644 --- a/libbe/editor.py +++ b/libbe/editor.py @@ -1,5 +1,5 @@ # Bugs Everywhere, a distributed bugtracker -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/encoding.py b/libbe/encoding.py index 7f924eb..bdac98e 100644 --- a/libbe/encoding.py +++ b/libbe/encoding.py @@ -1,5 +1,5 @@ # Bugs Everywhere, a distributed bugtracker -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/git.py b/libbe/git.py index 8c25416..31bbe32 100644 --- a/libbe/git.py +++ b/libbe/git.py @@ -1,4 +1,6 @@ -# Copyright (C) 2007 Chris Ball <chris@printf.net> +# Copyright (C) 2008-2009 Ben Finney <ben+python@benfinney.id.au> +# Chris Ball <cjb@laptop.org> +# W. Trevor King <wking@drexel.edu> # # 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 diff --git a/libbe/hg.py b/libbe/hg.py index 9b566b9..30b0470 100644 --- a/libbe/hg.py +++ b/libbe/hg.py @@ -1,4 +1,6 @@ -# Copyright (C) 2007 Steve Borho <steve@borho.org> +# Copyright (C) 2007-2009 Aaron Bentley and Panometrics, Inc. +# Ben Finney <ben+python@benfinney.id.au> +# W. Trevor King <wking@drexel.edu> # # 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 diff --git a/libbe/mapfile.py b/libbe/mapfile.py index 0272890..9ff2215 100644 --- a/libbe/mapfile.py +++ b/libbe/mapfile.py @@ -1,4 +1,5 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/plugin.py b/libbe/plugin.py index 0964fba..3c7c753 100644 --- a/libbe/plugin.py +++ b/libbe/plugin.py @@ -1,4 +1,6 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Marien Zwart <marienz@gentoo.org> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/properties.py b/libbe/properties.py index 956ecc3..37204d6 100644 --- a/libbe/properties.py +++ b/libbe/properties.py @@ -1,5 +1,5 @@ # Bugs Everywhere - a distributed bugtracker -# Copyright (C) 2008 W. Trevor King <wking@drexel.edu> +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # # 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 diff --git a/libbe/rcs.py b/libbe/rcs.py index f19f00f..2c416f4 100644 --- a/libbe/rcs.py +++ b/libbe/rcs.py @@ -1,4 +1,8 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# Alexander Belchenko <bialix@ukr.net> +# Ben Finney <ben+python@benfinney.id.au> +# Chris Ball <cjb@laptop.org> +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/libbe/settings_object.py b/libbe/settings_object.py index 60fddb9..7326d1b 100644 --- a/libbe/settings_object.py +++ b/libbe/settings_object.py @@ -1,5 +1,5 @@ # Bugs Everywhere - a distributed bugtracker -# Copyright (C) 2008 W. Trevor King <wking@drexel.edu> +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # # 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 diff --git a/libbe/tree.py b/libbe/tree.py index 9e07ee3..54b927e 100644 --- a/libbe/tree.py +++ b/libbe/tree.py @@ -1,5 +1,5 @@ # Bugs Everywhere, a distributed bugtracker -# Copyright (C) 2008 W. Trevor King +# Copyright (C) 2008-2009 W. Trevor King <wking@drexel.edu> # # 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 diff --git a/libbe/utility.py b/libbe/utility.py index 30240a9..8a0f318 100644 --- a/libbe/utility.py +++ b/libbe/utility.py @@ -1,4 +1,5 @@ -# Copyright (C) 2005 Aaron Bentley and Panometrics, Inc. +# Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. +# W. Trevor King <wking@drexel.edu> # <abentley@panoramicfeedback.com> # # This program is free software; you can redistribute it and/or modify diff --git a/update_copyright.sh b/update_copyright.sh new file mode 100755 index 0000000..260cb3b --- /dev/null +++ b/update_copyright.sh @@ -0,0 +1,104 @@ +#!/bin/bash +# +# Update copyright information in source code with information from +# the bzr repository. Run from the BE repository root. + +set -o pipefail + +# adjust the AUTHORS file +AUTHORS=`bzr log | grep '^ *committer\|^ *author' | cut -d: -f2 | sed 's/ <.*//;s/^ *//' | sort | uniq` +AUTHORS=`echo "$AUTHORS" | grep -v 'j\^\|wking\|John Doe'` # remove non-names +echo "Bugs Everywhere was written by:" > AUTHORS +echo "$AUTHORS" >> AUTHORS + +CURRENT_YEAR=`date +"%Y"` +FILES=`grep -rc "# Copyright" . | grep -v ':0$' | cut -d: -f1` +TMP=`mktemp BE_update_copyright.XXXXXXX` + +for file in $FILES +do + # Ignore some files + if [ "${file:0:5}" == "./.be" ]; then + continue + fi + if [ "${file:0:6}" == "./.bzr" ]; then + continue + fi + if [ "${file:0:7}" == "./build" ]; then + continue + fi + if [ "$file" == "./COPYING" ]; then + continue + fi + if [ "$file" == "./update_copyright.sh" ]; then + continue + fi + if [ "$file" == "./xml/catmutt" ]; then + continue + fi + echo "Processing $file" + + # Get author history from bzr + AUTHORS=`bzr log "$file" | grep "^ *author: \|^ *committer: " | cut -d: -f2 | sed 's/^ *//;s/ *$//' | sort | uniq` + if [ $? -ne 0 ]; then + continue # bzr doesn't version that file + fi + ORIG_YEAR=`bzr log "$file" | grep "^ *timestamp: " | tail -n1 | sed 's/^ *//;' | cut -b 16-19` + + # Tweak the author list to make up for problems in the bzr + # history, change of email address, etc. + + # Consolidate Aaron Bentley + AUTHORS=`echo "$AUTHORS" | sed 's/<abentley@panoramicfeedback.com>/and Panometrics, Inc./'` + GREP_OUT=`echo "$AUTHORS" | grep 'Aaron Bentley and Panometrics, Inc.'` + if [ -n "$GREP_OUT" ]; then + AUTHORS=`echo "$AUTHORS" | grep -v '^Aaron Bentley <aaron.bentley@utoronto.ca>$'` + fi + + # Consolidate Ben Finney + AUTHORS=`echo "$AUTHORS" | sed 's/John Doe <jdoe@example.com>/Ben Finney <ben+python@benfinney.id.au>/'` + GREP_OUt=`echo "$AUTHORS" | grep 'Ben Finney <ben+python@benfinney.id.au>'` + if [ -n "$GREP_OUT" ]; then + AUTHORS=`echo "$AUTHORS" | grep -v '^Ben Finney <benf@cybersource.com.au>$'` + fi + + # Consolidate Chris Ball + GREP_OUT=`echo "$AUTHORS" | grep 'Chris Ball <cjb@laptop.org>'` + if [ -n "$GREP_OUT" ]; then + AUTHORS=`echo "$AUTHORS" | grep -v '^Chris Ball <cjb@thunk.printf.net>$'` + fi + + # Consolidate Trevor King + AUTHORS=`echo "$AUTHORS" | grep -v "wking <wking@mjolnir>"` + + # Sort again... + AUTHORS=`echo "$AUTHORS" | sort | uniq` + + # Generate new Copyright string + if [ "$ORIG_YEAR" == "$CURRENT_YEAR" ]; then + DATE_RANGE="$CURRENT_YEAR" + DATE_SPACE=" " + else + DATE_RANGE="${ORIG_YEAR}-${CURRENT_YEAR}" + DATE_SPACE=" " + fi + NUM_AUTHORS=`echo "$AUTHORS" | wc -l` + FIRST_AUTHOR=`echo "$AUTHORS" | head -n 1` + COPYRIGHT="# Copyright (C) $DATE_RANGE $FIRST_AUTHOR" + if [ $NUM_AUTHORS -gt 1 ]; then + OTHER_AUTHORS=`echo "$AUTHORS" | tail -n +2` + while read AUTHOR; do + COPYRIGHT=`echo "$COPYRIGHT\\n# $DATE_SPACE $AUTHOR"` + done < <(echo "$OTHER_AUTHORS") + fi + echo -e "$COPYRIGHT" + + # Strip old copyright info and replace with tag + awk 'BEGIN{incopy=0}{if(match($0, "^# Copyright")>0){incopy=1; print "-xyz-COPYRIGHT-zyx-"}else{if(incopy=0){print $0}else{if(match($0, "^# ")==0){incopy=0; print $0}}}}' "$file" > "$TMP" + + # Replace tag in with new string + sed -i "s/^-xyz-COPYRIGHT-zyx-$/$COPYRIGHT/" "$TMP" + cp "$TMP" "$file" +done + +rm -f "$TMP" diff --git a/xml/be-xml-to-mbox b/xml/be-xml-to-mbox index e5fec3b..80db634 100755 --- a/xml/be-xml-to-mbox +++ b/xml/be-xml-to-mbox @@ -1,5 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2009 William Trevor King <wking@drexel.edu> +# Copyright (C) 2009 Chris Ball <cjb@laptop.org> +# W. Trevor King <wking@drexel.edu> # # 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 |