Make `SCMTool.get_file()` take `base_commit_id`.
Review Request #7265 — Created April 29, 2015 and submitted
All SCMTool implementations should now take keyword arguments and a
base_commit_id argument. All internal implementations have been
converted and third party tools will cause a deprecation warning if
they do not have the proper method signature.The HgTool now takes advantage of this `base_commit_id` argument when
fetching files (since hg git diffs do not include index lines which
we use to determine what revisions to fetch). If `base_commit_id` is
provided it will override anything parsed from the diff.The same applies to SCMTool.file_exists()
New tests, unit tests pass, posted hg diff now uses the provided base_commit_id.
Description | From | Last Updated |
---|---|---|
're' imported but unused |
reviewbot | |
Single quotes. |
brennie | |
Single quotes. |
brennie | |
'FileNotFoundError' imported but unused |
reviewbot | |
No need for parens here. |
chipx86 | |
local variable 'new_changeset_id' is assigned to but never used |
reviewbot | |
local variable 'orig_changeset_id' is assigned to but never used |
reviewbot | |
Col: 17 E221 multiple spaces before operator |
reviewbot | |
Col: 21 E221 multiple spaces before operator |
reviewbot | |
We could probably make this a utility function, cutting down this code a lot and making it more reusable. Another … |
chipx86 | |
Col: 17 E221 multiple spaces before operator |
reviewbot | |
Col: 17 E221 multiple spaces before operator |
reviewbot | |
'warnings' imported but unused |
reviewbot |
- Change Summary:
-
Addressed feedback - tests, file_exists fixed.
- Description:
-
All SCMTool implementations should now take keyword arguments and a
~ base_commit_id
argument. All internal implementations have been~ base_commit_id argument. All internal implementations have been converted and third party tools will cause a deprecation warning if they do not have the proper method signature. ~ The HgTool now takes advantage of this
base_commit_id
argument when~ The HgTool now takes advantage of this `base_commit_id` argument when
fetching files (since hg git diffs do not include index lines which ~ we use to determine what revisions to fetch). If base_commit_id
is~ we use to determine what revisions to fetch). If `base_commit_id` is provided it will override anything parsed from the diff. + + The same applies to SCMTool.file_exists()
- Testing Done:
-
~ unit tests pass, posted hg diff now uses the provided base_commit_id.
~ New tests, unit tests pass, posted hg diff now uses the provided base_commit_id.
- Commit:
-
d2607206557ad40a91a0e605fdbe4daf82abb690280a3b216ca33376b1fa954c5df6e1eb190db1ac
-
Tool: Pyflakes Processed Files: reviewboard/scmtools/clearcase.py reviewboard/scmtools/mtn.py reviewboard/scmtools/git.py reviewboard/scmtools/hg.py reviewboard/scmtools/localfile.py reviewboard/scmtools/core.py reviewboard/scmtools/perforce.py reviewboard/scmtools/bzr.py reviewboard/scmtools/cvs.py reviewboard/scmtools/plastic.py reviewboard/scmtools/tests.py reviewboard/testing/scmtool.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/models.py
-
-
-
Tool: PEP8 Style Checker Processed Files: reviewboard/scmtools/clearcase.py reviewboard/scmtools/mtn.py reviewboard/scmtools/git.py reviewboard/scmtools/hg.py reviewboard/scmtools/localfile.py reviewboard/scmtools/core.py reviewboard/scmtools/perforce.py reviewboard/scmtools/bzr.py reviewboard/scmtools/cvs.py reviewboard/scmtools/plastic.py reviewboard/scmtools/tests.py reviewboard/testing/scmtool.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/models.py
-
-
- Change Summary:
-
Review Bot fixups.
- Commit:
-
280a3b216ca33376b1fa954c5df6e1eb190db1ac85e3cd5394d78b0ceae270c0201e04eca73dca53
-
Tool: Pyflakes Processed Files: reviewboard/scmtools/clearcase.py reviewboard/scmtools/mtn.py reviewboard/scmtools/git.py reviewboard/scmtools/hg.py reviewboard/scmtools/localfile.py reviewboard/scmtools/core.py reviewboard/scmtools/perforce.py reviewboard/scmtools/bzr.py reviewboard/scmtools/cvs.py reviewboard/scmtools/plastic.py reviewboard/scmtools/tests.py reviewboard/testing/scmtool.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/models.py
- Change Summary:
-
Fiuxed issue.
- Commit:
-
85e3cd5394d78b0ceae270c0201e04eca73dca53816a14e981e7ff2ed17c442a2f999745f10f32ad
-
Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/scmtools/clearcase.py reviewboard/scmtools/mtn.py reviewboard/scmtools/git.py reviewboard/scmtools/hg.py reviewboard/scmtools/localfile.py reviewboard/scmtools/core.py reviewboard/scmtools/perforce.py reviewboard/scmtools/bzr.py reviewboard/scmtools/cvs.py reviewboard/scmtools/plastic.py reviewboard/scmtools/tests.py reviewboard/testing/scmtool.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/models.py
-
-
- Change Summary:
-
Fixed PEP8. Apparently I like to hit the spacebar too much :P
- Commit:
-
816a14e981e7ff2ed17c442a2f999745f10f32adc715ebb10a78512be1d93ee2deb910ecd2b6e56e
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/scmtools/clearcase.py reviewboard/scmtools/mtn.py reviewboard/scmtools/git.py reviewboard/scmtools/hg.py reviewboard/scmtools/localfile.py reviewboard/scmtools/core.py reviewboard/scmtools/perforce.py reviewboard/scmtools/bzr.py reviewboard/scmtools/cvs.py reviewboard/scmtools/plastic.py reviewboard/scmtools/tests.py reviewboard/testing/scmtool.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/models.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/scmtools/clearcase.py reviewboard/scmtools/mtn.py reviewboard/scmtools/git.py reviewboard/scmtools/hg.py reviewboard/scmtools/localfile.py reviewboard/scmtools/core.py reviewboard/scmtools/perforce.py reviewboard/scmtools/bzr.py reviewboard/scmtools/cvs.py reviewboard/scmtools/plastic.py reviewboard/scmtools/tests.py reviewboard/testing/scmtool.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/models.py
-
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/scmtools/clearcase.py reviewboard/scmtools/mtn.py reviewboard/scmtools/git.py reviewboard/scmtools/hg.py reviewboard/scmtools/localfile.py reviewboard/scmtools/core.py reviewboard/scmtools/perforce.py reviewboard/scmtools/bzr.py reviewboard/scmtools/cvs.py reviewboard/scmtools/plastic.py reviewboard/scmtools/tests.py reviewboard/testing/scmtool.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/models.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/scmtools/clearcase.py reviewboard/scmtools/mtn.py reviewboard/scmtools/git.py reviewboard/scmtools/hg.py reviewboard/scmtools/localfile.py reviewboard/scmtools/core.py reviewboard/scmtools/perforce.py reviewboard/scmtools/bzr.py reviewboard/scmtools/cvs.py reviewboard/scmtools/plastic.py reviewboard/scmtools/tests.py reviewboard/testing/scmtool.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/models.py