Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

hg push to bare git repo errors with "ValueError: need more than 1 value to unpack" in parse_hgsub #339

Open
kberridge opened this issue Dec 12, 2019 · 0 comments

Comments

@kberridge
Copy link

kberridge commented Dec 12, 2019

I am trying to convert a repository from hg to git using hggit. I setup an empty bare git repo with git init --bare .git, I setup a bookmark for my branch in the source repo hg bookmark -r default master, then from the source repo I ran: hg push -r master ..\repo-git.

This then errors with this callstack:
** Unknown exception encountered with possibly-broken third-party extension hggit
** which supports versions 4.7 of Mercurial.
** Please disable hggit and try your action again.
** If that fixes the bug please report it to https://bitbucket.org/durin42/hg-git/issues
** 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.8.2)
** Extensions loaded: histedit, shelve, hggit, convert, extdiff, fetch, graphlog, strip, mq, churn, hgk, patchbomb, rebase, record, eol
Traceback (most recent call last):
File "hg", line 50, in
File "mercurial\dispatch.pyo", line 220, in dispatch
File "mercurial\dispatch.pyo", line 371, in _callcatch
File "mercurial\dispatch.pyo", line 354, in _runcatchfunc
File "mercurial\dispatch.pyo", line 994, in _dispatch
File "mercurial\dispatch.pyo", line 737, in runcommand
File "mercurial\dispatch.pyo", line 1003, in _runcommand
File "mercurial\dispatch.pyo", line 991, in
File "mercurial\util.pyo", line 1644, in check
File "mercurial\util.pyo", line 1644, in check
File "hgext\mq.pyo", line 3631, in mqcommand
File "mercurial\commands.pyo", line 4570, in push
File "hggit\util.pyo", line 60, in inner
File "hggit\git_handler.pyo", line 402, in push
File "hggit\git_handler.pyo", line 367, in export_commits
File "hggit\git_handler.pyo", line 525, in export_git_objects
File "hggit\git_handler.pyo", line 601, in export_hg_commit
File "hggit\hg2git.pyo", line 204, in update_changeset
File "hggit\hg2git.pyo", line 369, in _handle_subrepos
File "hggit\hg2git.pyo", line 20, in parse_subrepos
File "hggit\util.pyo", line 29, in parse_hgsub
ValueError: need more than 1 value to unpack

I've been through this process with a bunch of other repos, so there must be something about this repo that it is unable to parse? By the looks of the callstack something in the .hgsub? It looks like it is splitting lines in the hgsub on =, and it must have encountered a line that it couldn't split?

The .hgsub on master's tip only has folder=[git]https://url... lines in it. But versions earlier in the history of the repo did have a [subpaths] section. Other than that though nothing strange is jumping out at me.

Any ideas what I should look into or how to work around it?

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

No branches or pull requests

1 participant