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

Re: [PATCH] git-cvsimport: fix initial checkout

From
Marc-André Lureau <marcandre.lureau@gmail.com>
Date
Mar 13, 2008, 23:04 UTC
Message-ID
<e29894ca0803131604qa61adfbo22ff75d076feb899@mail.gmail.com>
In-Reply-To
<47D9A836.9010601@catalyst.net.nz>
Hi

On Fri, Mar 14, 2008 at 12:18 AM, Martin Langhoff <martin@catalyst.net.nz> wrote:

Show 10 quoted lines
> Marc-Andre Lureau wrote:
>  > git-symbolic-ref HEAD returns master reference, even if the file does
>  > not exists. That prevents the initial checkout and fails in
>  > git-rev-parse.
>
>  But you are patching the block that gets triggered on subsequent
>  imports, this code does not deal with "initial checkout" unless
>  something else is wrong. The line right above the open() is an else that
>  has the block that matters.
>
Yeah, it failed in the middle of a ~4h import, I did not restart it.

git-cvsimport -r cvs -p b,HEAD -k -m -a -v -d :pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer -C gst-plugins-good gst-plugins-good

This is a quite problematic CVS, btw. (missing patches/files in the end, branch merge fail ... see my previous patch)

Show 6 quoted lines
>  > The patch checks the existence of the reference file
>  > before assuming an original branch exists. There might be better
>  > solutions than checking file existence.
>
>  There are indeed. If we need this patch -- then you can call git
>  ref-parse right to see if you get a sha1.

Ok, which one is prefered? ref-parse I guess? I am mostly ignorant of all the plumbing stuff.

Show 6 quoted lines
>  > -     unless ($last_branch) {
>  > +     if (-f "$git_dir/$last_branch") {
>
>  Note that the file won't exist there in any modern git. It will be in
>  $git_dir/refs/heads/$last_branch. Did you test this patch?
>

Crap. The patch indeed worked, because the file did not exist. The second time it also worked:

skip patchset 5825: 1205277122 before 1205418644 skip patchset 5826: 1205418644 before 1205418644 DONE. Already up-to-date. *** Building gst-plugins-good *** [1/145] make -j2

Result is here: http://git.infradead.org/users/elmarco/gst-plugins-good.git
Thanks for the review!!
-- 
Marc-André Lureau
Previous: Martin LanghoffNext: Marc-André Lureau
Message 4 of 9 in “git-cvsimport: fix initial checkout”
  1. git-cvsimport: fix initial checkoutMarc-Andre Lureau, Mar 13, 2008
  2. Junio C HamanoMar 13, 2008
  3. Martin LanghoffMar 13, 2008
  4. Marc-André LureauMar 13, 2008
  5. Marc-André LureauMar 13, 2008
  6. Martin LanghoffMar 13, 2008
  7. Junio C HamanoMar 13, 2008
  8. Martin LanghoffMar 13, 2008
  9. Marc-André LureauMar 13, 2008

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.