Thread (6 messages) flat view 6 messages, 2 authors, 2016-06-15

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

From: Marc-André Lureau <hidden>
Date: 2016-06-15 22:44:23

Hi

On Fri, Mar 14, 2008 at 12:18 AM, Martin Langhoff
[off-list ref] wrote:
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)
 > 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.
 > -     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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help