WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
48272
REGRESSION(
r70437
): Git.revisions_changing_file no longer raises for non-existant files
https://bugs.webkit.org/show_bug.cgi?id=48272
Summary
REGRESSION(r70437): Git.revisions_changing_file no longer raises for non-exis...
Eric Seidel (no email)
Reported
2010-10-25 15:36:06 PDT
REGRESSION(
r70437
): Git.revisions_changing_file no longer raises for non-existant files test-webkitpy webkitpy.common.checkout.scm_unittest.GitSVNTest.test_revisions_changing_file ====================================================================== FAIL: test_revisions_changing_file (webkitpy.common.checkout.scm_unittest.GitSVNTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py", line 1237, in test_revisions_changing_file self._shared_test_revisions_changing_file() File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py", line 357, in _shared_test_revisions_changing_file self.assertRaises(ScriptError, self.scm.revisions_changing_file, "non_existent_file") AssertionError: ScriptError not raised
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2010-10-25 15:37:35 PDT
% git log non_existant_file fatal: ambiguous argument 'non_existant_file': unknown revision or path not in the working tree. Use '--' to separate paths from revisions % git log -- non_existant_file however just churns for a long while and then outputs nothing and exits 0. Both of those behaviors seem bad. I wonder if there is some flag we should pass to git.
David Kilzer (:ddkilzer)
Comment 2
2010-10-25 16:07:29 PDT
(In reply to
comment #1
)
> % git log non_existant_file > fatal: ambiguous argument 'non_existant_file': unknown revision or path not in the working tree. > Use '--' to separate paths from revisions > > % git log -- non_existant_file > > however just churns for a long while and then outputs nothing and exits 0. Both of those behaviors seem bad. I wonder if there is some flag we should pass to git.
What is the code trying to do? (Sorry, don't have time to peruse it now.) Why don't you just test for the file's existence and skip running "git log" in that case? I think "git log -- non_existant_file" may be checking the repository's history for any file that ever existed at that path. I think some discussion about this under the "History Simplification" section in "man git-log". This seems to run faster: git log --since="1 day ago" -- foo
Ojan Vafai
Comment 3
2010-12-02 16:50:11 PST
***
Bug 49948
has been marked as a duplicate of this bug. ***
Ojan Vafai
Comment 4
2010-12-02 16:51:30 PST
Can we do something about the failing test? Just comment out this line for now? I keep hitting this everytime I modify scm.py and it costs me some time to realize it wasn't my patch that broke it.
Tim 'mithro' Ansell
Comment 5
2013-01-21 19:42:07 PST
This test now passes. $ ./test-webkitpy webkitpy.common.checkout.scm.scm_unittest.GitSVNTest.test_revisions_changing_file Suppressing most webkitpy logging while running unit tests. Ran 1 test in 4.752s OK
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug