Skip to content

fatal: Invalid raw date #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wRAR opened this issue Aug 5, 2013 · 8 comments
Closed

fatal: Invalid raw date #15

wRAR opened this issue Aug 5, 2013 · 8 comments

Comments

@wRAR
Copy link

wRAR commented Aug 5, 2013

hg-fast-export fails on a checkout of ssh://anonhg@hg.illumos.org/illumos-gate

master: Exporting simple delta revision 7371/14114 with 0/7/0 added/changed/removed files
fatal: Invalid raw date "<devnull@localhost> 1219151827 -0600" in ident:  <Gerald Jelinek> <devnull@localhost> 1219151827 -0600
fast-import: dumping crash report to .git/fast_import_crash_1875
Traceback (most recent call last):
  File "/usr/share/hg-fast-export/hg-fast-export.py", line 387, in <module>
    options.statusfile,authors=a,sob=options.sob,force=options.force))
  File "/usr/share/hg-fast-export/hg-fast-export.py", line 321, in hg2git
    c=export_commit(ui,repo,rev,old_marks,max,c,authors,sob,brmap)
  File "/usr/share/hg-fast-export/hg-fast-export.py", line 214, in export_commit
    export_file_contents(ctx,man,changed)
  File "/usr/share/hg-fast-export/hg-fast-export.py", line 125, in export_file_contents
    wr(d)
  File "/usr/share/hg-fast-export/hg-fast-export.py", line 26, in wr
    sys.stdout.write(msg)
IOError: [Errno 32] Broken pipe

The crash dump contains this command:

  commit refs/heads/master
  mark :7371
* committer <Gerald Jelinek> <devnull@localhost> 1219151827 -0600
@frej
Copy link
Owner

frej commented Aug 9, 2013

Andrey Rahmatullin notifications@github.com writes:

hg-fast-export fails on a checkout of ssh://anonhg@hg.illumos.org/illumos-gate

Can't reproduce:

$ hg clone ssh://anonhg@hg.illumos.org/illumos-gate
abort: no suitable response from remote hg!
$

But,

The crash dump contains this command:

commit refs/heads/master
mark :7371

  • committer devnull@localhost 1219151827 -0600

According to "git fast-import --help" the format should be:

'committer' (SP )? SP LT GT SP LF

As we now have "" fast-import tries to parse
"devnull@localhost" as a date which of course fails. Read the usage
section in the README file for help on how to use the -A option to clean
up bad author information.

Cheers,

--Frej

@frej
Copy link
Owner

frej commented Feb 14, 2014

No response in half a year. Closing.

@frej frej closed this as completed Feb 14, 2014
@tmbdev
Copy link

tmbdev commented Oct 28, 2014

I have the same problem:

$ hg-fast-export -r /home/tmb/bitbucket/iuprlab
master: Exporting full revision 1/3 with 34/0/0 added/changed/removed files
master: Exporting simple delta revision 2/3 with 3/1/3 added/changed/removed files
fatal: Invalid raw date "devnull@localhost 1414262098 -0700" in ident: devnull@localhost 1414262098 -0700
fast-import: dumping crash report to .git/fast_import_crash_31260
Traceback (most recent call last):
File "/usr/share/hg-fast-export/hg-fast-export.py", line 387, in
options.statusfile,authors=a,sob=options.sob,force=options.force))
File "/usr/share/hg-fast-export/hg-fast-export.py", line 321, in hg2git
c=export_commit(ui,repo,rev,old_marks,max,c,authors,sob,brmap)
File "/usr/share/hg-fast-export/hg-fast-export.py", line 213, in export_commit
export_file_contents(ctx,man,added)
File "/usr/share/hg-fast-export/hg-fast-export.py", line 125, in export_file_contents
wr(d)
File "/usr/share/hg-fast-export/hg-fast-export.py", line 26, in wr
sys.stdout.write(msg)
IOError: [Errno 32] Broken pipe
$

@frej
Copy link
Owner

frej commented Nov 1, 2014

Can you provide a link to a repo which has this problem, or a recipe
for creating such a repo?

@tmbdev
Copy link

tmbdev commented Nov 2, 2014

You can clone the repository from here:

https://tmbdev@bitbucket.org/tmbdev/iuprlab

@brianz
Copy link

brianz commented Dec 6, 2014

I hit this issue when the hg repo I was converting had <> <devnull@localhost> 1414788260 -0700 as the committer. I resolved this by placing the following in an authors.txt file and passing that in with the -A flag:

<>=devnull <devnull@localhost>
\<\>=devnull <devnull@localhost>  

@trevor
Copy link

trevor commented Dec 7, 2015

I hit this issue too. The -A authors.txt worked with this as content:

<>=devnull <devnull@localhost>

Could this be made a default?

@timraasveld
Copy link

Update to @brianz ' excellent advice. In the latest version of hg-fast-export, each key and value of authors.txt should be quoted to avoid the error: Invalid file format in [authors.txt], line 1

So it becomes:

"<>"="devnull <devnull@localhost>"
"\<\>"="devnull <devnull@localhost>"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants