git export problem
(1) By anonymous on 2019-10-03 20:08:25 [link] [source]
Hi all,
Struggling to do a git export, am I missing something?
Using Windows, trunk build of fossil and the latest Git (2.23.0.windows.1)
Output below
[fossil:trunk] $ fsl git export c:/Dev/test
git init "C:/Dev/test"
Initialized empty Git repository in C:/Dev/test/.git/
git fast-import --export-marks=.mirror_state/marks.txt --quiet --done
fatal: Branch name doesn't conform to GIT standards: refs/heads/master
fast-import: dumping crash report to .git/fast_import_crash_19432
48 check-ins added to the C:/Dev/test
git update-ref "refs/heads/master"
usage: git update-ref [<options>] -d <refname> [<old-val>]
or: git update-ref [<options>] <refname> <new-val> [<old-val>]
or: git update-ref [<options>] --stdin [-z]
-m <reason> reason of the update
-d delete the reference
--no-deref update <refname> not the one it points to
-z stdin has NUL-terminated arguments
--stdin read updates from stdin
--create-reflog create a reflog
git repack -adf
Nothing new to pack.
[fossil:trunk] $
(2) By Marcelo Huerta (richieadler) on 2019-10-08 01:13:07 in reply to 1 [link] [source]
Struggling to do a git export, am I missing something?
Wondering the same, I got the same error.
Fossil version 2.10 {cb13b61100}, git version 2.23.0.windows.1
(3) By anonymous on 2019-10-08 07:21:31 in reply to 2 [link] [source]
I thought the recent commits by Jan might've helped but don't seem to be having any luck still.
I seem to be having slightly more luck (but still not a directly workable git repo) by fossil git export --debug FILE
then reading that into git fast-import
; this is not perfect however!
(4) By anonymous on 2019-10-09 13:57:49 in reply to 3 [link] [source]
Ended up going back to fossil 2.8 and an empty git repo - not ideal but commits haven't been lost!
(5) By Marcelo Huerta (richieadler) on 2019-10-17 21:06:23 in reply to 1 [link] [source]
Running fossil version 2.11 {29a383e4b6}, still having the same error. I cannot avoid thinking that the problem is this first error:
fatal: Branch name doesn't conform to GIT standards: refs/heads/master
which was also reported above.
It would be nice to have some idea of what's failing.
(6) By Marcelo Huerta (richieadler) on 2019-10-27 19:23:34 in reply to 1 [source]
And still failing with fossil 2.11 a92d5a514d.
(7) By Richard Hipp (drh) on 2019-10-27 19:51:27 in reply to 5 [link] [source]
Since I don't have your repository and you have given us very few clues about how to reproduce the problem, there isn't much I can do about it.
What steps have you taken to try to debug the problem?
Did you run with the -v option to see if the more verbose output might give some extra clues? Have you tried to reproduce this problem with a smaller, artificial repository file, to try to determine what characteristics of the Fossil repository cause the problem to occur? Have you run with the --debug option and examined the git-fast-export text to try to figure out what is the branch name that Git does not like? The error message from Git is a clue - apparently it is unhappy with a branch name. Have you listed all the branches in your Fossil repository, then created separate dummy repositories, each with one of your branch names, and tried to export those, in order to narrow down which branch name Git is unhappy about?
(8) By Marcelo Huerta (richieadler) on 2019-10-27 21:10:12 in reply to 7 [link] [source]
-v has added information about missing files named after hashes, but not useful information.
AFAIK the branch names are valid:
alert-pendientes
autoasignar
avisos-autores
consolidado
consolidado-sin-trunc
datefix
default_vistas
depurar
descarga_y_remoto
etiquetas
evalscero
evaluador-form
fixilus
ilus
informes
lang
links-estados
lista-evaluadores
lista-tareas
listar_disponibles-refactor
mail-eol
mejorasilus
mensajes
mensajes-error
mensajes-rol-estado
mistake
msg-todos
new-bootstrap
notificar_pendientes
num_eval
numero_ejemplar
panel
peso
peso-innecesario
promedios-formato
promedios-refactor
promedios-unafila
tiempos_eval
tiempos_evaluadores-refactor
trunk
yagmail
zona_horaria
I created a minimum repository as follows (sensible information removed; lorem[1-3].txt are text files, the --nested switch is necessary because this is inside another existing working directory):
f new -A richieadler testrepo.fossil
f open testrepo.fossil --nested
f user default richieadler
f add lorem*.txt
f ci -m "Testing..." --branch autoasignar
f git export -v GitOutput --autopush https://richieadler:*******!@github.com/richieadler/******.git
And after the files are committed I get a very similar error:
git init "H:/MARCELO/FUENTES/Tests/FossilGit/GitOutput"
Initialized empty Git repository in H:/MARCELO/FUENTES/Tests/FossilGit/GitOutput/.git/
git fast-import --export-marks=.mirror_state/marks.txt --quiet --done
fatal: Branch name doesn't conform to GIT standards: refs/heads/master
fast-import: dumping crash report to .git/fast_import_crash_25168
2 check-ins added to the H:/MARCELO/FUENTES/Tests/FossilGit/GitOutput
git update-ref "refs/heads/autoasignar"
usage: git update-ref [<options>] -d <refname> [<old-val>]
or: git update-ref [<options>] <refname> <new-val> [<old-val>]
or: git update-ref [<options>] --stdin [-z]
-m <reason> reason of the update
-d delete the reference
--no-deref update <refname> not the one it points to
-z stdin has NUL-terminated arguments
--stdin read updates from stdin
--create-reflog create a reflog
git update-ref "refs/heads/master"
usage: git update-ref [<options>] -d <refname> [<old-val>]
or: git update-ref [<options>] <refname> <new-val> [<old-val>]
or: git update-ref [<options>] --stdin [-z]
-m <reason> reason of the update
-d delete the reference
--no-deref update <refname> not the one it points to
-z stdin has NUL-terminated arguments
--stdin read updates from stdin
--create-reflog create a reflog
git repack -adf
Nothing new to pack.
git push --mirror https://richieadler@github.com/richieadler/temptest.git
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date
(9) By Richard Hipp (drh) on 2019-10-28 04:00:42 in reply to 8 [link] [source]
I'm still unable to reproduce the problem.
Have you looked at the --debug output, and tried to run that into
git fast-import
manually?
(10) By Warren Young (wyoung) on 2019-10-28 04:33:28 in reply to 9 [link] [source]
Normally I wouldn't be one to be offering up other people's repositories for others to scrutinize, but given that the goal is to export this one to a public GitHub repository, perhaps richieadler would be willing to send you a copy of the Fossil repo to help reproduce the symptom? If there are passwords and such in the Fossil repo you're trying to protect, richieadlder, you can fossil scrub
the repo before sending it to drh.
I also notice that he's running Windows. It may be another system()
related problem in the call out to the local git.exe
instance.
(11) By anonymous on 2019-10-28 20:08:02 in reply to 9 [link] [source]
Hi
I can replicate the problem on a totally new repo on Windows 10.
First, create new repo:
c:/Dev $ cd fossils/
c:/Dev/fossils $ fsl init test.fossil
project-id: a9ef5c99f4f6fb0d669723bfba866482e9f8670a
server-id: abec2e6b0cf44aa0bbc8f18c40cddc082d76e16c
admin-user: #### (initial password is "zBD67df8Ca")
Then add a new file to it:
c:/Dev/fossils $ cd ..
c:/Dev $ mkdir test
c:/Dev $ cd test
c:/Dev/test $ fsl open ../fossils/test.fossil
project-name: <unnamed>
repository: c:/Dev/test/../fossils/test.fossil
local-root: c:/Dev/test/
config-db: C:/Users/####/AppData/Local/_fossil
project-code: a9ef5c99f4f6fb0d669723bfba866482e9f8670a
checkout: e8465eca7b347bc2542e7eb3f55ee6f83a702347 2019-10-28 19:36:48 UTC
tags: trunk
comment: initial empty check-in (user: ####)
check-ins: 1
Create test.cpp, add and commit:
[fossil:trunk] c:/Dev/test $ fsl add test.cpp
ADDED test.cpp
[fossil:trunk] c:/Dev/test $ fsl commit -m "First commit"
./test.cpp contains CR/LF line endings. Use --no-warnings or the "crlf-glob" setting to disable this warning.
Commit anyhow (a=all/c=convert/y/N)? y
New_Version: 57309448485fd0543729295039c531ef065f8b206b121cb78e554f5cb00a2968
Now create a directory for the git export and attempt it. NOTE THAT THIS DOESN'T APPEAR TO FORMAT PROPERLY, not sure why, might be something to do with [ < options ] > syntax it doesn't like however I can't spend any more time trying to format this!
[fossil:trunk] c:/Dev/test $ mkdir ../test-git [fossil:trunk] c:/Dev/test $ fsl git export ../test-git/ git init "C:/Dev/test-git" Initialized empty Git repository in C:/Dev/test-git/.git/ git fast-import --export-marks=.mirror_state/marks.txt --quiet --done fatal: Branch name doesn't conform to GIT standards: refs/heads/master fast-import: dumping crash report to .git/fast_import_crash_8780 2 check-ins added to the C:/Dev/test-git git update-ref "refs/heads/master" usage: git update-ref [<options>] -d <refname> [<old-val>] or: git update-ref [<options>] <refname> <new-val> [<old-val>] or: git update-ref [<options>] --stdin [-z] -m <reason> reason of the update -d delete the reference --no-deref update <refname> not the one it points to -z stdin has NUL-terminated arguments --stdin read updates from stdin --create-reflog create a reflog git repack -adf Nothing new to pack.
Finally, version numbers and a branch list: ``` [fossil:trunk] c:/Dev/test $ git version git version 2.23.0.windows.1 [fossil:trunk] c:/Dev/test $ fsl version This is fossil version 2.10 [3d58d89041] 2019-10-07 11:49:35 UTC [fossil:trunk] c:/Dev/test $ fsl branch ls
- trunk ``` Hope this helps - I am happy to help in any way I can.
Cheers,
Dave
(12) By Warren Young (wyetr) on 2019-10-28 21:20:30 in reply to 11 [link] [source]
Thanks for the test case. This does appear to be a Windows-only problem, as your steps don't reproduce the error on CentOS 7 or on macOS 10.14.
(13) By anonymous on 2019-11-18 01:29:00 in reply to 1 [link] [source]
Hi.
I'm using Windows 7, git 2.24.0.windows.2, fossil 2.10 [9d9ef82234] and got the problem too.
I do use this architecture and I'm in the appropriate folders when executing the commands. I'm using the standard cmd.exe
:
[project]
|
+-[Fossil]
| +- Repository.fossil
|
+-[git-mirror]
|
+-[Ressources]
| +- ideas.txt
| +- drafts.png
| +- you_got_the_idea.txt
|
+-[source]
+- main.c
+- you_get_the_idea.txt
If I do it manually by exporting the fossil repo using (in source folder) :
fossil export --git>"..\export.txt"
and then proceed to import it to a new git repository (in git-mirror folder) :
git init
type "..\export.txt"|git fast-import
git branch -m trunk master
it works. But as soon as I want to use the automated procedure (and github push) explained here : http://fossil-scm.org/xfer/doc/trunk/www/mirrortogithub.md (which is my real goal), I did have a bad named branch problem :
git fast-import --export-marks=.mirror_state/marks.txt --quiet --done
fatal: Branch name doesn't conform to GIT standards: refs/heads/master
fast-import: dumping crash report to .git/fast_import_crash_2528
I may be helpful by pointing to this page : https://repo.or.cz/w/sqlite-export.git As far as I understand, they solved the problem and explain it in details.
This page's author has done a script to automate the export : https://roy.marples.name/blog/fossil-git-bridge
In the mean time, I will do it by hand, but it's not as convenient. Especially since I must manually convert "trunk" branch to "master" in the export file, and then import everything to git.
Hope it helps!
(14) By Marcelo Huerta (richieadler) on 2020-02-19 23:44:15 in reply to 12 [link] [source]
Since the checkin mentioned at https://fossil-scm.org/forum/forumpost/626fe80d2e, the problem has been solved. I found another (comparatively minor)... but I'll explain in a new thread.