threads / discuss / 53038

[GSoC] Query regarding Microproject

Subject: [GSoC] Query regarding Microproject

## tl;dr

6 messages between Mar 20, 2020 and Mar 25, 2020.

replies: 5people: 2as markdown or json

Shanthanu Rai· Mar 20, 2020, 06:37 UTC · lore

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· Mar 20, 2020, 13:41 UTC · re: Shanthanu Rai · lore

Re: [GSoC] Query regarding Microproject

Hi,

On Fri, Mar 20, 2020 at 7:39 AM Shanthanu Rai <shanthanu.s.rai9@gmail.com> wrote:

Show 9 quoted lines
>
> 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· Mar 20, 2020, 16:27 UTC · re: Christian Couder · lore

Re: [GSoC] Query regarding Microproject

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:
Show 19 quoted lines
> 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· Mar 21, 2020, 09:49 UTC · re: Shanthanu · lore

Re: [GSoC] Query regarding Microproject

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· Mar 23, 2020, 19:31 UTC · re: Shanthanu · lore

Re: [GSoC] Query regarding Microproject

On Sat, Mar 21, 2020 at 10:49 AM Shanthanu <shanthanu.s.rai9@gmail.com> wrote:
Show 12 quoted lines
>
> 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!
Show 5 quoted lines
> 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· Mar 25, 2020, 13:51 UTC · re: Christian Couder · lore

Re: [GSoC] Query regarding Microproject

On 24/03/20 1:01 am, Christian Couder wrote:
Show 8 quoted lines
>> 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.

Show 7 quoted lines
>> 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).

← back to recent threads