def upload
    # get the name of the current workspace branch
    RIM::git_session(@ws_root) do |s|
      branch = s.current_branch
      if branch.nil?
        raise RimException.new("Not on a git branch.")
      elsif !branch.start_with?("rim/")
        begin
          sha1 = s.rev_sha1(branch)
          @logger.info("Uploading modules...")
          upload_modules(get_upload_revisions(s, sha1))
        ensure
          s.execute("git checkout -B #{branch}")
        end
      else
        raise RimException.new("The current git branch '#{branch}' is a rim integration branch. Please switch to a non rim branch to proceed.")
      end
    end
  end
def upload
    # get the name of the current workspace branch
    RIM::git_session(@ws_root) do |s|
      branch = s.current_branch
      if branch.nil?
        raise RimException.new("Not on a git branch.")
      elsif !branch.start_with?("rim/")
        begin
          sha1 = s.rev_sha1(branch)
          @logger.info("Uploading modules...")
          upload_modules(get_upload_revisions(s, sha1))
        ensure
          s.execute("git checkout -B #{branch}")
        end
      else
        raise RimException.new("The current git branch '#{branch}' is a rim integration branch. Please switch to a non rim branch to proceed.")
      end
    end
  end
upload all module changes into corresponding remote repositories