Changeset - b3ef9012be54
default
0
1
0
hg: fix continuation binding of callback variables
The get_file_annotate generator yields a callback. That callback happened to
look at the current state of the generator. It happened to work anyway,
apparently because the callback always was called immediately, before the
generator state changed. But for example if the get_file_annotate was buffered
into a list, the callback would return the same result each time.
Instead, bind the generator iterator variables as named parameter values for
the callback function. That will make sure the callback always returns the
right value.
The get_file_annotate generator yields a callback. That callback happened to
look at the current state of the generator. It happened to work anyway,
apparently because the callback always was called immediately, before the
generator state changed. But for example if the get_file_annotate was buffered
into a list, the callback would return the same result each time.
Instead, bind the generator iterator variables as named parameter values for
the callback function. That will make sure the callback always returns the
right value.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)