original_docstring: 
          Fetch the repo. If the local copy was updated, return True. If the
          local copy was already up-to-date, return False.
          
docstring: Fetch the repo. If the local copy was updated, return True. If the
  local copy was already up-to-date, return False.
docstring_tokens: Fetch the repo . If the local copy was updated return True . If the local copy was already up - to - date return False .
code: def _fetch(self):
          '''
          Fetch the repo. If the local copy was updated, return True. If the
          local copy was already up-to-date, return False.
          '''
          origin = self.repo.remotes[0]
          try:
              fetch_results = origin.fetch()
          except AssertionError:
              fetch_results = origin.fetch()
  
          new_objs = False
          for fetchinfo in fetch_results:
              if fetchinfo.old_commit is not None:
                  log.debug(
                      '{0} has updated \'{1}\' for remote \'{2}\' '
                      'from {3} to {4}'.format(
                          self.role,
                          fetchinfo.name,
                          self.id,
                          fetchinfo.old_commit.hexsha[:7],
                          fetchinfo.commit.hexsha[:7]
                      )
                  )
                  new_objs = True
              elif fetchinfo.flags in (fetchinfo.NEW_TAG,
                                       fetchinfo.NEW_HEAD):
                  log.debug(
                      '{0} has fetched new {1} \'{2}\' for remote \'{3}\' '
                      .format(
                          self.role,
                          'tag' if fetchinfo.flags == fetchinfo.NEW_TAG
                              else 'head',
                          fetchinfo.name,
                          self.id
                      )
                  )
                  new_objs = True
  
          cleaned = self.clean_stale_refs()
          return bool(new_objs or cleaned)
code_tokens: def _fetch ( self ) : origin = self . repo . remotes [ 0 ] try : fetch_results = origin . fetch ( ) except AssertionError : fetch_results = origin . fetch ( ) new_objs = False for fetchinfo in fetch_results : if fetchinfo . old_commit is not None : log . debug ( '{0} has updated \'{1}\' for remote \'{2}\' ' 'from {3} to {4}' . format ( self . role , fetchinfo . name , self . id , fetchinfo . old_commit . hexsha [ : 7 ] , fetchinfo . commit . hexsha [ : 7 ] ) ) new_objs = True elif fetchinfo . flags in ( fetchinfo . NEW_TAG , fetchinfo . NEW_HEAD ) : log . debug ( '{0} has fetched new {1} \'{2}\' for remote \'{3}\' ' . format ( self . role , 'tag' if fetchinfo . flags == fetchinfo . NEW_TAG else 'head' , fetchinfo . name , self . id ) ) new_objs = True cleaned = self . clean_stale_refs ( ) return bool ( new_objs or cleaned )
short_docstring: Fetch the repo.
short_docstring_tokens: Fetch the repo .
comment: '''
          Fetch the repo. If the local copy was updated, return True. If the
          local copy was already up-to-date, return False.
          '''