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

Re: [PATCH 9/9] Add a sample user for the svndump library

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jun 24, 2010, 20:30 UTC
Message-ID
<20100624203041.GA2262@burratino>
In-Reply-To
<AANLkTinnB_TRYa0nzJHHqbHuJk9a7tfk8mAhr95Sc98E@mail.gmail.com>
Ramkumar Ramachandra wrote:
> Jonathan Nieder wrote:
>> NEEDSWORK: litters cwd with useless .bin files.
>> But I hope it is enough to show the idea.
>
> How do you propose we solve this?

Turn off persistence until it is ready. At that point, we will need to access the target git repo anyway, so we can keep extra metadata in the .git directory.

Show 15 quoted lines
> > +QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
> > +QUIET_SUBDIR1 =
> 
> > +ifneq ($(findstring $(MAKEFLAGS),s),s)
> > +ifndef V
> > +       QUIET_CC      = @echo '   ' CC $@;
> > +       QUIET_LINK    = @echo '   ' LINK $@;
> > +       QUIET_SUBDIR0 = +@subdir=
> > +       QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
> > +                       $(MAKE) $(PRINT_DIR) -C $$subdir
> > +endif
> > +endif
> 
> I saw this in the Git Makefile too, but I didn't understand the logic
> behind it. Could you explain it to me?
See commit 74f2b2a.
Summary: this produces the
    CC foo.o

lines. The idea is that long command lines distract from what is more important, which is the compiler output. The behavior can be turned off with “make V=1” or “make -s”.

Show 16 quoted lines
>> diff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c
>> new file mode 100644
>> index 0000000..d84dd4f
>> --- /dev/null
>> +++ b/contrib/svn-fe/svn-fe.c
>> @@ -0,0 +1,43 @@
>> +/*
>> + * Parse and rearrange a svnadmin dump.
>> + * Create the dump with:
>> + * svnadmin dump --incremental -r<startrev>:<endrev> <repository> >outfile
>> + *
>> + * Copyright (C) 2010 David Barr <david.barr@cordelta.com>.
>> + * All rights reserved.
>
> That's a huge license header applies just to the trivial five-line
> program, right? Is it necessary at all?

I dunno. I included the license header instead of refering to LICENSE because this file tends to be installed in /usr/share/doc/git/contrib and LICENSE does not.

Maybe the file should get a simpler license?  e.g.:
 This file is in the public domain.
 You may freely use, modify, distribute, and relicense it.
Show 5 quoted lines
>> +#include <stdlib.h>
>> +#include "../../vcs-svn/svndump.h"
>
> Inelegant. Why not include ../../vcs-svn in the path you're searching
> for headers?
Right, this should be changed to
 #include <stdlib.h>
 #include "vcs-svn/svndump.h"
Show 6 quoted lines
>> +svnadmin dump --incremental REPO | svn-fe [url] | git fast-import
>
> If the user doesn't have a clue about SVN, they won't know what REPO
> is here: Without knowing anything about svnadmin, I'd naively try it
> with a remote repository. Maybe include a note about having to mirror
> a complete repository locally using svnsync (or otherwise) first?
Sounds reasonable.  Care to suggest wording?
>> +Converts a textual representation of a Subversion repository into
>> +input suitable for git-fast-import(1) and similar importers.
>
> To be more specific, "Subversion dumpfile (version: 2)" from FILE(1).
Do version 3 dumpfiles fail?
Jonathan
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 29 of 35 in “Subversion dump parsing library”
  1. 0/9 Subversion dump parsing libraryJonathan Nieder, Jun 24, 2010
  2. 1/9 Export parse_date_basic() to convert a date string to timestampJonathan Nieder, Jun 24, 2010
  3. Ramkumar RamachandraJun 24, 2010
  4. 2/9 Introduce vcs-svn libJonathan Nieder, Jun 24, 2010
  5. Ramkumar RamachandraJun 24, 2010
  6. 3/9 Add memory pool libraryJonathan Nieder, Jun 24, 2010
  7. Ramkumar RamachandraJun 24, 2010
  8. Jonathan NiederJun 24, 2010
  9. Ramkumar RamachandraJun 24, 2010
  10. Jonathan NiederJun 24, 2010
  11. Ramkumar RamachandraJun 24, 2010
  12. 4/9 Add treap implementationJonathan Nieder, Jun 24, 2010
  13. Ramkumar RamachandraJun 24, 2010
  14. Jonathan NiederJun 24, 2010
  15. 5/9 Add string-specific memory poolJonathan Nieder, Jun 24, 2010
  16. Ramkumar RamachandraJun 24, 2010
  17. 6/9 Add stream helper libraryJonathan Nieder, Jun 24, 2010
  18. Ramkumar RamachandraJun 24, 2010
  19. Jonathan NiederJun 24, 2010
  20. 7/9 Add infrastructure to write revisions in fast-export formatJonathan Nieder, Jun 24, 2010
  21. Ramkumar RamachandraJun 24, 2010
  22. Jonathan NiederJun 24, 2010
  23. Jonathan NiederJun 24, 2010
  24. Ramkumar RamachandraJun 24, 2010
  25. 8/9 Add SVN dump parserJonathan Nieder, Jun 24, 2010
  26. Ramkumar RamachandraJun 24, 2010
  27. 9/9 Add a sample user for the svndump libraryJonathan Nieder, Jun 24, 2010
  28. Ramkumar RamachandraJun 24, 2010
  29. Jonathan NiederJun 24, 2010
  30. Ramkumar RamachandraJun 24, 2010
  31. Jonathan NiederJun 24, 2010
  32. Sam VilainJun 30, 2010
  33. Ramkumar RamachandraJun 24, 2010
  34. Jonathan NiederJun 24, 2010
  35. Jonathan NiederJun 24, 2010

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.