Re: [STGIT] AssertionError on stg rebase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 13 February 2011 19:35, Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]