Re: [PATCH 9/9] Add a sample user for the svndump library
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jun 24, 2010, 20:17 UTC
- Message-ID
- <AANLkTinnB_TRYa0nzJHHqbHuJk9a7tfk8mAhr95Sc98E@mail.gmail.com>
- In-Reply-To
- <20100624110752.GI12376@burratino>
Hi Jonathan,
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? Maybe using a generic $TEMP_DIRECTORY like /tmp in Unix and then getting rid of the files after the export is complete?
> +QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir > +QUIET_SUBDIR1 =
Show 9 quoted lines
> +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? Note: I couldn't understand most of the Makefile, so I just skipped it when I found similar declarations in the Git Makefile.
Show 13 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?
> +#include <stdlib.h> > +#include "../../vcs-svn/svndump.h"
Inelegant. Why not include ../../vcs-svn in the path you're searching for headers?
> +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?
> +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).
-- Ram