@RequiresReadLock
  private void updateOnBackground(VirtualFile selectedFile) {
    T repository;
    try {
      Project project = getProject();
      repository = guessCurrentRepository(project, selectedFile);
      if (repository == null) {
        clearStatus();
        return;
      }
    }
    catch (ProcessCanceledException e) {
      // do nothing - a new update task is scheduled, or widget is disposed
      return;
    }
    catch (Throwable t) {
      LOG.error(t);
      clearStatus();
      return;
    }

    myText = DvcsBranchUtil.shortenBranchName(getFullBranchName(repository));
    myTooltip = getToolTip(repository);
    myIcon = getIcon(repository);
    myRepository = repository;

    if (myStatusBar != null) {
      myStatusBar.updateWidget(ID());
    }

    rememberRecentRoot(repository.getRoot().getPath());
  }
@RequiresReadLock
  private void updateOnBackground(VirtualFile selectedFile)