------------------------------------------------------------------------------
To reply, visit https://hellosplat.com/s/beanbag/tickets/4822/
------------------------------------------------------------------------------
New update by jackdai
For Beanbag, Inc. > RBTools > Ticket #4822
Reply:
I fixed an identical issue by modifying `_find_remote()` in
`clients/git.py`.
The code eventually calls: `all_remotes = self._execute(['git', 'remote'],
split_lines=True)`. `split_lines=True` causes `execute()` to call
`data.splitlines(True)` which preserves newlines. Then `_find_remote()` runs
`if 'origin' in all_remotes:`. This fails (for me) because the contents of
`all_remotes` is `["origin\n"]` (note the trailing newline). Changing the if
check to be `if 'origin\n' in all_remotes:` fixes the issue for me. If that's
the right way to fix this, then obviously the else block needs to return
`all_remotes[0].strip()` to get rid of the newline if origin is not in the list.
I didn't do anyting to figure out if there was something that should be
changing upstream to prevent getting into this function in the first place.
This code appears to be wrong, so I just stopped once this fixed the issue.
--
You received this message because you are subscribed to the Google Groups
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/reviewboard-issues/20200116191715.29133.34432%40ip-10-1-54-209.ec2.internal.