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

Re: git-svn failure when symlink added in svn

From
Seth Falcon <sethfalcon@gmail.com>
Date
May 1, 2007, 17:49 UTC
Message-ID
<m2wszsigcd.fsf@ziti.local>
In-Reply-To
<20070430154359.GD1800@untitled>
Eric Wong <normalperson@yhbt.net> writes:
Show 25 quoted lines
> Seth Falcon <sethfalcon@gmail.com> wrote:
>> Eric Wong <normalperson@yhbt.net> writes:
>> 
>> > Seth Falcon <sethfalcon@gmail.com> wrote:
>> >> Eric: is there any way to undo some of the svn revs that have been
>> >> retrieved using git-svn fetch and then refetch them? 
>> 
>> > Assuming you're not using something crazy like noMetadata, you can just
>> > use update-ref on the remote heads to the last known good revisions and
>> > remove the associated .rev_db files.
>> >
>> > Otherwise you'll have to delete entries from the .rev_db files, the
>> > format is one line per-revision, the revision is the line number of the
>> > file.
>> 
>> Hmm, not sure I understood.  Here's what I tried:
>> 
>> I'm tracking two branches via git-svn.  For each, I used git log
>> remotes/<branch> to find a revision that I expect to be ok and noted
>> the sha1.  Then I did: 
>> 
>>     git-update-ref remotes/git-svn a27b11c1
>
> You may need to specify "refs/": "refs/remotes/git-svn".
> Is there a .git/remotes/git-svn ref file now?

Yes. I removed those and redid the git-update-ref specifying refs/remotes/git-svn and the branch I have.

Show 9 quoted lines
>> Did I miss a step or misunderstand how to undo?  What's strange is
>> that if I do git show 0f12c8c, I see a patch that is looks like it came
>> from a fetch using the my broken version of git-svn -- do I need to
>> clear out objects before refetching?
>
> I might have left some steps (I've been all over the place lately :/).
> You probably need to do all that and also need to edit
> .git/svn/.metadata and set the {branches,tags}-maxRev fields to the last
> known good revisions if you use globs.

I ran git-gc --prune. I also took a look at .git/svn/.metadata, but all I have there is:

    ; This file is used internally by git-svn
    ; You should not have to edit it
    [svn-remote "svn"]
            uuid = 00db46b3-68df-0310-9c12-caf00c1e9a41

So I left that alone. I tried refetching and end up with the following error after the rev dbs were rebuilt:

    error: invalid object 67e31e0ada47e8e9d15547ff1a48298869b3907b
    fatal: git-write-tree: error building trees
    write-tree: command returned error: 128

I found a backup of this repository and will use that. Since I have a backup, it isn't worth the effort. I think the obvious lesson is to use a copy of a repos when testing git-svn so you can throw it away if things go awry.

+ seth
Previous: Eric Wong
Message 24 of 24 in “git-svn failure when symlink added in svn”
  1. Seth FalconApr 14, 2007
  2. Eric WongApr 14, 2007
  3. Seth FalconApr 16, 2007
  4. Alexander KlinkApr 26, 2007
  5. Linus TorvaldsApr 27, 2007
  6. Alexander KlinkApr 28, 2007
  7. Seth FalconApr 28, 2007
  8. Junio C HamanoApr 28, 2007
  9. Seth FalconApr 28, 2007
  10. Junio C HamanoApr 28, 2007
  11. Seth FalconApr 28, 2007
  12. Junio C HamanoApr 28, 2007
  13. Eric WongApr 29, 2007
  14. Junio C HamanoApr 29, 2007
  15. Eric WongApr 29, 2007
  16. Alexander KlinkApr 30, 2007
  17. Junio C HamanoApr 30, 2007
  18. Eric WongApr 30, 2007
  19. Seth FalconApr 30, 2007
  20. Alexander KlinkMay 1, 2007
  21. Eric WongApr 29, 2007
  22. Seth FalconApr 30, 2007
  23. Eric WongApr 30, 2007
  24. Seth FalconMay 1, 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.