Conversation
|
I am trying this on Miri, and something doesn't seem right... I started this a few hours ago and completely forgot about it, and it is still running. Clearly it is not going anywhere. The corresponding command with #961 is and it completes in around 10min on an empty cache. |
ebd130a to
8625810
Compare
Found the bug, fixed in newest version of this PR. The reason was in contrast to the test case, in the real world you used a chained filter ( Now this should work (adapted test case, and tried it on miri as well). The only question remaining for me is if |
|
Yeah I was wondering about that name. |
|
The new branch looks great. :) I tried pulling Miri from Rust, and the history contained commit 338c50e396f31c3970ab4ae7bc5d79807c6c033b which is what I extracted with my branch. I tried pushing Miri to Rust, and got commit 6f2b52ff103f9095fb2817637bc7d388bd4c7f6b, the exact same as with by branch. This includes the same strange choice of base commit, 8e3b9bca65d7d79a3b0e9c33fed8d8c93dd66041. Pushing was a lot faster than with my branch, probably I didn't wire up some caching correctly. |
8625810 to
cc36dd1
Compare
:start=sha[...] filter:at_commit=sha[...] filter
cc36dd1 to
779e301
Compare
|
|
It does only apply to that one specific commit, not the subhistory before it. That was actually a bug in the other implementation. Consider a history like this: And the filter So the presence of |
But what about It is true that I did not consider the situation where the subtree "merges back" into the main history. For the use-cases I can imagine for this filter, that will never happen. But it is also true that more than 1 commit is being filtered -- all the commits of the |
|
Yes, they are being filtered kind of as a "dependency" of the The reason I have not merged this yet, is because I keep thinking about what to do in case you want multiple conditional filter operations in combination. Chaining will not really work because you don't know the sha in advance. |
Okay that is pretty confusing. From a user perspective it sure looks like the filter just applies to all these commits. (Also I think in my branch, looking at the earlier commits would have looked filtered, if the "chosen" commit already exists so that the ancestor check applies.)
Yeah I wondered about that too -- it might happen in rustc if other tools also switch to josh. My implementation propagated the same commit id to every filter in the chain so I think it would have worked with chaining, I have no idea what yours will do when |
|
Propagating the original commit down the chain would require also adding that to the key used for caching. Making the cache a lot bigger potentially and also making hits less likely. So I think in the end this special filter will have to be that: special. We already have that in another case: The workspace filter can only be in the top level chain and not anywhere deeper. This will be similar. However I think I want to solve the "multiple chosen commits" situation before settling on an API for this. I'm confident I though that shas will remain compatible so you can already use this as is if you don't mind running a non released version for some time. |
|
Yeah I can see how propagating the commit could break a data model.
Sounds good, thanks! |
This comment was marked as resolved.
This comment was marked as resolved.
|
Oh, I think I was on an outdated version of this branch. I guess the |
|
So it works now? |
|
Yeah, sorry for the noise. Only the parse error message could be improved. :)
|
c8084be to
5415575
Compare
|
Strangely, I am now getting an error when trying to push to this filter. The same thing worked fine a few times before, but now when I try to push the latest bit of Miri history it fails. From a clone of https://github.com/rust-lang/miri, I am doing In Pushing then shows That can only be referring to 85f449aafb9c9a522e03b9d9a05e0d7b47674586, which was already present in the last mergers and did not cause problems before. I don't understand what is different now. |
|
FWIW I am getting the same error with my own subtree_filter branch. I am sure I tested something like this before we decided to land the josh changes, but clearly what I tested was not representative for an actual |
5f01c01 to
e48826e
Compare
:at_commit=sha[...] filter:rev(...) filter
e48826e to
02dcfa0
Compare
f232237 to
64532cf
Compare
Change: start-filter
64532cf to
fbddba3
Compare
update josh instructions josh-project/josh#965 and josh-project/josh#994 have been merged so we don't need a forked josh any more. :) However, this is blocked on josh-project/josh#1032 which currently prevents me from actually testing this...
update josh instructions josh-project/josh#965 and josh-project/josh#994 have been merged so we don't need a forked josh any more. :) However, this is blocked on josh-project/josh#1032 which currently prevents me from actually testing this...
update josh instructions josh-project/josh#965 and josh-project/josh#994 have been merged so we don't need a forked josh any more. :) However, this is blocked on josh-project/josh#1032 which currently prevents me from actually testing this...
update josh instructions josh-project/josh#965 and josh-project/josh#994 have been merged so we don't need a forked josh any more. :) However, this is blocked on josh-project/josh#1032 which currently prevents me from actually testing this...
This allows selectively applying filtering rules to different parts of the history by providing a sha -> filter mapping as an argument.