Add SCMClient.parse_revision_spec and implement/use it in GitClient.
Review Request #5124 — Created Dec. 16, 2013 and submitted
Add
SCMClient.parse_revision_spec
and implement/use it in GitClient.As part of redoing the revision-range syntax for
rbt post
, I've decided to
add a method to SCMClient that can take in an array of revisions and "parse"
them, returning a dictionary with 'base', 'tip', and optional 'parent_base'
keys. This method does all the hard work of separating out the passed-in
revisions and detecting whether or not a parent diff is required.This method is currently only implemented for the GitClient. I've added a bunch
of unit tests to make sure it returns the right revisions, and also refactored
the diff generation code to use it for both thediff
and
diff_between_revisions
methods.
- Ran unit tests.
- Posted this change with the new code.
Description | From | Last Updated |
---|---|---|
Should be on the same line. |
chipx86 | |
Two blank lines. |
chipx86 | |
Can you add some docstrings? I want to work toward getting RBTools more heavily documented. |
chipx86 | |
Two blank lines. |
chipx86 | |
Can you add periods? |
chipx86 | |
Same line. |
chipx86 | |
Excess blank line. |
chipx86 | |
Here too. |
chipx86 | |
Here too. |
chipx86 | |
Missing period at the end of the sentence. |
chipx86 | |
Should be one line. |
chipx86 | |
"of" probably shouldn't be there. |
chipx86 | |
Missing period. |
chipx86 |