def unpack_groups(hg_unbundle10_obj):
 (yield [chunk for chunk in unpack_chunks(hg_unbundle10_obj)])
 (yield [chunk for chunk in unpack_chunks(hg_unbundle10_obj)])
 while True:
  (length,) = struct.unpack('>l', readexactly(hg_unbundle10_obj, 4))
  if (length <= 4):
   break
  filename = readexactly(hg_unbundle10_obj, (length - 4)).encode('string_escape')
  (yield (filename, [chunk for chunk in unpack_chunks(hg_unbundle10_obj)]))

def unpack_groups ( hg_unbundle10_obj ) : ( yield [ chunk for chunk in unpack_chunks ( hg_unbundle10_obj ) ] ) ( yield [ chunk for chunk in unpack_chunks ( hg_unbundle10_obj ) ] ) while True : ( length , ) = struct . unpack ( '>l' , readexactly ( hg_unbundle10_obj , 4 ) ) if ( length <= 4 ) : break filename = readexactly ( hg_unbundle10_obj , ( length - 4 ) ) . encode ( 'string_escape' ) ( yield ( filename , [ chunk for chunk in unpack_chunks ( hg_unbundle10_obj ) ] ) )
this method provides a generator of parsed groups from a mercurial unbundle10 object which is created when a changeset that is pushed to a tool shed repository using hg push from the command line is read using readbundle .