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

Re: Possible bug: git-svn leaves broken tree in case of error

From
EWEric Wong <normalperson@yhbt.net>
Date
Oct 31, 2007, 07:55 UTC
Message-ID
<20071031075524.GB7798@muzzle>
In-Reply-To
<1193729426.30755.32.camel@asl.dorms.spbu.ru>
Anton Korobeynikov <asl@math.spbu.ru> wrote:
Show 29 quoted lines
> Hello, Everyone.
> 
> I noticed this bug several times. Consider the following conditions are
> met:
> - We're syncing from svn using git-svn :)
> - We have authors file provided
> - We have a changeset with author unlisted in the authors file.
> 
> git-svn dies due to the following code:
> sub check_author {
>         my ($author) = @_;
>         if (!defined $author || length $author == 0) {
>                 $author = '(no author)';
>         }
>         if (defined $::_authors && ! defined $::users{$author}) {
>                 die "Author: $author not defined in $::_authors file\n";
>         }
>         $author;
> }
> 
> Unfortunately it leaves repository in some middle state: git-svn itself
> thinks, that it synced with everything, but git itself doesn't "see" any
> changesets anymore. I found no way to repair tree after such situation,
> so I had to repull from scratch.
> 
> I found myself, that this should be warning (and fix in this case is
> trivial), not error (maybe some commandline switch to control behaviour,
> etc). It can be even error, but breaking tree is definitely bug in this
> case.

You should be able to change the numbers in *-maxRev back to an old revision in .git/svn/.metadata. Does that fix things for you so you can resume synching again?

I'll have to investigate the die()-ing of check_authors since that should cause git-svn to quit before the maxRev numbers get incremented.

-- 
Eric Wong
Previous: Anton KorobeynikovNext: Eric Wong
Message 2 of 5 in “Possible bug: git-svn leaves broken tree in case of error”
  1. Anton KorobeynikovOct 30, 2007
  2. Eric WongOct 31, 2007
  3. Eric WongOct 31, 2007
  4. Karl HasselströmOct 31, 2007
  5. Anton KorobeynikovOct 31, 2007

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.