Run hg status.

    Returns a 2-element tuple:
    * Text lines describing the status of the repository.
    * Empty sequence of subrepos, since hg does not support them.
483145
def status_mercurial(path, ignore_set, options):
    
    lines = run(['hg', '--config', 'extensions.color=!', 'st'], cwd=path)
    subrepos = ()
    return [b' ' + l for l in lines if not l.startswith(b'?')], subrepos
778705
def _grep_status(self, status_type):
        
        args = "qstat -f {}".format(self.id).split()
        res, _ = call(args)
        exit_status = [line for line in res.split('\n')
                if 'exit_status' in line]
        try:
            _, __, code = exit_status[0].split()
        except IndexError:
            code = None

        if status_type == 'complete' and code == '0':
            return True
        elif status_type == 'error' and code != '0':
            return True
        else:
            return False
509340
def status_message(self):
        
        if self.is_available:
            return "INSTALLED {0!s}"
        elif self.why and self.package:
            return "MISSING   {0!s:<20}needed for {0.why}, part of the {0.package} package"
        elif self.why:
            return "MISSING   {0!s:<20}needed for {0.why}"
        elif self.package:
            return "MISSING   {0!s:<20}part of the {0.package} package"
        else:
            return "MISSING   {0!s:<20}"
689349
def status(self):
        
        status = _HTTP_STATUS_LINES.get(self._status_code)
        return str(status or ('{} Unknown'.format(self._status_code)))
164802
def runs(self):
        
        return tuple(_Run(r, self) for r in self._element.r_lst)
574532
def status(self):
        

        rd = self.repo_dir

        logger.debug("pkg path %s", rd)
        if not rd:
            print(
                "unable to find pkg '%s'. %s" % (self.name, did_u_mean(self.name))
            )

        cwd = os.getcwd()
        os.chdir(self.repo_dir)
        logger.debug("cwd: %s, getting status %s ", cwd, self.repo_dir)
        try:
            p = git.status(_out=self._sh_stdout('blue'),
                           _err=self._sh_stderr('red'))
            p.wait()
        except Exception:
            pass
            # logger.warn(e)
        os.chdir(cwd)
464806
def status(iteration, elapsed_time)
      file.write("\r" + padded_line(iteration, elapsed_time))
      file.flush
    end
256662
def status():
    
    import pdb; pdb.set_trace()
    branch = git.branch
    issue = jira.get_issue(branch)
    if not issue:
        return

    # Print the title
    title = issue.fields.summary
    print "(%s) %s" % (branch, title)

    # Print the status
    status = issue.fields.status.name
    assignee = issue.fields.assignee.name
    in_progress = jira.get_datetime_issue_in_progress(issue)

    if in_progress:
        in_progress_string = in_progress.strftime("%a %x %I:%M %p")
        print '  Status: %s as of %s' % (status, in_progress_string)
    else:
        print '  Status: %s' % status

    print '  Assignee: %s' % assignee

    # Print the worklogs

    # Get the timespent and return 0m if it does not exist
    time_spent = '0m'
    try:
        time_spent = issue.fields.timetracking.timeSpent
    except:
        pass

    worklogs = jira.get_worklog(issue)
    print "\nTime logged (%s):" % time_spent
    if worklogs:
        for worklog in worklogs:
            worklog_hash = worklog.raw

            author = worklog_hash['author']['name']

            time_spent = worklog_hash.get('timeSpent', '0m')

            created = dateutil.parser.parse(worklog_hash['started'])
            created_pattern = '%a %x         '  # Adding extra space for formatting
            if not created.hour == created.minute == created.second == 0:
                created = created.astimezone(tzlocal())
                created_pattern = '%a %x %I:%M %p'
            comment = worklog_hash.get('comment', '<no comment>')

            updated_string = created.strftime(created_pattern)
            print "  %s - %s (%s): %s" % (updated_string, author, time_spent, comment)
    else:
        print "  No worklogs"

    cycle_time = jira.get_cycle_time(issue)
    if cycle_time:
        print '\nCycle Time: %.1f days' % cycle_time

    # Print the time elapsed since the last mark
    elapsed_time = jira.get_elapsed_time(issue)
    if elapsed_time:
        print '\n\033[0;32m%s elapsed\033[00m (use "jtime log ." to log elapsed time or "jtime log <duration> (ex. 30m, 1h etc.)" to log a specific amount of time)' % (elapsed_time)
    else:
        print '\n\033[0;32m0m elapsed\033[00m'
1250332
def status(self):
        
        data = self._read()
        self._status = YubiKeyUSBHIDStatus(data)
        return self._status
1108287
def get_statusmsg(self) -> str:
        
        if self._last_status is None:
            return self._last_status
        return self._last_status.decode()
752964
def run(self):
        
        if (self.repo in self.meta.default_repositories and
                self.repo in self.meta.repositories):
            try:
                self.check = self.all_repos[self.repo]()
            except OSError:
                usage(self.repo)
                raise SystemExit()
        elif self.repo in self.meta.repositories:
            self.check = self._init.custom(self.repo)
        else:
            usage(self.repo)
            raise SystemExit()
        self.status_bar()
        self.status()
        self.print_status(self.repo)
        self.summary()
300698
def hg(cmd, options={})
      options[:in] ||= repository.path
      options[:repository] = repository
      options[:append_hg] = true
      run(cmd, options)
    end
383072
def show_status(self, status):
        
        statuses = self.get_statuses()
        statuses = [x for x in statuses if x['value'] == status]
        if len(statuses) == 0:
            raise Exception("Unknown status value")
        else:
            return statuses[0]
772219
def sync(ui, repo, **opts):
	
	if codereview_disabled:
		raise hg_util.Abort(codereview_disabled)

	if not opts["local"]:
		# If there are incoming CLs, pull -u will do the update.
		# If there are no incoming CLs, do hg update to make sure
		# that an update always happens regardless. This is less
		# surprising than update depending on incoming CLs.
		# It is important not to do both hg pull -u and hg update
		# in the same command, because the hg update will end
		# up marking resolve conflicts from the hg pull -u as resolved,
		# causing files with <<< >>> markers to not show up in 
		# hg resolve -l. Yay Mercurial.
		if hg_incoming(ui, repo):
			err = hg_pull(ui, repo, update=True)
		else:
			err = hg_update(ui, repo)
		if err:
			return err
	sync_changes(ui, repo)
786433
def status(self):
        ''''''
        message = self.status_message
        if message is None:
            message = STATUS[self.status_code]
        return '%s %s' % (self.status_code, message)
518661
def get_status(self):
    
    self.__update_state()
    if self._state.active:
      return self.RUNNING
    else:
      return self._state.result_status
88424
def get_lsf_status():
    
    status_count = {'RUN': 0,
                    'PEND': 0,
                    'SUSP': 0,
                    'USUSP': 0,
                    'NJOB': 0,
                    'UNKNWN': 0}

    try:
        subproc = subprocess.Popen(['bjobs'],
                                   stdout=subprocess.PIPE,
                                   stderr=subprocess.PIPE)
        subproc.stderr.close()
        output = subproc.stdout.readlines()
    except OSError:
        return status_count

    for line in output[1:]:
        line = line.strip().split()
        # Protect against format of multiproc jobs
        if len(line) < 5: 
            continue

        status_count['NJOB'] += 1

        for k in status_count:
            if line[2] == k:
                status_count[k] += 1

    return status_count