A strange error

54 views
Skip to first unread message

Chih-Wei

unread,
Dec 13, 2009, 9:43:38 PM12/13/09
to Repo and Gerrit Discussion
When tried to repo sync, I got such an error.
Could you explain it?

[cwhuang@cwhuang android-x86-2.0]$ repo sync
Fetching projects: 100% (137/137), done.
Syncing work tree: 66% (91/137) Traceback (most recent call last):
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/main.py", line
235, in <module>
_Main(sys.argv[1:])
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/main.py", line
217, in _Main
repo._Run(argv)
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/main.py", line
123, in _Run
cmd.Execute(copts, cargs)
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/subcmds/sync.py",
line 239, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/project.py", line
731, in Sync_LocalHalf
commit_id, committer_email = commit.split(' ', 2)
ValueError: too many values to unpack

Shawn Pearce

unread,
Dec 14, 2009, 12:10:44 AM12/14/09
to repo-d...@googlegroups.com
On Sun, Dec 13, 2009 at 18:43, Chih-Wei <cwh...@linux.org.tw> wrote:
> When tried to repo sync, I got such an error.
> Could you explain it?
>
> [cwhuang@cwhuang android-x86-2.0]$ repo sync
...
>  File "/home/cwhuang/git/android-x86-2.0/.repo/repo/project.py", line
> 731, in Sync_LocalHalf
>    commit_id, committer_email = commit.split(' ', 2)
> ValueError: too many values to unpack

Sounds like you have a space in a committer's email address? And
split didn't pay attention to the 2 argument and split the line into
more than 2 values? I hate Python.

Chih-Wei

unread,
Dec 14, 2009, 12:35:51 AM12/14/09
to Repo and Gerrit Discussion
Thank you for the quick reply.
But how can I fix this problem?

Shawn Pearce

unread,
Dec 14, 2009, 12:42:02 AM12/14/09
to repo-d...@googlegroups.com
On Sun, Dec 13, 2009 at 21:35, Chih-Wei <cwh...@linux.org.tw> wrote:
> Thank you for the quick reply.
> But how can I fix this problem?

I have no idea. If you enable --trace you can see what command repo
is running just before it gives up with this stack trace, look at the
output of that command, is there more than one space on any given
line?

You probably can try to work around it by just running git rebase at
this point, doing the rebase on top of the correct upstream branch.
The code in question within repo sync is about trying to do a smarter
rebase than what stock git does, but it usually doesn't actually have
to be that smart, most upstream branches don't rewind and rebase
themselves and repo sync is trying to defend the user against those
that do.

David Brown

unread,
Dec 14, 2009, 12:47:57 AM12/14/09
to repo-d...@googlegroups.com
I think you meant

commit.split(' ', 1)

The limit is the number of splits, not the number of entries returned.

David

Chih-Wei

unread,
Dec 30, 2009, 12:47:53 AM12/30/09
to Repo and Gerrit Discussion
Hi, sorry for reply late.
The problem disappeared when I switched to another branch.
But now it appears again when I switch back to the problematic branch.
Here is the output with --trace:
(I don't think the email has any abnormality. Isn't it?)

$ repo --trace sync kernel
: unpickle /home/cwhuang/.gitconfig
: unpickle /home/cwhuang/git/android-x86-2.0/.repo/repo/.git/config
: unpickle /home/cwhuang/git/android-x86-2.0/.repo/manifests.git/
config
: export GIT_DIR=/home/cwhuang/git/android-x86-2.0/.repo/manifests.git
: git fetch origin
: load refs /home/cwhuang/git/android-x86-2.0/.repo/manifests.git
: unpickle /home/cwhuang/git/android-x86-2.0/.repo/projects/kernel.git/
config

: export GIT_DIR=/home/cwhuang/git/android-x86-2.0/.repo/projects/
kernel.git
: git fetch x86
: load refs /home/cwhuang/git/android-x86-2.0/.repo/projects/
kernel.git
: load refs /home/cwhuang/git/android-x86-2.0/.repo/repo/.git
: scan refs /home/cwhuang/git/android-x86-2.0/.repo/projects/
kernel.git

: cd /home/cwhuang/git/android-x86-2.0/kernel
: git rev-list ^HEAD e8f75637ed2077464ea1ea1e45e33f298119bcd6 -- 1>|
2>|
: git log --pretty=format:%H %ce
^e8f75637ed2077464ea1ea1e45e33f298119bcd6 HEAD -- 1>| 2>|
: git var GIT_COMMITTER_IDENT 1>| 2>|


Traceback (most recent call last):
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/main.py", line
235, in <module>
_Main(sys.argv[1:])
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/main.py", line
217, in _Main
repo._Run(argv)
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/main.py", line
123, in _Run
cmd.Execute(copts, cargs)
File "/home/cwhuang/git/android-x86-2.0/.repo/repo/subcmds/sync.py",
line 239, in Execute
project.Sync_LocalHalf(syncbuf)

File "/home/cwhuang/git/android-x86-2.0/.repo/repo/project.py", line
731, in Sync_LocalHalf
commit_id, committer_email = commit.split(' ', 2)
ValueError: too many values to unpack

The commit shown in the trace is:
$ git show e8f756
commit e8f75637ed2077464ea1ea1e45e33f298119bcd6
Author: Chih-Wei Huang <cwh...@linux.org.tw>
Date: Thu Dec 17 16:08:33 2009 +0800

