Skip to content
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

Traceback on git bzr push --overwrite #65

Open
OddBloke opened this issue Feb 5, 2015 · 1 comment
Open

Traceback on git bzr push --overwrite #65

OddBloke opened this issue Feb 5, 2015 · 1 comment

Comments

@OddBloke
Copy link

OddBloke commented Feb 5, 2015

$ git bzr push --overwrite
09:17:16 Starting import ...
09:17:17 Updating branch information ...
     branch cpc now has 1062 revisions and 0 tags
09:17:17 Imported 32 revisions, updating 1 branch and 0 trees in 0:00:01
To refresh the working tree for other branches, use 'bzr update' inside that branch.
Traceback (most recent call last):
  File "/usr/bin/git-bzr", line 709, in <module>
    sys.exit(main(sys.argv))
  File "/usr/bin/git-bzr", line 703, in main
    return func(argv[2:])
  File "/usr/bin/git-bzr", line 486, in cmd_push
    bzr(['push'] + params + [upstream])
  File "/usr/bin/git-bzr", line 63, in bzr
    return run_command(cmd, **kwargs)
  File "/usr/bin/git-bzr", line 33, in run_command
    logging.info(' '.join(cmd))
TypeError: sequence item 3: expected string, NoneType found
@OddBloke
Copy link
Author

OddBloke commented Feb 5, 2015

It looks like this is a problem in cmd_push(), as upstream is never set to anything but None before passing it to bzr(); it is assumed that having a known_upstream means there won't be errors, but giving --overwrite bypasses line 459 which actually does upstream = known_upstream.

This bug is either with reporting the error to the user (i.e. git-bzr-ng should be saying "You have to specify which branch you want to overwrite.") or with the actual behaviour (i.e. git-bzr-ng should be overwriting the known upstream branch).

@termie, I was expecting (and would, I think, prefer) the latter, but would be happy to submit a PR for whichever you think makes sense. Let me know. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant