# [GSoC] Query regarding Microproject

6 messages from 2020-03-20 to 2020-03-25. Participants: Shanthanu Rai, Christian Couder, Shanthanu.
Thread: https://gitlist.dev/t/53038

## Shanthanu Rai, 2020-03-20 06:37

Subject: [GSoC] Query regarding Microproject
Message-ID: <CAGNOEmugZDWpvAHsOzmm_Fqo_Vj5GcC--GfTg3JHPm701HjBXA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGNOEmugZDWpvAHsOzmm_Fqo_Vj5GcC--GfTg3JHPm701HjBXA%40mail.gmail.com

```
Hi, I am a 3rd Computer Science Undergrad at National Institute of
Technology Surathkal, India. I wish to apply to git for GSoC.

I am currently working on the microproject titled "Avoid pipes in git
related commands in test scripts". I found 't/t9116-git-svn-log.sh' to
have some commands wherein output of git is redirected to grep (using
pipe). So shall I go ahead and make the required changes, i.e., redirect
the output of git to a file and grep this file, in the relevant commands?

--
Regards,
Shanthanu S Rai

```

## Christian Couder, 2020-03-20 13:41

Subject: Re: [GSoC] Query regarding Microproject
Message-ID: <CAP8UFD2bgzvc2K2Sj4HSeXo16kB8D8se=+=Y7gp6FN+4Y3C1BQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAP8UFD2bgzvc2K2Sj4HSeXo16kB8D8se%3D%2B%3DY7gp6FN%2B4Y3C1BQ%40mail.gmail.com
In-Reply-To: <CAGNOEmugZDWpvAHsOzmm_Fqo_Vj5GcC--GfTg3JHPm701HjBXA@mail.gmail.com>

```
Hi,

On Fri, Mar 20, 2020 at 7:39 AM Shanthanu Rai
<shanthanu.s.rai9@gmail.com> wrote:
>
> Hi, I am a 3rd Computer Science Undergrad at National Institute of
> Technology Surathkal, India. I wish to apply to git for GSoC.
>
> I am currently working on the microproject titled "Avoid pipes in git
> related commands in test scripts". I found 't/t9116-git-svn-log.sh' to
> have some commands wherein output of git is redirected to grep (using
> pipe). So shall I go ahead and make the required changes, i.e., redirect
> the output of git to a file and grep this file, in the relevant commands?

Yeah, sure.

In 't/t9116-git-svn-log.sh' it seems to me that some refactoring might
be needed too.

Best,
Christian.

```

## Shanthanu, 2020-03-20 16:27

Subject: Re: [GSoC] Query regarding Microproject
Message-ID: <47a1db25-914a-2e59-c0a6-6d0ff77bc2aa@gmail.com>
URL: https://gitlist.dev/e/47a1db25-914a-2e59-c0a6-6d0ff77bc2aa%40gmail.com
In-Reply-To: <CAP8UFD2bgzvc2K2Sj4HSeXo16kB8D8se=+=Y7gp6FN+4Y3C1BQ@mail.gmail.com>

```
Hey, I had faced some issues while running tests with the below command:
sh t9116-git-svn-log.sh

I ran the test without making any changes to the file.

To get more verbose output for the reason of failure, I ran:
sh t9116-git-svn-log.sh -v -i -d (-i to figure out why the first test fails)

In the verbose output, I got the below error msg:

Couldn't open a repository: Unable to connect to a repository at URL
'file:///{hidden}/git/t/trash%20directory.t9116-git-svn-log/svnrepo':
Unable to open an ra_local session to URL: Unable to open repository
'file:///{hidden}/git/t/trash%20directory.t9116-git-svn-log/svnrepo':
Expected FS format between '1' and '6'; found format '7' at
{hidden}/git/perl/build/lib/Git/SVN.pm line 310.

I can share the entire verbose output if needed.

On 20/03/20 7:11 pm, Christian Couder wrote:
> Hi,
>
> On Fri, Mar 20, 2020 at 7:39 AM Shanthanu Rai
> <shanthanu.s.rai9@gmail.com> wrote:
>> Hi, I am a 3rd Computer Science Undergrad at National Institute of
>> Technology Surathkal, India. I wish to apply to git for GSoC.
>>
>> I am currently working on the microproject titled "Avoid pipes in git
>> related commands in test scripts". I found 't/t9116-git-svn-log.sh' to
>> have some commands wherein output of git is redirected to grep (using
>> pipe). So shall I go ahead and make the required changes, i.e., redirect
>> the output of git to a file and grep this file, in the relevant commands?
> Yeah, sure.
>
> In 't/t9116-git-svn-log.sh' it seems to me that some refactoring might
> be needed too.
>
> Best,
> Christian.

```

## Shanthanu, 2020-03-21 09:49

Subject: Re: [GSoC] Query regarding Microproject
Message-ID: <d676674d-7ab5-b476-8dbb-2b3323db2c89@gmail.com>
URL: https://gitlist.dev/e/d676674d-7ab5-b476-8dbb-2b3323db2c89%40gmail.com
In-Reply-To: <47a1db25-914a-2e59-c0a6-6d0ff77bc2aa@gmail.com>

```
I found the solution to my issue. The main error message I had got was

> Expected FS format between '1' and '6'; found format '7' at
> {hidden}/git/perl/build/lib/Git/SVN.pm line 310.
After some online searches, I found out that file system format 7
was 'understood' by subversion 1.9 (Filesystem formats section in
https://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_fs_fs/structure).
That's when I realized I was using version 1.9 of subversion.

When I downgraded to subversion 1.8 (which understands file format 6),
all tests passed.

So shouldn't the test file itself have mentioned (say as a comment at 
the top
or in a separate README) that it was expecting subversion 1.8 or lesser on
the system? I am using Ubuntu 18.04 and by default the package manager
installs subversion 1.9.

This issue might also be present in other git-svn test files. (I haven't 
checked
though, not sure how to run just git-svn tests)


```

## Christian Couder, 2020-03-23 19:31

Subject: Re: [GSoC] Query regarding Microproject
Message-ID: <CAP8UFD3fAQyiXsO0w_uG6Oe8EfvkL6=ijUqHp4j8GD8A50Jo+g@mail.gmail.com>
URL: https://gitlist.dev/e/CAP8UFD3fAQyiXsO0w_uG6Oe8EfvkL6%3DijUqHp4j8GD8A50Jo%2Bg%40mail.gmail.com
In-Reply-To: <d676674d-7ab5-b476-8dbb-2b3323db2c89@gmail.com>

```
On Sat, Mar 21, 2020 at 10:49 AM Shanthanu <shanthanu.s.rai9@gmail.com> wrote:
>
> I found the solution to my issue. The main error message I had got was
>
> > Expected FS format between '1' and '6'; found format '7' at
> > {hidden}/git/perl/build/lib/Git/SVN.pm line 310.
> After some online searches, I found out that file system format 7
> was 'understood' by subversion 1.9 (Filesystem formats section in
> https://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_fs_fs/structure).
> That's when I realized I was using version 1.9 of subversion.
>
> When I downgraded to subversion 1.8 (which understands file format 6),
> all tests passed.

Great!

> So shouldn't the test file itself have mentioned (say as a comment at
> the top
> or in a separate README) that it was expecting subversion 1.8 or lesser on
> the system? I am using Ubuntu 18.04 and by default the package manager
> installs subversion 1.9.

It would be better if the test could be fixed to work with subversion
1.9. Otherwise the test could perhaps check the subversion version and
run only if subversion is version 1.8 or lesser.

> This issue might also be present in other git-svn test files. (I haven't
> checked
> though, not sure how to run just git-svn tests)

Maybe with something like:

$ cd t
$ prove --jobs 8 t91*-svn*.sh

```

## Shanthanu, 2020-03-25 13:51

Subject: Re: [GSoC] Query regarding Microproject
Message-ID: <165cc039-2092-2520-e23e-5734fd3fc0f8@gmail.com>
URL: https://gitlist.dev/e/165cc039-2092-2520-e23e-5734fd3fc0f8%40gmail.com
In-Reply-To: <CAP8UFD3fAQyiXsO0w_uG6Oe8EfvkL6=ijUqHp4j8GD8A50Jo+g@mail.gmail.com>

```

On 24/03/20 1:01 am, Christian Couder wrote:
>> So shouldn't the test file itself have mentioned (say as a comment at
>> the top
>> or in a separate README) that it was expecting subversion 1.8 or lesser on
>> the system? I am using Ubuntu 18.04 and by default the package manager
>> installs subversion 1.9.
> It would be better if the test could be fixed to work with subversion
> 1.9. Otherwise the test could perhaps check the subversion version and
> run only if subversion is version 1.8 or lesser.

Yeah that makes sense. I will try to look into how the tests can be
fixed to work with svn 1.9.

>> This issue might also be present in other git-svn test files. (I haven't
>> checked
>> though, not sure how to run just git-svn tests)
> Maybe with something like:
>
> $ cd t
> $ prove --jobs 8 t91*-svn*.sh

Thanks. I ran the command and found that all tests (except t9119) fail for
svn 1.9 and pass for 1.8.
t9119 gives the below output for svn 1.8:
skipped: skipping svn-info test (SVN version: 1.8.13 not supported)

't9119-git-svn-info.sh' seems to already have the code to check
the version of subversion. So we could use the same code to check
the correct version in 'lib-git-svn.sh'?

Note that I haven't checked which all subversion versions work for
a given test (only know that svn 1.8 works for all).


```
