diff options
author | W. Trevor King <wking@drexel.edu> | 2009-06-30 11:29:06 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-06-30 11:29:06 -0400 |
commit | 1e8cc09743d624c52c192459c31773c6be288144 (patch) | |
tree | 4284c066658321a188a6b0ba5ba736db447637d1 /libbe/git.py | |
parent | db4adfd8be31c253239a54b5ae8a90af46bded7b (diff) | |
download | bugseverywhere-1e8cc09743d624c52c192459c31773c6be288144.tar.gz |
Added darcs support.
I don't know much darcs, so I make no claims about the beauty of my
implementation. It seems to get the job done though, until a darcs
guru comes along.
I also tweaked the libbe.git.Git._rcs_get_user_id to handle the case
where user.name or user.email are not set.
I also added the option to pass a stdin string into the
libbe.rcs.RCS._u_invoke* functions.
Diffstat (limited to 'libbe/git.py')
-rw-r--r-- | libbe/git.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libbe/git.py b/libbe/git.py index 5da1f86..8c25416 100644 --- a/libbe/git.py +++ b/libbe/git.py @@ -55,7 +55,14 @@ class Git(RCS): name = output.rstrip('\n') status,output,error = self._u_invoke_client("config", "user.email") email = output.rstrip('\n') - return self._u_create_id(name, email) + if name != "" or email != "": # got something! + # guess missing info, if necessary + if name == "": + name = self._u_get_fallback_username() + if email == "": + email = self._u_get_fallback_email() + return self._u_create_id(name, email) + return None # Git has no infomation def _rcs_set_user_id(self, value): name,email = self._u_parse_id(value) if email != None: |