Rev 21: remove iam, because 'bzr whoami FOO' does the same thing in http://bzr.arbash-meinel.com/plugins/ezbzr-jam
John Arbash Meinel
john at arbash-meinel.com
Mon Feb 12 20:42:52 GMT 2007
At http://bzr.arbash-meinel.com/plugins/ezbzr-jam
------------------------------------------------------------
revno: 21
revision-id: john at arbash-meinel.com-20070212204249-yk9418a2pntj6yoj
parent: mgrnatem at mgrnatem00.asbury.edu-20060407163335-9ef044a85a9493cd
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: ezbzr
timestamp: Mon 2007-02-12 14:42:49 -0600
message:
remove iam, because 'bzr whoami FOO' does the same thing
removed:
iam.py iam.py-20060116232304-cf09c3c5b4bfcea1
modified:
__init__.py __init__.py-20060116232304-b19ce1b14f814ea3
-------------- next part --------------
=== removed file 'iam.py'
--- a/iam.py 2006-01-18 16:07:06 +0000
+++ b/iam.py 1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-
-"""iam -- Sets the committer's identity.
-Copyright 2005 -- Nathaniel McCallum <npmccallum at gentoo.org>
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-"""
-
-import email.Utils
-import os
-
-import bzrlib
-import bzrlib.config
-import bzrlib.errors
-
-class InvalidSyntax(bzrlib.errors.BzrNewError):
- """'%(my_id)s' is invalid syntax! Try: 'Full Name <email at address.com>'"""
-
-class cmd_iam(bzrlib.commands.Command):
- """Sets user's identity (syntax: 'Full Name <email at address.com>')"""
- takes_args = ['my_id']
-
- @bzrlib.commands.display_command
- def run(self, my_id):
-
- if not my_id:
- raise InvalidSyntax(my_id="")
-
- # Validate input
- name, mail = email.Utils.parseaddr(my_id)
- if not name:
- raise InvalidSyntax(my_id=my_id)
- else:
- my_id = "%s <%s>" % (name, mail)
-
- # Make sure we have the config dir
- config_dir = bzrlib.config.config_dir()
- if os.path.exists(config_dir) and not bzrlib.osutils.isdir(config_dir):
- os.remove(config_dir)
- if not os.path.exists(config_dir):
- os.mkdir(config_dir)
-
- # Set the id
- co = bzrlib.util.configobj.configobj.ConfigObj(bzrlib.config.config_filename())
- if not co.has_key("DEFAULT"):
- co["DEFAULT"] = {}
- co["DEFAULT"]["email"] = my_id
- co.write()
-
-bzrlib.commands.register_command(cmd_iam)
-
=== modified file '__init__.py'
--- a/__init__.py 2006-01-25 16:40:14 +0000
+++ b/__init__.py 2007-02-12 20:42:49 +0000
@@ -17,6 +17,5 @@
"""
from foreach import *
-from iam import *
from release import *
from diffstatus import *
More information about the bazaar-commits
mailing list