Skip to content
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

Can't clone stylo with git-cinabar #95

Closed
chenpighead opened this issue Nov 9, 2016 · 6 comments
Closed

Can't clone stylo with git-cinabar #95

chenpighead opened this issue Nov 9, 2016 · 6 comments

Comments

@chenpighead
Copy link

I've met a problem while running "git clone hg::http://hg.mozilla.org/incubator/stylo"

Here's the error message:
https://irccloud.mozilla.com/pastebin/JNM8AgcE/

OS: OSX 10.12.1
git version: 2.7.4
mercurial version: 3.8.4

@chenpighead
Copy link
Author

I'm on release branch with following commit:

commit d0527bc9ff43ca95efd8e5570511d4b9961763e8
Author: Mike Hommey <mh@glandium.org>
Date:   Thu Nov 3 08:20:17 2016 +0900

    Adjust RevChunk.init check to use delta_node instead of parent1

@glandium
Copy link
Owner

glandium commented Nov 9, 2016

Fixed in 5137c83

@glandium glandium closed this as completed Nov 9, 2016
@chenpighead
Copy link
Author

I just checked out to next branch with following commit:

commit 5137c833d7a55ae19c97cc30ae6ccf1bfdee0295
Author: Mike Hommey <mh@glandium.org>
Date:   Wed Nov 9 18:21:48 2016 +0900

    Special case Git.cat_file('blob', EMPTY_BLOB)

    The empty blob is not necessarily stored in the git repository when we
    want to use it during a clone (e.g. when a RevChunk delta node is
    HG_EMPTY_FILE), and in that case, Git.cat_file('blob', EMPTY_BLOB)
    return None instead of the expected empty string. That subsequently
    breaks the caller.

Still failed to clone the repo. Error messages seem a bit different though:

Cloning into 'stylo'...
Reading 320837 changesets
Reading 320599 manifests
Reading and importing 1084137 files
Traceback (most recent call last):
  File "/Users/jeremy/git-cinnabar/git-remote-hg", line 48, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/Users/jeremy/git-cinnabar/git-remote-hg", line 42, in main
    helper.run()
  File "/Users/jeremy/git-cinnabar/cinnabar/remote_helper.py", line 110, in run
    func(*args)
  File "/Users/jeremy/git-cinnabar/cinnabar/remote_helper.py", line 330, in import_
    self._branchmap.names())
  File "/Users/jeremy/git-cinnabar/cinnabar/hg/__init__.py", line 588, in getbundle
    store.file, next(bundle))):
  File "/Users/jeremy/git-cinnabar/cinnabar/util.py", line 114, in progress_iter
    for item in iter:
  File "/Users/jeremy/git-cinnabar/cinnabar/hg/__init__.py", line 190, in iter_initialized
    instance.init(get_missing(instance.delta_node))
  File "/Users/jeremy/git-cinnabar/cinnabar/githg.py", line 1076, in file
    return GeneratedFileRev(sha1, GitHgHelper.cat_file('blob', ref))
  File "/Users/jeremy/git-cinnabar/cinnabar/helper.py", line 151, in wrapper
    result = func(cls, *args, **kwargs)
  File "/Users/jeremy/git-cinnabar/cinnabar/helper.py", line 260, in cat_file
    return self._read_file(typ, stdout)
  File "/Users/jeremy/git-cinnabar/cinnabar/helper.py", line 234, in _read_file
    assert expected_typ == 'auto' or typ == expected_typ
AssertionError
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/Users/jeremy/git-cinnabar/cinnabar/git.py", line 269, in close
    self._fast_import.close(rollback)
  File "/Users/jeremy/git-cinnabar/cinnabar/git.py", line 650, in close
    self.flush()
  File "/Users/jeremy/git-cinnabar/cinnabar/git.py", line 642, in flush
    self._proc.stdin.flush()
ValueError: I/O operation on closed file
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/Users/jeremy/git-cinnabar/cinnabar/git.py", line 269, in close
    self._fast_import.close(rollback)
  File "/Users/jeremy/git-cinnabar/cinnabar/git.py", line 650, in close
    self.flush()
  File "/Users/jeremy/git-cinnabar/cinnabar/git.py", line 642, in flush
    self._proc.stdin.flush()
ValueError: I/O operation on closed file
fatal: Could not read ref refs/cinnabar/refs/heads/branches/default/tip

@glandium
Copy link
Owner

glandium commented Nov 9, 2016

The notable difference between your first and last comment is that in the former case you were not using the helper, and in the latter, you were. 5137c83 fixed the problem in the former case, not the latter.

@glandium
Copy link
Owner

glandium commented Nov 9, 2016

Hopefully fixed in 2091b9b.

@glandium glandium closed this as completed Nov 9, 2016
@chenpighead
Copy link
Author

It did. Thank you sooooo much. :-)

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

2 participants