From: Catalin Marinas <catalin.marinas@gmail.com>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: git@vger.kernel.org, Karl Wiberg <kha@treskal.com>
Subject: Re: [STGIT] AssertionError on stg rebase
Date: Mon, 14 Feb 2011 17:23:15 +0000 [thread overview]
Message-ID: <AANLkTim2F1B7=Q5wTfxxWod3yyyiMuGxKnEGNyCVjcuZ@mail.gmail.com> (raw)
In-Reply-To: <20110213193534.GA2437@khazad-dum.debian.net>
Hi,
On 13 February 2011 19:35, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
> Here is a testcase to reproduce the problem:
>
> $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.27.y.git
> $ cd linux-2.6.27.y
> $ git reset --hard v2.6.27.53
> $ stg init
> $ stg new test-patch-1
> $ echo "something" > changedfile
> $ git add changedfile
> $ stg refresh
>
> $ stg rebase v2.6.27.58
>
> Checking for changes in the working directory ... done
> Popping all applied patches ... done
> Rebasing to "v2.6.27.58" ... done
> Pushing patch "test-patch-1" ... done
> Now at patch "test-patch-1"
> Traceback (most recent call last):
[...]
> File "/usr/lib/pymodules/python2.6/stgit/lib/git.py", line 408, in parse
> assert False
> AssertionError
StGit is parsing the commit information for some key/value pairs. It
looks like it found one which it didn't know about - "encoding:
latin1" and it failed.
For now it is OK to just remove the assert. The drawback is that if
you do some "stg uncommit" on some existing commits, it will lose
additional information but I don't think it matters to you since you
create your patches with StGit anyway and it doesn't generate such
information. Longer term we may want to preserve other things that may
appear in the commit data. I'll push this to the StGit repository as
well.
diff --git a/stgit/lib/git.py b/stgit/lib/git.py
index 3378728..f5ea965 100644
--- a/stgit/lib/git.py
+++ b/stgit/lib/git.py
@@ -404,8 +404,6 @@ class CommitData(Immutable, Repr):
cd = cd.set_author(Person.parse(value))
elif key == 'committer':
cd = cd.set_committer(Person.parse(value))
- else:
- assert False
assert False
class Commit(GitObject):
Thanks.
--
Catalin
prev parent reply other threads:[~2011-02-14 17:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-13 19:35 [STGIT] AssertionError on stg rebase Henrique de Moraes Holschuh
2011-02-14 17:23 ` Catalin Marinas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTim2F1B7=Q5wTfxxWod3yyyiMuGxKnEGNyCVjcuZ@mail.gmail.com' \
--to=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=hmh@hmh.eng.br \
--cc=kha@treskal.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).