git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: git@vger.kernel.org
Cc: Eric Wong <normalperson@yhbt.net>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 1/2] git-svn: match SVN 1.5 behaviour of info' on unknown item
Date: Fri, 29 Aug 2008 15:42:48 +0200	[thread overview]
Message-ID: <1220017369-32637-2-git-send-email-trast@student.ethz.ch> (raw)
In-Reply-To: <1220017369-32637-1-git-send-email-trast@student.ethz.ch>

Previously 'git svn info unknown-file' only announced its failure (in
the SVN 1.4 style, "not a versioned resource"), and exited
successfully.

It is desirable to actually exit with failure, so change the code to
exit(1) under this condition.  Since that is already halfway SVN 1.5
compatibility, also change the error output to match 1.5.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
 git-svn.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 11ff813..bc181e0 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -832,8 +832,8 @@ sub cmd_info {
 	my ($file_type, $diff_status) = find_file_type_and_diff_status($path);
 
 	if (!$file_type && !$diff_status) {
-		print STDERR "$path:  (Not a versioned resource)\n\n";
-		return;
+		print STDERR "svn: '$path' is not under version control\n";
+		exit 1;
 	}
 
 	my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
-- 
1.6.0.1.98.g76a24

  reply	other threads:[~2008-08-29 13:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 19:32 [PATCH 0/6] 'git svn info' fixes Thomas Rast
2008-08-26 19:32 ` [PATCH 1/6] git svn info: tests: let 'init' test run with SVN 1.5 Thomas Rast
2008-08-26 19:32   ` [PATCH 2/6] git svn info: tests: do not use set -e Thomas Rast
2008-08-26 19:32     ` [PATCH 3/6] git svn info: tests: use test_cmp instead of git-diff Thomas Rast
2008-08-26 19:32       ` [PATCH 4/6] git svn info: tests: fix ptouch argument order in setup Thomas Rast
2008-08-26 19:32         ` [PATCH 5/6] git svn info: make info relative to the current directory Thomas Rast
2008-08-26 19:32           ` [PATCH 6/6] git svn info: always quote URLs in 'info' output Thomas Rast
2008-08-27  9:43             ` Eric Wong
2008-08-27  9:53 ` [PATCH 0/6] 'git svn info' fixes Eric Wong
2008-08-28  8:30   ` Thomas Rast
2008-08-29  8:16     ` Eric Wong
2008-08-29 13:42       ` [PATCH 0/2] *** SUBJECT HERE *** Thomas Rast
2008-08-29 13:42         ` Thomas Rast [this message]
2008-08-29 13:42           ` [PATCH 2/2] git-svn: fix 'info' tests for unknown items Thomas Rast
2008-08-30  1:03         ` [PATCH 0/2] 'git svn info' fixes Eric Wong
2008-09-01  9:46           ` Thomas Rast
2008-09-01 22:58             ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1220017369-32637-2-git-send-email-trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).