kconfig: add nonint_oldconfig target from Fedora kernel

This patch adds a "make nonint_oldconfig" which is non-interactive
and
also gives a list of missing options at the end. Useful for
automated
builds (as used in the buildsystem).

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index fa8c2dd..7fdca12 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -28,6 +28,11 @@ oldconfig: $(obj)/conf
silentoldconfig: $(obj)/conf
$< -s $(Kconfig)

+nonint_oldconfig: $(obj)/conf
+ $< -b $(Kconfig)
+loose_nonint_oldconfig: $(obj)/conf
+ $< -B $(Kconfig)
+
...

On 12月14日, 下午1時42分, Shawn Pearce <s...@google.com> wrote:

Shawn Pearce

unread,
Dec 30, 2009, 10:07:47 AM12/30/09
to repo-d...@googlegroups.com
Chih-Wei <cwh...@linux.org.tw> wrote:
...

> : git log --pretty=format:%H %ce
> ^e8f75637ed2077464ea1ea1e45e33f298119bcd6 HEAD -- 1>| 2>|
...

> The commit shown in the trace is:
> $ git show e8f756
> commit e8f75637ed2077464ea1ea1e45e33f298119bcd6

No, what you want to look at is the output of the git log command
that we are parsing. The commit e8f7 isn't being considered because
of the negation operator, its actually the range of commits between
e8f7 and HEAD that are being read:

Chih-Wei

unread,
Dec 30, 2009, 8:39:31 PM12/30/09
to Repo and Gerrit Discussion
Thank you for the hint.

I finally figured out there are two commits have a problematic
committer,
as shown below. They're from the vanilla kernel 2.6.32.
Can we have a workaround for it?

Commit c7ff91d722e44c98504e6e2c357b47e1988dfbbd
Author: Ryota Yamauchi <r-yam...@vf.jp.nec.com> 2009-10-30 16:27:44
Committer: h...@lst.de <Christoph Hellwig> 2009-10-30 16:27:44
Parent: 3b826386d376e5545d2e92b2da5ebd965cafae97 (xfs: free temporary
cursor in xfs_dialloc)
Branches: remotes/iksaif/android-2.6.32, remotes/iksaif/android-2.6.32-
olv, remotes/linus/master, remotes/x86/android-2.6.32
Follows: v2.6.31
Precedes: v2.6.32-rc6

Commit 3b826386d376e5545d2e92b2da5ebd965cafae97
Author: Eric Sandeen <san...@sandeen.net> 2009-10-30 16:27:07
Committer: h...@lst.de <Christoph Hellwig> 2009-10-30 16:27:07
Parent: ba313e68facf190317d8db3afdc0f0028c963a96 (Merge branch
'master' of ssh://oss.sgi.com/oss/git/xfs/xfs into for-linus)
Branches: remotes/iksaif/android-2.6.32, remotes/iksaif/android-2.6.32-
olv, remotes/linus/master, remotes/x86/android-2.6.32
Follows: v2.6.31
Precedes: v2.6.32-rc6


On 12月30日, 下午11時07分, Shawn Pearce <s...@google.com> wrote:

Shawn Pearce

unread,
Dec 30, 2009, 9:44:30 PM12/30/09
to repo-d...@googlegroups.com
Chih-Wei <cwh...@linux.org.tw> wrote:
> Thank you for the hint.
>
> I finally figured out there are two commits have a problematic
> committer,
> as shown below. They're from the vanilla kernel 2.6.32.
>
> Commit c7ff91d722e44c98504e6e2c357b47e1988dfbbd
> Author: Ryota Yamauchi <r-yam...@vf.jp.nec.com> 2009-10-30 16:27:44
> Committer: h...@lst.de <Christoph Hellwig> 2009-10-30 16:27:44

Yikes. Christoph must have mixed up his configuration. *sigh*

> Can we have a workaround for it?

repo selfupdate.

I just tagged 1.6.8.9 which contains the fix, to split on only the
first space, and not the first and second.

David Brown

unread,
Dec 31, 2009, 1:06:44 PM12/31/09
to repo-d...@googlegroups.com
On Wed, Dec 30, 2009 at 06:44:30PM -0800, Shawn Pearce wrote:

>> Commit c7ff91d722e44c98504e6e2c357b47e1988dfbbd
>> Author: Ryota Yamauchi <r-yam...@vf.jp.nec.com> 2009-10-30 16:27:44
>> Committer: h...@lst.de <Christoph Hellwig> 2009-10-30 16:27:44
>
>Yikes. Christoph must have mixed up his configuration. *sigh*

I've seen all kinds of interesting things. Having a name or email
address of 'y' is common. Someone even managed to get a backslash as
their name.

It's one of the things on our review checklist.

David

Chih-Wei

unread,
Jan 1, 2010, 10:09:16 AM1/1/10
to Repo and Gerrit Discussion
On 2009年12月31日, 上午10時44分, Shawn Pearce <s...@google.com> wrote:
> repo selfupdate.
> I just tagged 1.6.8.9 which contains the fix, to split on only the
> first space, and not the first and second.

I confirm the new version fixed the problem.
Thank you!

Reply all
Reply to author
Forward
0 new messages