On Fri, Mar 10, 2017 at 02:02:23PM -0600, Zakero wrote:
> In an effort to do some experimenting with the latest release of Fossil:
> 
> ./fossil-2.1 version
> This is fossil version 2.1 [83e3445f67] 2017-03-10 17:07:08 UT
> 
> I wanted to export the fossil repository to git.  Then import the "git
> file" back into fossil.  Being the first time to attempt this, there is a
> good chance I am doing something wrong.  Below are the 2 fossil commands:
> 
> ./fossil-2.1 export --git -R ./fossil-scm.fossil > ./fossil-scm.git
> ./fossil-2.1 import --git fossil-sha3.fossil ./fossil-scm.git
> 
> The import fails with an error: "bad fast-import line: [def.txt]"

It seems to be a problem with a weird filename (with a newline in it),
added in this checkin: 
  http://fossil-scm.org/index.html/info/ac1af2306b70c537

  (It's all what this checkin was about: to test how fossil can handle
  some weird filenames.)

One of the file in this checkin is: "abc\ndef.txt" (with a newline)

Looks like the export/import command doesn't support file with newline,
we can see the filename is truncated in the error message.

I even test using the version of fossil from branch: ticket-d17d6e5b17
(from 2013) that was made to fix some issues with filenames and I get
the same error when exporting/importing a test repository with a file
containing a newline in it.

  [snip]

Attached to this email (hopefully it will not get removed) is my test
script that I use to create a new repository with a file containing a
newline in it and trying to do an export/import cycle.

If you look at the resulting "test.git-export" file, you can see that
the newline on the filename produce a line with a part of the filename
in it, which is seen as garbage on the git-fastexport file.

I have no clue how to fix that.

Regards

-- 
Martin G.

Attachment: test_file_with_newline.sh
Description: Bourne shell script

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to