# [PATCH] git-svn: find-rev error message when missing arg

5 messages from 2008-03-11 to 2008-03-11. Participants: Marc-Andre Lureau (elmarco), Eric Wong, Marc-Andre Lureau, Marc-André Lureau.
Thread: https://gitlist.dev/t/12627

## Marc-Andre Lureau (elmarco), 2008-03-11 01:52

Subject: [PATCH] git-svn: find-rev error message when missing arg
Message-ID: <1205200346-5537-1-git-send-email-marcandre.lureau@gmail.com>
URL: https://gitlist.dev/e/1205200346-5537-1-git-send-email-marcandre.lureau%40gmail.com

```
Just let the user know that a revision argument is missing instead of a perl error. This error message mimic the "init" error message, but could be improved.
---
 git-svn.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 1195569..2ee7ca5 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -522,7 +522,8 @@ sub cmd_dcommit {
 }
 
 sub cmd_find_rev {
-	my $revision_or_hash = shift;
+	my $revision_or_hash = shift or die "SVN or git revison required ",
+	                                    "as a command-line argument\n";
 	my $result;
 	if ($revision_or_hash =~ /^r\d+$/) {
 		my $head = shift;
-- 
1.5.4.4.482.ga8b1

```

## Eric Wong, 2008-03-11 05:19

Subject: Re: [PATCH] git-svn: find-rev error message when missing arg
Message-ID: <20080311051910.GB9389@hand.yhbt.net>
URL: https://gitlist.dev/e/20080311051910.GB9389%40hand.yhbt.net
In-Reply-To: <1205200346-5537-1-git-send-email-marcandre.lureau@gmail.com>

```
"Marc-Andre Lureau (elmarco)" <marcandre.lureau@gmail.com> wrote:
> Just let the user know that a revision argument is missing instead of
> a perl error. This error message mimic the "init" error message, but
> could be improved.

Thanks Marc-Andre.  Three small things:

* Minor spelling error noted below.
* Please wrap your commit message lines at 72 characters or less.
* Sign-off?

Tentatively-Acked-by: Eric Wong <normalperson@yhbt.net>

> ---
>  git-svn.perl |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 1195569..2ee7ca5 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -522,7 +522,8 @@ sub cmd_dcommit {
>  }
>  
>  sub cmd_find_rev {
> -	my $revision_or_hash = shift;
> +	my $revision_or_hash = shift or die "SVN or git revison required ",
                                                        revision
> +	                                    "as a command-line argument\n";
>  	my $result;
>  	if ($revision_or_hash =~ /^r\d+$/) {
>  		my $head = shift;
> -- 

-- 
Eric Wong

```

## Marc-Andre Lureau, 2008-03-11 08:00

Subject: [PATCH] git-svn: find-rev error message when missing arg
Message-ID: <1205222445-8077-1-git-send-email-marcandre.lureau@gmail.com>
URL: https://gitlist.dev/e/1205222445-8077-1-git-send-email-marcandre.lureau%40gmail.com
In-Reply-To: <20080311051910.GB9389@hand.yhbt.net>

```
Just let the user know that a revision argument is missing instead of
a perl error. This error message mimic the "init" error message, but
could be improved.

Signed-off-by: Marc-Andre Lureau <marcandre.lureau@gmail.com>
---
 git-svn.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 1195569..d8b38c9 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -522,7 +522,8 @@ sub cmd_dcommit {
 }
 
 sub cmd_find_rev {
-	my $revision_or_hash = shift;
+	my $revision_or_hash = shift or die "SVN or git revision required ",
+	                                    "as a command-line argument\n";
 	my $result;
 	if ($revision_or_hash =~ /^r\d+$/) {
 		my $head = shift;
-- 
1.5.4.4.482.ga8b1

```

## Marc-André Lureau, 2008-03-11 08:04

Subject: Re: [PATCH] git-svn: find-rev error message when missing arg
Message-ID: <e29894ca0803110104g62cda988vf933349995673afd@mail.gmail.com>
URL: https://gitlist.dev/e/e29894ca0803110104g62cda988vf933349995673afd%40mail.gmail.com
In-Reply-To: <20080311051910.GB9389@hand.yhbt.net>

```
hi,

On Tue, Mar 11, 2008 at 7:19 AM, Eric Wong <normalperson@yhbt.net> wrote:
>
>  * Minor spelling error noted below.
>  * Please wrap your commit message lines at 72 characters or less.
>  * Sign-off?
>
>  Tentatively-Acked-by: Eric Wong <normalperson@yhbt.net>

oups, I was too tired, I hope this second patch is fine.
Thanks for reviewing :)

Regards,

-- 
Marc-André Lureau

```

## Eric Wong, 2008-03-11 20:46

Subject: Re: [PATCH] git-svn: find-rev error message when missing arg
Message-ID: <20080311204606.GC9389@hand.yhbt.net>
URL: https://gitlist.dev/e/20080311204606.GC9389%40hand.yhbt.net
In-Reply-To: <e29894ca0803110104g62cda988vf933349995673afd@mail.gmail.com>

```
Marc-André Lureau <marcandre.lureau@gmail.com> wrote:
> hi,
> 
> On Tue, Mar 11, 2008 at 7:19 AM, Eric Wong <normalperson@yhbt.net> wrote:
> >
> >  * Minor spelling error noted below.
> >  * Please wrap your commit message lines at 72 characters or less.
> >  * Sign-off?
> >
> >  Tentatively-Acked-by: Eric Wong <normalperson@yhbt.net>
> 
> oups, I was too tired, I hope this second patch is fine.
> Thanks for reviewing :)

Thanks for the patch and fixes Mark André

Acked-by: Eric Wong <normalperson@yhbt.net>

-- 
Eric Wong

```
