Thread (27 messages) flat view 27 messages, 10 authors, 2016-06-15

Re: git-svn and huge data and modifying the git-svn-HEAD branch directly

From: Nicolas Vilz 'niv' <hidden>
Date: 2016-06-15 22:42:20

Nicolas Vilz 'niv' [off-list ref] wrote:
quoted
hi everyone,

as i mentioned, i do experimental work with git and svn... and i
experienced some problems with git when pulling much data from svn.

Actually that happens after i commit a revision with many and big files.
After that i cannot do a git-svn fetch anymore because git-svn
complains...

fatal: Ref refs/heads/svn-git-HEAD is at
504721bf4b2702d3e56cef69950f42a43568e846 but expected
504721bf4b2702d3e56cef69950f42a43568e846
Those messages are from git-update-ref.  What were some of the messages
from git-svn leading up to that point?
quoted
now i am a little confused about that... oh, i actually modified the
svn-git directly instead of a private working branch... perhaps that was
not intended.
You should never, ever modify the git-svn-HEAD branch yourself.
Interface branches should never be modified.  It's the golden rule of
interfacing between different SCM interfaces.  Sorry, I've been doing
things like this this for a while now I guess I didn't make it
abundantly clear in the documentation.
ok, i experienced that on little modifications on the git-svn-HEAD branch
either... so its really about modifying and not about the huge data
ammount...

quoted
now i am still on rev 2 on this branch but i updated it to rev 5 on the
svn-side...

any hints?
Save your current work in git-svn-HEAD to a private branch

	git branch -b private git-svn-HEAD

then reset git-svn-HEAD to the last revision where it was managed by
git-svn fetch:

	git-checkout git-svn-HEAD
	git-log (look for the last commit with 'git-svn-id:' in it)
	git-reset --hard <last commit with 'git-svn-id:' in it>

Now go to your private branch:

	git checkout private

And continue working on your private branch as usual.
I will keep that in mind for the future. Fortunatelly i am still testing
and i saved the git repository before experimenting with git-svn.

Have you any suggestions howto migrate a git-repository to svn and then
work with git-svn on both of it? I tried cg-merge -j to merge my git
branch with the private git svn branch, i am allowed to modify safely.

that does work actually... now i can start getting this automated.

perhaps i will write a patch with that automated script, when it is
finished, just to contribute git.


Sincerly
Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help