Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo scriptability #8

Closed
GoogleCodeExporter opened this issue Apr 8, 2015 · 2 comments
Closed

repo scriptability #8

GoogleCodeExporter opened this issue Apr 8, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Reported by Shawn Pearce <sop@google.com> on Mon Feb 09 10:54:29 PST 2009
Source: JIRA REPO-8

repo should return useful exit codes and use stdout/stderr in a consistent way
in case someone wants to write a script that calls repo.

In Git we split commands into two different groups:

- plumbing:  These are scriptable commands that offer very small building
blocks of the Git system.  The command line options are usually only
--long-gnu-style and the input/output streams are formatted for easy machine
parsing, not human readability.  The commands, their options and their
stream formats are frozen in stone.

- porcelain: These are commands the human can invoke.  We can change their
options, use short options, have prettier output formats that are less
regular (and more difficult to parse).  These aren't meant to be invoked by
script writers.

We should consider doing the same thing with repo.  Especially since the
repo user interface may change and evolve a bit as we learn more about the
general Android workflow.

In terms of repo (since its all one big Python script) the plumbing commands
may just be small wrappers that convert command line arguments into
parameters for an internal "library" function.  Thus one can script repo by
either importing its library and calling the function directly in Python, or
by executing repo's plumbing command to get to the same function.  Human
commands might call multiple functions, and have a different entry point
that parses the command line arguments differently.

Original issue reported on code.google.com by code-rev...@gtempaccount.com on 24 Sep 2009 at 9:09

@GoogleCodeExporter
Copy link
Author

Original comment by sop+code@google.com on 24 Sep 2009 at 11:11

@GoogleCodeExporter
Copy link
Author

Basically we are ensuring the tool is stable for scripts by just never changing 
it.

:-)

Original comment by sop+code@google.com on 24 Sep 2009 at 11:15

  • Changed state: Incomplete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant