chiark / gitweb /
blame: Put the filename in the loadblame result
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 May 2019 14:18:18 +0000 (15:18 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 30 May 2019 10:15:57 +0000 (11:15 +0100)
We are going to use this to say what kind of fish it was, in
~blame #last.

We also need to change the two places where this is destructured.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Servus-chiark.py
commands.py

index 0f40c2d044186102464562617c081ed7b172f4d7..6d3af24c258625c62231c49635d0b79722e6337c 100755 (executable)
@@ -70,7 +70,7 @@ def loadblame(filename):
             thing=' '.join(l[2:])
             bdb[thing]=commit
     keys=bdb.keys()
             thing=' '.join(l[2:])
             bdb[thing]=commit
     keys=bdb.keys()
-    return bdb,keys
+    return bdb,keys,filename
     
 # load a file full of flirts or trouts
 def __load(filename):
     
 # load a file full of flirts or trouts
 def __load(filename):
index a5745091241a1ac87c649d2a85cfc5b49c98ebdb..8cc34f03ac6f4dc4997b4f435523842bc7b40601 100755 (executable)
@@ -315,9 +315,9 @@ def __getall(tdb,tdbk,fdb,fdbk,sdb,sdbk,what):
     return tans+fans+sans
 
 def blameq(bot,cmd,nick,conn,public,fish,cfgs):
     return tans+fans+sans
 
 def blameq(bot,cmd,nick,conn,public,fish,cfgs):
-    tdb,tdbk = cfgs[0][7] # urgh, magic, to support magic knowledge below
-    fdb,fdbk = cfgs[1][7]
-    sdb,sdbk = cfgs[2][7]
+    tdb,tdbk,x = cfgs[0][7] # urgh, magic, to support magic knowledge below
+    fdb,fdbk,x = cfgs[1][7]
+    sdb,sdbk,x = cfgs[2][7]
     clist=cmd.split()
     if len(clist) < 2:
        bot.automsg(public,nick,"Who or what do you want to blame?")
     clist=cmd.split()
     if len(clist) < 2:
        bot.automsg(public,nick,"Who or what do you want to blame?")
@@ -327,7 +327,7 @@ def blameq(bot,cmd,nick,conn,public,fish,cfgs):
        if fish.last_cfg is None:
            bot.automsg(public,nick,"Nothing")
            return
        if fish.last_cfg is None:
            bot.automsg(public,nick,"Nothing")
            return
-       xdb,xdbk = fish.last_cfg[7]
+       xdb,xdbk,kindsfile = fish.last_cfg[7]
        ans=__getcommits(xdb,xdbk,fish.last)
     elif clist[1]=="#trouts" or clist[1]=="#trout":
        ans=__getcommits(tdb,tdbk,cwhat)
        ans=__getcommits(xdb,xdbk,fish.last)
     elif clist[1]=="#trouts" or clist[1]=="#trout":
        ans=__getcommits(tdb,tdbk,cwhat)