can't clone the repo: ValueError: need more than 1 value to unpack

Bug #986279 reported by fqj1994
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
hg-git (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Natty
Fix Released
Undecided
Unassigned
Oneiric
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

[Impact] cloning of repositories with bad data from rebases fails

[Development Fix] fix backported from upstream vcs to handle the issue

[Stable Fix] same fix applies to stable

[Test Case]
put this in ~/.hgrc :
[extensions]
hgext.bookmarks =
hgext.git =

hg clone git://git.debian.org/git/pkg-kde/kde-std/calligra.git

expected: a clone
result: ValueError: need more than 1 value to unpack

[Regression Potential] low, only handles a situation which prevously caused a crash every time

hg clone git://git.debian.org/git/pkg-kde/kde-std/calligra.git

destination directory: calligra
importing Hg objects into Git
["git-upload-pack '/git/pkg-kde/kde-std/calligra.git'"]
Counting objects: 349, done.
Compressing objects: 100% (270/270), done.
Total 349 (delta 126), reused 134 (delta 0)
importing Git objects into Hg
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.7 (r267:88850, Jul 10 2011, 08:11:54) [GCC 4.6.1]
** Mercurial version 1.8.3, système de gestion de sources distribué
** Extensions chargées : git, transplant
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 36, in dispatch
    return _runcatch(u, args)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 58, in _runcatch
    return _dispatch(ui, args)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 601, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 406, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 655, in _runcommand
    return checkargs()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 609, in checkargs
    return cmdfunc()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 598, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 825, in clone
    branch=opts.get('branch'))
  File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 335, in clone
    dest_repo.clone(src_repo, heads=revs, stream=stream)
  File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 2014, in clone
    return self.pull(remote, heads)
  File "/usr/lib/pymodules/python2.6/hgext/git/hgrepo.py", line 14, in pull
    git.fetch(remote.path, heads)
  File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 104, in fetch
    self.import_git_objects(remote_name, refs)
  File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 415, in import_git_objects
    self.import_git_commit(commit)
  File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 422, in import_git_commit
    hg_branch, extra) = self.extract_hg_metadata(commit.message)
  File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 812, in extract_hg_metadata
    command, data = line.split(" : ", 1)
ValueError: need more than 1 value to unpack

Revision history for this message
fqj1994 (fqj1994) wrote :
Revision history for this message
Julian Taylor (jtaylor) wrote :

update the patch according to the following guidelines?
https://wiki.ubuntu.com/StableReleaseUpdates

I'll be happy to sponsor it then.

Revision history for this message
fqj1994 (fqj1994) wrote :

yes.
It's the minimal patch to fix the bug.
And it's backported from upstream.

Revision history for this message
Julian Taylor (jtaylor) wrote :

This bug was fixed in the package hg-git - 0.3.2-2

---------------
hg-git (0.3.2-2) unstable; urgency=low

  * Backport a patch from upstream to handle incorrect
    hg metadata gracefully (closes: 636879).

 -- Qijiang Fan <email address hidden> Wed, 25 Apr 2012 23:41:25 +0800

hg-git (0.3.2-1) unstable; urgency=low

  * New upstream release.
  * debian/watch updated.
  * Bump copyright format uri to
    http://www.debian.org/doc/packaging-manuals/copyright-format/1.0.
  * Bump standards version to 3.9.3.

 -- Qijiang Fan <email address hidden> Fri, 20 Apr 2012 16:46:20 +0800

Changed in hg-git (Ubuntu):
status: New → Fix Released
Julian Taylor (jtaylor)
description: updated
Revision history for this message
fqj1994 (fqj1994) wrote :

I mean the released version of ubuntu instead of 12.10.
<= 12.04

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in hg-git (Ubuntu Lucid):
status: New → Confirmed
Changed in hg-git (Ubuntu Natty):
status: New → Confirmed
Changed in hg-git (Ubuntu Oneiric):
status: New → Confirmed
Changed in hg-git (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello fqj1994, or anyone else affected,

Accepted hg-git into natty-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in hg-git (Ubuntu Natty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in hg-git (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Hello fqj1994, or anyone else affected,

Accepted hg-git into oneiric-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

Hello fqj1994, or anyone else affected,

Accepted hg-git into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in hg-git (Ubuntu Precise):
status: Confirmed → Fix Committed
Revision history for this message
fqj1994 (fqj1994) wrote :

It works well now.

$ hg clone git://git.debian.org/git/pkg-kde/kde-std/calligra.git
目标目录: calligra
importing git objects into hg
updating to branch default
93 files updated, 0 files merged, 0 files removed, 0 files unresolved

Revision history for this message
fqj1994 (fqj1994) wrote :

works well on precise.

Martin Pitt (pitti)
tags: added: verification-done verification-done-oneiric
Revision history for this message
fqj1994 (fqj1994) wrote :

what to do next ?

tags: added: verification-done-precise
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hg-git - 0.3.1-1ubuntu0.1

---------------
hg-git (0.3.1-1ubuntu0.1) precise-proposed; urgency=low

  * 000-fix-line-split-error-on-bad-data-from-rebase.diff:
    fix crash when bad data from rebase is in the log (LP: #986279)
 -- Julian Taylor <email address hidden> Mon, 30 Apr 2012 18:18:12 +0200

Changed in hg-git (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hg-git - 0.2.6-2ubuntu0.1

---------------
hg-git (0.2.6-2ubuntu0.1) oneiric-proposed; urgency=low

  * 000-fix-line-split-error-on-bad-data-from-rebase.diff:
    fix crash when bad data from rebase is in the log (LP: #986279)
 -- Julian Taylor <email address hidden> Mon, 30 Apr 2012 18:37:49 +0200

Changed in hg-git (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

The natty update still needs testing, resetting verification tags.

tags: removed: verification-done-oneiric verification-done-precise
tags: removed: verification-done
Revision history for this message
Clint Byrum (clint-fewbar) wrote :
Download full text (9.7 KiB)

Verified on natty:

(natty-amd64)root@clint-MacBookPro:/tmp# apt-get install mercurial-git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  python-dulwich python-fastimport
Suggested packages:
  git-core bzr-fastimport
The following NEW packages will be installed:
  mercurial-git python-dulwich python-fastimport
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 193 kB of archives.
After this operation, 1196 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://127.0.0.1/ubuntu/ natty/universe python-dulwich amd64 0.7.0-1 [145 kB]
Get:2 http://127.0.0.1/ubuntu/ natty/universe mercurial-git all 0.2.3-1 [19.2 kB]
Get:3 http://127.0.0.1/ubuntu/ natty/universe python-fastimport all 0.9.0~bzr298-1 [29.1 kB]
Fetched 193 kB in 1s (120 kB/s)
Selecting previously deselected package python-dulwich.
(Reading database ... 16631 files and directories currently installed.)
Unpacking python-dulwich (from .../python-dulwich_0.7.0-1_amd64.deb) ...
Selecting previously deselected package mercurial-git.
Unpacking mercurial-git (from .../mercurial-git_0.2.3-1_all.deb) ...
Selecting previously deselected package python-fastimport.
Unpacking python-fastimport (from .../python-fastimport_0.9.0~bzr298-1_all.deb) ...
Setting up python-dulwich (0.7.0-1) ...
Setting up mercurial-git (0.2.3-1) ...
Setting up python-fastimport (0.9.0~bzr298-1) ...
Processing triggers for python-support ...
(natty-amd64)root@clint-MacBookPro:/tmp# hg clone git://git.debian.org/git/pkg-kde/kde-std/calligra.git
destination directory: calligra
importing Hg objects into Git
Counting objects: 1500, done.
Compressing objects: 100% (603/603), done.
Total 1500 (delta 575), reused 1500 (delta 575)
importing Git objects into Hg
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2]
** Mercurial Distributed SCM (version 1.7.5)
** Extensions loaded: bookmarks, git
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/pymodules/python2.7/mercurial/dispatch.py", line 16, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/lib/pymodules/python2.7/mercurial/dispatch.py", line 36, in dispatch
    return _runcatch(u, args)
  File "/usr/lib/pymodules/python2.7/mercurial/dispatch.py", line 58, in _runcatch
    return _dispatch(ui, args)
  File "/usr/lib/pymodules/python2.7/mercurial/dispatch.py", line 593, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/pymodules/python2.7/mercurial/dispatch.py", line 401, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/pymodules/python2.7/mercurial/dispatch.py", line 644, in _runcommand
    return checkargs()
  File "/usr/lib/pymodules/python2.7/mercurial/dispatch.py", line 598, in checkargs
    return cmdfunc()
  File "/usr/lib/pymodules/python2.7/mercurial/dispatch.py", line 591, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/pymodules/p...

Read more...

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Added back verification=needed for lucid.

tags: added: verification-needed
removed: verification-done
Changed in hg-git (Ubuntu Lucid):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hg-git - 0.2.3-1ubuntu0.1

---------------
hg-git (0.2.3-1ubuntu0.1) natty-proposed; urgency=low

  * 000-fix-line-split-error-on-bad-data-from-rebase.diff:
    fix crash when bad data from rebase is in the log (LP: #986279)
 -- Julian Taylor <email address hidden> Mon, 30 Apr 2012 18:40:28 +0200

Changed in hg-git (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :
Download full text (7.0 KiB)

Verified on lucid

destination directory: calligra.git
importing Hg objects into Git
Counting objects: 1500, done.
Compressing objects: 100% (603/603), done.
Total 1500 (delta 575), reused 1500 (delta 575)
importing Git objects into Hg
at: 0/308
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or <email address hidden>
** Mercurial Distributed SCM (version 1.4.3)
** Extensions loaded: bookmarks, git
Traceback (most recent call last):
  File "/usr/bin/hg", line 27, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 30, in dispatch
    return _runcatch(u, args)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 46, in _runcatch
    return _dispatch(ui, args)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 454, in _dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 324, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 505, in _runcommand
    return checkargs()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 459, in checkargs
    return cmdfunc()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 453, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 386, in check
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 649, in clone
    update=opts.get('updaterev') or not opts.get('noupdate'))
  File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 292, in clone
    dest_repo.clone(src_repo, heads=revs, stream=stream)
  File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 2140, in clone
    return self.pull(remote, heads)
  File "/usr/lib/pymodules/python2.6/hgext/git/hgrepo.py", line 12, in pull
    git.fetch(remote.path, heads)
  File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 98, in fetch
    self.import_git_objects(remote_name, refs)
  File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 398, in import_git_objects
    self.import_git_commit(commit)
  File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 403, in import_git_commit
    (strip_message, hg_renames, hg_branch, extra) = self.extract_hg_metadata(commit.message)
  File "/usr/lib/pymodules/python2.6/hgext/git/git_handler.py", line 735, in extract_hg_metadata
    command, data = line.split(" : ", 1)
ValueError: need more than 1 value to unpack
(lucid-amd64)root@clint-MacBookPro:/tmp# vi /etc/apt/sources.list
(lucid-amd64)root@clint-MacBookPro:/tmp# apt-get update
Hit http://127.0.0.1 lucid Release.gpg
Hit http://127.0.0.1 lucid-updates Release.gpg
Get:1 http://127.0.0.1 lucid-proposed Release.gpg [198B]
Hit http://127.0.0.1 lucid Release
Get:2 http://security.ubuntu.com lucid-security Release.gp...

Read more...

tags: added: verification-done
removed: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hg-git - 0.2.1-1ubuntu0.1

---------------
hg-git (0.2.1-1ubuntu0.1) lucid-proposed; urgency=low

  * 000-fix-line-split-error-on-bad-data-from-rebase.diff:
    fix crash when bad data from rebase is in the log (LP: #986279)
 -- Julian Taylor <email address hidden> Mon, 30 Apr 2012 18:45:32 +0200

Changed in hg-git (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.