From a2a51929a848ffa6db92ec7218994461ecccb50a Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 19 May 2010 07:17:36 -0400 Subject: [PATCH] Fixed Eric Kow's _darcs/prefs/author bug. --- .../1b21dabc-a90c-4687-bea0-7e9e69956e23/body | 3 +++ .../1b21dabc-a90c-4687-bea0-7e9e69956e23/values | 11 +++++++++++ .../bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/values | 2 +- libbe/storage/vcs/darcs.py | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/comments/1b21dabc-a90c-4687-bea0-7e9e69956e23/body create mode 100644 .be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/comments/1b21dabc-a90c-4687-bea0-7e9e69956e23/values diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/comments/1b21dabc-a90c-4687-bea0-7e9e69956e23/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/comments/1b21dabc-a90c-4687-bea0-7e9e69956e23/body new file mode 100644 index 0000000..7485ebd --- /dev/null +++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/comments/1b21dabc-a90c-4687-bea0-7e9e69956e23/body @@ -0,0 +1,3 @@ +> libbe.mapfile.IllegalValue: Illegal value "Foo Bar \n" + +The trailing endline was the problem. Fixed now. diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/comments/1b21dabc-a90c-4687-bea0-7e9e69956e23/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/comments/1b21dabc-a90c-4687-bea0-7e9e69956e23/values new file mode 100644 index 0000000..6275e96 --- /dev/null +++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/comments/1b21dabc-a90c-4687-bea0-7e9e69956e23/values @@ -0,0 +1,11 @@ +Author: W. Trevor King + + +Content-type: text/plain + + +Date: Wed, 19 May 2010 11:16:23 +0000 + + +In-reply-to: 285006ba-16fc-4d09-86f1-893ff515e487 + diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/values index 0638e78..de23989 100644 --- a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/values +++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/5920ef40-ce56-44e0-9e2d-e9b888ab2880/values @@ -7,7 +7,7 @@ reporter: Eric Kow severity: minor -status: open +status: fixed summary: Fancy _darcs/prefs/author contents confuse be diff --git a/libbe/storage/vcs/darcs.py b/libbe/storage/vcs/darcs.py index b92977a..0f23278 100644 --- a/libbe/storage/vcs/darcs.py +++ b/libbe/storage/vcs/darcs.py @@ -120,7 +120,7 @@ class Darcs(base.VCS): for pref_file in ['author', 'email']: pref_path = os.path.join(darcs_dir, 'prefs', pref_file) if os.path.exists(pref_path): - return self._vcs_get_file_contents(pref_path) + return self._vcs_get_file_contents(pref_path).strip() for env_variable in ['DARCS_EMAIL', 'EMAIL']: if env_variable in os.environ: return os.environ[env_variable] -- 2.26.2