git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-svn: Support for git-svn propset

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Dec 7, 2014, 09:23 UTC
Message-ID
<CAPig+cTH5XXxMkaB9HOSm6ppFuZj4fVnCRmbSva2i_h5d4QVOA@mail.gmail.com>
In-Reply-To
<5484090C.8070101@web.de>
On Sun, Dec 7, 2014 at 3:00 AM, Torsten Bögershausen <tboegi@web.de> wrote:
Show 23 quoted lines
> On 2014-12-07 06.45, Torsten Bögershausen wrote:
> []
>>> +
>>> +test_expect_success 'add multiple props' '
>>> +    git svn propset svn:keywords "FreeBSD=%H" foo &&
>>> +    git svn propset fbsd:nokeywords yes foo &&
>>> +    echo hello >> foo &&
>>> +    git commit -m "testing propset" foo &&
>>> +    git svn dcommit
>>> +    svn_cmd co "$svnrepo" svn_project &&
>>> +    (cd svn_project && test "`svn propget svn:keywords foo`" = "FreeBSD=%H") &&
>>> +    (cd svn_project && test "`svn propget fbsd:nokeywords foo`" = "yes") &&
>>> +    (cd svn_project && test "`svn proplist -q foo | wc -l`" -eq 2) &&
>>> +    rm -rf svn_project
>>> +    '
>>> +
>> Ah, another small thing:
>> the "wc -l" will not work under Mac OS X.
>> Please see test_line_count() in t/test-lib-functions.sh
>>
> My excuse:
> I think I am wrong here and I need to correct myself after having looked at other TC's.
> The "wc -l" should work under Mac OS X.

More specifically: On Mac OS X, "wc -l" outputs "{whitespace}number" which won't match "2" with the string '=' operator, however, this case works because the '-eq' operator coerces the output of "wc -l" to a number, which can match the 2.

Previous: Torsten Bögershausen
Message 6 of 6 in “git-svn: Support for git-svn propset”
  1. git-svn: Support for git-svn propsetAlfred Perlstein, Dec 6, 2014
  2. Eric WongDec 7, 2014
  3. Alfred PerlsteinDec 7, 2014
  4. Torsten BögershausenDec 7, 2014
  5. Torsten BögershausenDec 7, 2014
  6. Eric SunshineDec 7, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.