[Bug 6135] New: TypeError: old sha1 for refs/heads/hg is not a bytestring None

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Fri May 10 09:25:01 EDT 2019


            Bug ID: 6135
           Summary: TypeError: old sha1 for refs/heads/hg is not a
                    bytestring None
           Product: Mercurial
           Version: 4.7.1
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: hglib
          Assignee: bugzilla at mercurial-scm.org
          Reporter: alexandermedic at gmail.com
                CC: mercurial-devel at mercurial-scm.org

I'm trying to move a mercurial project to git. 
In order to do that I have these folders:

        |git_repo (empty folder)
               |hg_repo (source code project)

first I made a hg clone http://username@repository.com/hg_repo inside hg_repo
folder and I got this:

http authorization required for http://respoitory.com/hg_repo
realm: Kallithea
user: username
destination directory: hg_repo
requesting all changes
adding changesets
adding manifests
adding file changes
added 4 changesets with 21 changes to 16 files
new changesets 1a2a6bc82bba:97b8afdd03af
updating to branch default
remote: Unable to open connection:
remote: Host does not exist
abort: no suitable response from remote hg!

In 'Projects\git_repo'
I execute:  

    git init

In 'Projects\source\hg_repo'
I execute: 

    hg bookmarks hg
    hg push Projects\git_repo

and I got this error:

pushing to Projects\git_repo
searching for changes
fatal: the remote end hung up unexpectedly
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64
bit (AMD64)]
** Mercurial Distributed SCM (version 4.7.1)
** Extensions loaded: hggit, eol
Traceback (most recent call last):
  File "hg", line 50, in <module>
  File "mercurial\dispatch.pyo", line 90, in run
  File "mercurial\dispatch.pyo", line 213, in dispatch
  File "mercurial\dispatch.pyo", line 354, in _runcatch
  File "mercurial\dispatch.pyo", line 362, in _callcatch
  File "mercurial\scmutil.pyo", line 161, in callcatch
  File "mercurial\dispatch.pyo", line 344, in _runcatchfunc
  File "mercurial\dispatch.pyo", line 984, in _dispatch
  File "mercurial\dispatch.pyo", line 730, in runcommand
  File "mercurial\dispatch.pyo", line 992, in _runcommand
  File "mercurial\dispatch.pyo", line 981, in <lambda>
  File "mercurial\util.pyo", line 1528, in check
  File "mercurial\commands.pyo", line 4369, in push
  File "C:/Users/username/hg-git\hggit\util.py", line 60, in inner
    return f(*args, **kwargs)
  File "C:/Users/username/hg-git\hggit\__init__.py", line 414, in exchangepush
    pushop.cgresult = repo.githandler.push(remote.path, revs, force)
  File "C:/Users/username/hg-git\hggit\git_handler.py", line 405, in push
    old_refs, new_refs = self.upload_pack(remote, revs, force)
  File "C:/Users/username/hg-git\hggit\git_handler.py", line 1120, in
  File "dulwich\client.pyo", line 698, in send_pack
  File "dulwich\client.pyo", line 477, in _handle_receive_pack_head
TypeError: old sha1 for refs/heads/hg is not a bytestring None

It's weird because I followed this steps with 'hg_another_repo' in our same
server and worked fine.

Any questions please let me know.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Mercurial-devel mailing list