code: def sh_report(self, full=True, latest=False):
          
  
          def pathvar_repr(var):
              _var = var.replace('"', '\"')
              return '"%s"' % _var
  
          output = []
          if not self.remote_url:
              output.append('#')
          output = output + (
              [self.label]
              + self.clone_cmd
              + [pathvar_repr(self.remote_url)]  # TODO: shell quote?
              + [pathvar_repr(self.relpath)]
          )
          yield ''
          yield "## %s" % pathvar_repr(self.relpath)
          yield ' '.join(output)
  
          if full:
              checkout_rev = self.current_id
              # if latest: checkout_rev = self.branch
  
              relpath = pathvar_repr(self.relpath) if self.relpath else None
              relpath = relpath if relpath else ''
              checkout_branch_cmd = (
                  [self.label]
                  + self.checkout_branch_cmd + [self.branch]
                  + self.repo_abspath_cmd
                  + [relpath])
              checkout_rev_cmd = (
                  [self.label]
                  + self.checkout_rev_cmd + [checkout_rev]
                  + self.repo_abspath_cmd
                  + [relpath])
  
              if latest:
                  checkout_cmd = checkout_branch_cmd
                  comment = checkout_rev_cmd
              else:
                  checkout_cmd = checkout_rev_cmd
                  comment = checkout_branch_cmd
  
              yield ' '.join(c for c in checkout_cmd if c is not None)
              yield '### %s' % ' '.join(c for c in comment if c is not None)
              # output.extend([checkout_cmd, ';', ' ###', comment])
  
              for x in self.recreate_remotes_shellcmd():
                  yield x
docs: Show shell command necessary to clone this repository
  
          If there is no primary remote url, prefix-comment the command
  
          Keyword Arguments:
              full (bool): also include commands to recreate branches and remotes
              latest (bool): checkout repo.branch instead of repo.current_id
  
          Yields:
              str: shell command necessary to clone this repository