def SrcDstSame(src_url, dst_url):
  if src_url.IsFileUrl() and dst_url.IsFileUrl():
    # Translate a/b/./c to a/b/c, so src=dst comparison below works.
    new_src_path = os.path.normpath(src_url.object_name)
    new_dst_path = os.path.normpath(dst_url.object_name)
    return new_src_path == new_dst_path
  else:
    return (src_url.url_string == dst_url.url_string and
            src_url.generation == dst_url.generation)
Called when our 'checked' trait is changed.
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/copy_helper.py/SrcDstSame--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/ui/wx/action/action_item.py/_MenuItem._checked_changed