-
Notifications
You must be signed in to change notification settings - Fork 250
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
#671: convert str to Fact before check #672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ederag Thanks for looking into this, @aquaherd thanks for putting this into a PR. Looks like a good fix for the update_fact
method in isolation. I haven't tested the code, but it looks like both of you did, so I'm approving this.
As a followup to this (or maybe do it directly, since it would also fix this problem), I wonder if it would be good to handle the # to be removed once update facts use Fact directly.
comment by moving the string-to-fact conversion (i.e. the Fact.parse()
and fact.copy
lines) into Storage.UpdateFact()
, since I believe that is the only call to update_fact
that currently (and always) passes a string. This would also allow removing the start_time
and end_time
arguments, which are then completely unused. @ederag, would you agree, or is there some indirect call still possible that needs to keep compatibility?
No, I do not have time to explain in details, but it's exactly where it should be, IMO. |
94fcb7b
to
864fa0f
Compare
Hm, I'm not sure I understand why, but let's just leave it at this fix and leave any refactoring for later, then. I've updated the commit message to be a bit more verbose and link to the isssue (@aquaherd this means I did a force push to your branch, so pull carefully). As far as I'm concerned this is ready to merge once another approval is added (or, since it is a rather simple change, if nobody objects for some time, I guess). |
You play the boss, part of which I understand (you are responsible for the commits), |
This method was written to handle either a Fact object or a string description of a fact. However, the string-to-Fact conversion happened too late in the method, after `check_fact()` was called, which requires a Fact object, leading to an error like: AttributeError: 'dbus.String' object has no attribute 'start_time' This happened in particular when using the DBus UpdateFact method, which always passes a string to `update_fact()`. This commit ensures that the string-to-Fact conversion is done immediately, so the rest of the method can just assume there is a Fact method. This fixes projecthamster#671. Thanks to ederag for this commit, and to Hakan Erduman for submitting it in a PR.
864fa0f
to
8772d4a
Compare
I agree that preserving sufficient history and crediting is important.
But the original authorship date is still used? It is shown by default in git show and if you show more details, you can see both the original authordate and the latest commitdate. There is no record of any intermediate commitdates, but I don't think git supports tracking those (your commit date was already lost in the rebase done by @aquaherd).
Which convention in particular? Standard git convention, AFAIK, is a single summary line, empty line and a detailed description On top of that I'm using a different convention than you have done in the past, in order to improve readability and verbosity.
Good point. This is normally covered by the Author attribute, but since @aquaherd is not the original author, their credit got lost. I've added a note to the commit message to fix that. |
It feels longer to read and answer you than to fix things. That's what devs see on github ("authored and committed 7 minutes ago"), |
As for the timestamp: This is a choice made by github (to show the commit date more prominently than the author date, unlike git, which prefers the AuthorDate), which is maybe unfortunate, but IMHO also not a big deal. It does not seem a good idea to me to provide an incorrect CommitDate for this commit just to get Github to display this nicer. As for the crediting: If git would be able to list multiple committers, I'd be happy to do so, but the current approach is that git tracks the author and the most recent committer, so that's what's happening here. Again, I do not think it would be good to change the committer here, which would make it less clear who has finalized this commit. |
In my opinion, you did little (but delaying) in comparison to @aquaherd. |
@aquaherd You merged a commit I explicitly opposed to, which I find disrespectful, for your information. |
I am sorry if I hurt your feelings - please be assured that I did not intend any disrespect to you or any of the contributors to this repository. All we did was moving four lines of code downward by four and I am rather uninterested in who's getting credit or how the commit message adheres to whose standards as long as there's a fix upstreamed to the next release whenever that may be. Everybody please just relax :) |
"Everybody please" don't tell me to "relax" when I just call for mere respect 🙂. Anyway, if those were your best apologies, then they are accepted. Let's forget this one. |
Please accept this PR into the next hamster release.
It enables the xfce4-panel-plugin to do in-place edits without adding a json library dependency.
Original author is @ederag .