On Sat, Apr 7, 2012 at 3:45 PM, lkcl luke <[email protected]> wrote: > On Sat, Apr 7, 2012 at 3:43 PM, Peter Bittner <[email protected]> wrote: >> Jeez, the script mentioned in the thread is in ./contrib! >> ./contrib/pyjscompressor.py >> >> http://pyjs.org/pygit/#file=contrib/pyjscompressor.py&id=57a622eff0eb2392b09eeb8b3c270fed542b9a2a&mimetype=text-x-python > > TODO: update pyjamasgitweb so that it takes into account those > #arguments... doh! it needs only about 4-5 lines.
ok it actually turned out to be damn complex. who was it who was talking about complex asynchronous event interactions? cos that's what just bit me here. i thought it would need only 4 to 5 lines, and that's actually what was needed, but the problem was where to put them. what happened was this: * a jsonrpc call is fired to read the list of branches * another jsonrpc call is fired to read the list of commits. * both these are asynchronous * when the list of branches comes in, *another* call is fired to read the root tree (directory). but this last call is made using information that was stored globally. when i added a "history notification" in a naive way, just changing the # token, it resulted in *more* asynchronous calls that would interfere with the above, where things hadn't been properly set up and so on. so what i had to do was wait until things had settled down, and _then_ fire off history notification which would result in the file being read. but, before that happens, you will see that the history token in the web page (after the #) "jumps" to the root directory *first*... and then a split second later is restored back to the location that it was at originally. all a bit kludgey but it works. gaah. there's only 300 or so lines in pygit.py, and i was the one who originally wrote it. how the hell can it take me an hour to add 5 more lines of code in the right place?? :) bottom line: links like the one that peter posted should now work. l.

