Skip to contentSkip to conversation

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

PATCH In review Richard MUSIL 2 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-svn: Minimalistic patch which allows svn usernames with space(s).

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(-)
git-svn.perl +1 -1
index 01c3904..975075e 100755
@@ -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

#1 lore raw
Quoted 10 lines · Richard MUSIL

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(-)
git-svn.perl +0 -0
index 01c3904..975075e 100755

git-svn.perl sub load_authors { · line 743

Quoted 5 lines
git-svn.perl +1 -1
@@ -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.

Signature · 1 line
Eric Wong
Acked-by
#2 lore raw
Quoted 19 lines · Eric Wong
Quoted 10 lines · Richard MUSIL

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(-)
git-svn.perl +0 -0
index 01c3904..975075e 100755

git-svn.perl sub load_authors { · line 743

Quoted 5 lines
git-svn.perl +1 -1
@@ -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:

Quoted 4 lines

+ next unless /^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;

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

Fwiw, with the regexp corrected:

Signature · 1 line
Eric Wong
#3 lore raw
In reply to Eric Wong
Quoted 19 lines · Eric Wong
Quoted 10 lines · Richard MUSIL

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(-)
git-svn.perl +0 -0
index 01c3904..975075e 100755

git-svn.perl sub load_authors { · line 743

Quoted 5 lines
git-svn.perl +1 -1
@@ -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:

Quoted 5 lines

+ 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