-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
Improvement: push failures #631
Comments
See #613 for an earlier discussion about this. I would be happy for a PorcelainError of some sort to be raised in this situation. Patches welcome :) |
Okay, will take care of it and link a PR here so this can be closed later. I wanna first check out the other exceptions in the porcelain folder to see if this should be ported to other functions, e.g. |
@jelmer so I've encountered what I think is two bugs/typos (thought I might as well pepify all of porcelain to get to know the code, and spotted them at that point): in path_to_tree_path
should be
in list_tree/ls_tree
should be
|
The second issue (in ls_tree) is definitely a bug - patches welcome. I'm not too sure about the first, I need to take a closer look - it may just be that one of the callers is not using path_to_tree_path correctly. |
Okay thought so, will put in a separate commit asap. Yes, seeing as tests fail I think that is probably the case, I will try looking into it. I guess ETA before PR is a couple days, wanted to do it quicker but haven't found the time yet |
OKay so for sure there is a problem with how
After:
And this raised a new problem: path need to be a string if passed to
|
Opened a PR : #633 if you wanna see changes, I haven't added porcelainExceptions yet, probly tonight |
PorcelainError and better error reporting in push have landed. |
CONTEXT
Hey guys, I'm using the porcelain module, and I would like to improve the push function. Currently, errors are only raised when the client is created with
get_transport_and_path
, which is fine, but not for the actual push, where they are caught and an errorlog to stderr:The thing is that in my case, and I think in most, the uncaught exceptions are not a real problem,, because usually other operations, such as a
clone
, or als_remote
already would have caused them to be raised before any push. However, if the error happens during the push, there is no internal way to know and stop an application at that point, at least not directly, since the exception is caught. I implemented a check that compares local/remotes head, but its suboptimal.IMPROVEMENTS
So here is how we could easily change this:
The text was updated successfully, but these errors were encountered: