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
Better hint when a sibling is provided without --to #5726
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5726 +/- ##
==========================================
- Coverage 90.63% 88.69% -1.95%
==========================================
Files 308 305 -3
Lines 42168 42153 -15
==========================================
- Hits 38220 37387 -833
- Misses 3948 4766 +818
Continue to review full report at Codecov.
|
datalad/core/distributed/push.py
Outdated
@@ -229,7 +229,13 @@ def __call__( | |||
if sr | |||
else 'No targets configured in dataset.')) | |||
return | |||
|
|||
potential_remote = False | |||
if not to and path: |
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.
May be that should be relevant only, if the path doesn't actually exist?
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.
good point. I moved it down into the if not matched_anything
section.
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.
Messaging is fine that way. I'm not convinced of the result change, though. What's specified remains (technically) a path that couldn't be matched. I wouldn't know why this should yield impossible
just because it happens to (also) be a remote name, while it's notneeded
if it's an arbitrary not matched path.
I oriented myself at how the case of a |
I see. But that's not (necessarily) the case here. The target could be auto-detectable (one existing remote only). In fact, if it wasn't we would fail |
Arguably, we could distinguish the cases where |
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.
Thx! I think this will improve UX!
I left a few comments on some possible optimizations.
@@ -229,7 +229,6 @@ def __call__( | |||
if sr | |||
else 'No targets configured in dataset.')) | |||
return | |||
|
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.
Noooo... my favorite empty line...why did it have to die....life is not fair...it feels so meaningless... ;-)
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.
I will bring it back to life ;-)
Co-authored-by: Michael Hanke <michael.hanke@gmail.com>
The failure of one AppVeyor run seems unrelated |
Failed during setup. Restarted. |
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.
This looks good to me now! Thx!
This is an attempt to fix #5712. If
--to
,push
reports "impossible" instead of "notneeded", and issues a hint to the user.Before:

After:
