Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

run: Move libvcs to new SubprocessCommand, document + test overriding #340

Copy link
Copy link
Open
@tony

Description

@tony
Issue body actions

requires #337

  • run() should convert to Popen params for compatibility with SubprocessCommand

  • run() should support legacy_params (existing) to deprecate safely

class CommandPopenMixin:
    _run_fn = Subprocess.Popen


class CommandRunMixin:
    _run_fn = Subprocess.run

class Command:
    _run_fn = SubprocessCommand




class Command:
    _run_fn = SubprocessCommand

This turns git command into a subprocess command factory:

class Git(Command):
   ...


git_factory = Git(url='...')
status_cmd = git_factory.status()
status_cmd.run()
status_cmd.Popen()

Subprocess.Popen
Subprocess.run

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.