git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 0/2] 'git svn info' fixes
Date: Fri, 29 Aug 2008 18:03:19 -0700	[thread overview]
Message-ID: <20080830010319.GA2940@untitled> (raw)
In-Reply-To: <1220017369-32637-1-git-send-email-trast@student.ethz.ch>

Thomas Rast <trast@student.ethz.ch> wrote:
> Eric Wong wrote.
> > > So should we just change all "unknown foo" tests to verify that 'git
> > > svn info' errors out too?
> >
> > Yes, I see no reason to differ from plain svn here.
> 
> This starts getting more complicated at every turn.  The included
> mini-series (probably textually depends on the other 6 patches though)
> "fixes" this.
> 
> HOWEVER: Subversion itself broke compatibility here.  In 1.4:
> 
>   $ svn info new; echo $?
>   new:  (Not a versioned resource)
> 
>   0
> 
> Note the extra linebreak and successful exit.  Current git-svn
> precisely matches this output.  In 1.5, it's different:
> 
>   $ svn info new; echo $?
>   svn: 'new' is not under version control
>   1
> 
> While it is of course up to you what you would like to do (and modulo
> test_must_fail, 2/2 can still be used to fix the tests if you decide
> to reject 1/2), I suggest changing to 1.5 behaviour.  exit(1) is the
> sane thing to do in this case, and that is already breaking
> bit-for-bit compatibility with SVN 1.4, so we might as well adopt the
> new error message.  Of course this prevents us from comparing the
> output literally in the tests, so I settled for a slightly weaker
> check: failure status and mention of the filename.

Yes.  Please maintain compatibility with svn 1.5.  The current version
of git-svn should strive to maintain compatibility with the current
version of svn whenever possible.

> Unfortunately this does raise the question whether the URL-encoding
> issue treated in the other series is in fact a similar incompatibility
> between 1.4 and 1.5, not a (minor but long-standing) bug in git-svn.

It should match svn 1.5 for "git svn info".

Since "git svn info --url" is a git-svn-only thing, whatever makes the
most sense from a command-line scripting perspective (I don't have time
to check against a real repo right now):

For git-svn info --url, just want things like:

	svn log -v `git svn info --url`

	svn cp `git svn info --url` \
               `git svn info --url | sed -e 's,/trunk,/tags/1.0,'`

	svn rm `git svn info --url`

to just work.

I seem to recall the rules being slightly different for http(s):// and
(file://|svn://) URLs with the command-line client; but my memory may
just be fuzzy...

Thanks for looking into this!

-- 
Eric Wong

  parent reply	other threads:[~2008-08-30  1:15 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         ` [PATCH 1/2] git-svn: match SVN 1.5 behaviour of info' on unknown item Thomas Rast
2008-08-29 13:42           ` [PATCH 2/2] git-svn: fix 'info' tests for unknown items Thomas Rast
2008-08-30  1:03         ` Eric Wong [this message]
2008-09-01  9:46           ` [PATCH 0/2] 'git svn info' fixes 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

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

  git send-email \
    --in-reply-to=20080830010319.GA2940@untitled \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=trast@student.ethz.ch \
    /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.
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 NNTP newsgroup(s).