Ticket #234 (closed bug: fixed)

Opened 6 years ago

Last modified 4 years ago

mk_gitignore.pl (lib/Parrot/Manifest.pm) needs svk

Reported by: fperrad Owned by:
Priority: normal Milestone:
Component: configure Version:
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:


I create a local repository with 'git-svn clone'. Now, I try to generate the .gitignore. I obtain the following error :

user@vm-xubuntu-8:~/git-svn/trunk$ perl tools/dev/mk_gitignore.pl

Can't exec "svk": No such file or directory at lib/Parrot/Manifest.pm line 25. Can't exec "svk": No such file or directory at lib/Parrot/Manifest.pm line 283. Use of uninitialized value $svnignore in substitution (s///) at lib/Parrot/Manifest.pm line 286. Use of uninitialized value $svnignore in split at lib/Parrot/Manifest.pm line 288.

(I had installed : git, git-svn but not svk)



parrot.manifest.coverage.excerpt.txt Download (37.5 KB) - added by jkeenan 6 years ago.
Parrot::Manifest: excerpt of coverage analysis on 'make manifest_tests'

Change History

Changed 6 years ago by jkeenan

Parrot::Manifest: excerpt of coverage analysis on 'make manifest_tests'

in reply to: ↑ description   Changed 6 years ago by jkeenan

I recall that we encountered problems like this one or two years ago when SVK was the shiny new thing in VCSes, a role in which git has since usurped it. It's also not surprising given that when tools/dev/mk_gitignore.pl was added to the repository, no unit tests were added to those run by make manifest_tests. (See attached coverage report for make manifest_tests.

Examining the code in lib/Parrot/Manifest.pm, I believe the line causing the problem is:

        cmd        => -d '.svn' ? 'svn' : 'svk',

So, if you don't have a .svn hidden directory underneath the top level of your sandbox, you're assumed to be running SVK instead of Subversion. My hunch is that you don't have such a .svn hidden directory in that location and, if you're running git, don't need one. But you don't have SVK installed either; hence the failures.

I'm not running git, so I don't know what an appropriate revision to lib/Parrot/Manifest.pm and the tests in t/manifest/*.t would be. François, could you, Barney or one of the other git advocates develop a patch? I would be happy to work with you toward getting this working for you.

Thank you very much

  Changed 5 years ago by Infinoid

Ok, I'm using git here, but I'm not really familiar with Manifest.pm and don't know what its specific needs are. So I'll start by discussing what a git checkout looks like, and various details related to that.

1. Git users do have a ".git" directory, but only in the root of the checkout, not one per subfolder the way svn does.

2. Just because someone's using git does not mean they are using git-svn directly. (I'm not; I'm using pure git on a dozen local checkouts across several machines and bouncing everything through a git-svn repo sitting on a remote but fast server.)

3. Even though there is a "git svn propget" command available for git-svn checkouts, it's not necessarily available in all git checkouts. And if you try to run it on a non git-svn checkout (like the kind I tend to use), the command just hangs at 100% CPU forever.

4. If you need to tell git-svn checkouts apart from straight git ones, I suppose you could look for the existence of the subdirectory ".git/svn/git-svn". But I would prefer solutions which work equally well for raw git checkouts, if possible.

5. No matter which kind of checkout you have, you can parse the output of "git ls-tree -r HEAD" to get a list of all the tracked files in the tree. The output of that looks like:

100644 blob 912cacd53dd0c3344c6af407a0150be8bce35355    tools/build/ops2c.pl
100644 blob 05e5b9c26f1f4ecfa7a73a7ed22337c82c02f528    tools/build/ops2pm.pl
100644 blob f31ddb9ca03769d1d4572aaff1fb3ff1805208b0    tools/build/parrot_config_c.pl
100644 blob 19645014f1a070b26257e6e331c6eae3cd51f59d    tools/build/pbcversion_h.pl
100644 blob e2aff93ab7581e5ca76975f70f9612fe895505cf    tools/build/pmc2c.pl
100644 blob b9ef9b1d0da041deefdd08f97901a6e768ac60a0    tools/build/vtable_extend.pl
100644 blob 32972fd744fb0d16461f0dc5cc1b135693e62bc4    tools/build/vtable_h.pl
100644 blob 693e7a8119f64b47bff029ea606ff5dfa3203ee0    tools/dev/.gdbinit
100755 blob 382c82ceb5338c184c6ae53b58cc01fa7a809389    tools/dev/as2c.pl
100644 blob 334c63d63095395f900511c8da607b5da0f19ff5    tools/dev/bench_op.pir
100644 blob ebfdddcc91e26b152af09ee819b5ee8acd9732a2    tools/dev/cc_flags.pl

With regards to the source line you mentioned above, I did try the following patch:

-        cmd        => -d '.svn' ? 'svn' : 'svk',
+        cmd        => -d '.svn' ? 'svn' : -d '.git' ? 'git' : 'svk',

This patch gets me farther, but I still get the following manifest_tests failures:

Test Summary Report
t/manifest/02-regenerate_file (Wstat: 256 Tests: 12 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t/manifest/03-regenerate_skip (Wstat: 256 Tests: 10 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1

I also get an error "git: 'propget' is not a git-command. See 'git --help'." from t/manifest/05-alt_skip.t and a few other tests, but those tests still seem to pass fine.

  Changed 5 years ago by Infinoid

As a reply to the OP, I should point out that the comments at the top of ./tools/dev/mk_gitignore.pl say:

So beware, this works only for a svn checkout and the result is only useful
for a git-svn checkout.

So it sounds like it wasn't designed to be run in a git-svn checkout, to begin with. For the purposes of generating .gitignore, "git svn propget" might work in place of "svn"/"svk". But I'm not sure the rest of Manifest.pm will work unchanged.

  Changed 5 years ago by jkeenan

  • component changed from none to configure

  Changed 4 years ago by bacek

  • status changed from new to closed
  • resolution set to fixed


I rewrote mk_gitignore to use MANIFEST.SKIP as source of truth. Resolving ticket.

-- Bacek

Note: See TracTickets for help on using tickets.