Re: Cannot push anything via export transport helper after push fails.
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 11, 2013, 13:57 UTC
- Message-ID
- <CAMP44s1YhQR0o-0CLc2PG-EJTZdN4tha-4BVEUy-K_Av81D=GQ@mail.gmail.com>
- In-Reply-To
- <20130511162936.0354e5d7@opensuse.site>
On Sat, May 11, 2013 at 7:29 AM, Andrey Borzenkov <arvidjaar@gmail.com> wrote:
Show 25 quoted lines
> I noticed that using git-remote-bzr, but as far as I can tell this is > generic for all transport helpers using fast-export. > > > > What happened was "git push" failed due to merge conflict. So far so > good - but from now on git assumes everything is up to date. > > bor@opensuse:/tmp/test/git> git push origin master > To bzr::bzr+ssh://bor@localhost/tmp/test/bzr > ! [rejected] master -> master (non-fast-forward) > error: failed to push some refs to 'bzr::bzr+ssh://bor@localhost/tmp/test/bzr' > hint: Updates were rejected because the tip of your current branch is behind > hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') > hint: before pushing again. > hint: See the 'Note about fast-forwards' in 'git push --help' for details. > bor@opensuse:/tmp/test/git> git push origin master > Everything up-to-date > bor@opensuse:/tmp/test/git> > > The problem seems to be that git fast-export updates marks > unconditionally, whether export actually applied or not. So next time > it assumes everything is already exported and does nothing. > > Is it expected behavior?
Indeed, this is the way it currently works, and it's not easy to fix. We would need some way to make fast-export wait until we know the exit status of the remote helper, and then tell it when it failed, so the marks are not updated.
However, the way remote-bzr/hg work is that the commits are still there anyway. So if you merge the next time you push those commits are already converted, so it's not a problem if fast-export is not exporting them again.
So even though it's not ideal, it should work.
The problem is when the remote-helper crashes and the marks of fast-export and the remote-helper are out of sync, and then the user is really screwed.
Cheers.
-- Felipe Contreras