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

Subsystems: the rest

DORMANTno replies

4 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Richard MUSIL <hidden>
Date: 2016-06-15 22:43:22

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*$/;
                my ($user, $name, $email) = ($1, $2, $3);
                if ($log) {
                        $Git::SVN::Log::rusers{"$name <$email>"} = $user;
--
1.5.1.6

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

From: Eric Wong <hidden>
Date: 2016-06-15 22:43:22

Richard MUSIL [off-list ref] wrote:
quoted hunk
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

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

From: Eric Wong <hidden>
Date: 2016-06-15 22:43:22

Eric Wong [off-list ref] wrote:
Richard MUSIL [off-list ref] wrote:
quoted
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 [off-list ref]

-- 
Eric Wong

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

From: Richard MUSIL <hidden>
Date: 2016-06-15 22:43:22

Eric Wong wrote:
Richard MUSIL [off-list ref] wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help