threads / patch / 9075

patchgit-svn: Minimalistic patch which allows svn usernames with space(s).

Subject: [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).

## tl;dr

4 messages between Jul 17, 2007 and Jul 18, 2007. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Richard MUSIL· Jul 17, 2007, 17:02 UTC · lore
Changed filter for username in svn-authors file, so even 'user name' is accepted.
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-svn.perl +1 −2
diff --git a/git-svn.perl b/git-svn.perl
index 01c3904..975075e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -740,7 +740,7 @@ sub load_authors {
        my $log = $cmd eq 'log';
        while (<$authors>) {
                chomp;
-               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
+               next unless /^(\.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
                my ($user, $name, $email) = ($1, $2, $3);
                if ($log) {
                        $Git::SVN::Log::rusers{"$name <$email>"} = $user;
--
1.5.1.6
Eric Wong· Jul 17, 2007, 19:55 UTC · re: Richard MUSIL · lore

Re: [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).

Richard MUSIL <richard.musil@st.com> wrote:
Show 15 quoted lines
> Changed filter for username in svn-authors file, so even 'user name' is accepted.
> ---
>  git-svn.perl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 01c3904..975075e 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -740,7 +740,7 @@ sub load_authors {
>         my $log = $cmd eq 'log';
>         while (<$authors>) {
>                 chomp;
> -               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> +               next unless /^(\.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
Surely you mean the following:
+               next unless /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;

(No "\" before the ".") "\." matches a dot/period (.), while "." matches anything.

-- 
Eric Wong
Eric Wong· Jul 18, 2007, 07:36 UTC · re: Eric Wong · lore

Re: [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).

Eric Wong <eric@petta-tech.com> wrote:
Show 23 quoted lines
> Richard MUSIL <richard.musil@st.com> wrote:
> > Changed filter for username in svn-authors file, so even 'user name' is accepted.
> > ---
> >  git-svn.perl |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/git-svn.perl b/git-svn.perl
> > index 01c3904..975075e 100755
> > --- a/git-svn.perl
> > +++ b/git-svn.perl
> > @@ -740,7 +740,7 @@ sub load_authors {
> >         my $log = $cmd eq 'log';
> >         while (<$authors>) {
> >                 chomp;
> > -               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> > +               next unless /^(\.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> 
> Surely you mean the following:
> 
> +               next unless /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> 
> (No "\" before the ".")   "\." matches a dot/period (.), while "."
> matches anything.
Fwiw, with the regexp corrected:
  Acked-by: Eric Wong <normalperson@yhbt.net>
-- 
Eric Wong
Richard MUSIL· Jul 18, 2007, 08:47 UTC · re: Eric Wong · lore

Re: [PATCH] git-svn: Minimalistic patch which allows svn usernames with space(s).

Eric Wong wrote:
Show 24 quoted lines
> Richard MUSIL <richard.musil@st.com> wrote:
>> Changed filter for username in svn-authors file, so even 'user name' is accepted.
>> ---
>>  git-svn.perl |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/git-svn.perl b/git-svn.perl
>> index 01c3904..975075e 100755
>> --- a/git-svn.perl
>> +++ b/git-svn.perl
>> @@ -740,7 +740,7 @@ sub load_authors {
>>         my $log = $cmd eq 'log';
>>         while (<$authors>) {
>>                 chomp;
>> -               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
>> +               next unless /^(\.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> 
> Surely you mean the following:
> 
> +               next unless /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
> 
> (No "\" before the ".")   "\." matches a dot/period (.), while "."
> matches anything.
> 
Yes! I am sorry for a confusion, I have tested it on '.' version, but committed the wrong one :(.
Richard

← back to recent threads