Ticket #340 (closed defect: fixed)
Git.startVC overrides the default branch setting even if branch argument is None
| Reported by: | dionoea | Owned by: | dustin |
|---|---|---|---|
| Priority: | major | Milestone: | 0.7.9 |
| Version: | 0.7.8 | Keywords: | review |
| Cc: | dionoea@…, dustin |
Description (last modified by warner) (diff)
Can be fixed by using this code instead:
def startVC(self, branch, revision, patch):
if branch is not None:
self.args['branch'] = branch
if revision is not None:
self.args['revision'] = revision
if patch is not None:
self.args['patch'] = patch
Other VCs are probably affected too. (Sorry for the irregular patch, I just modified the debian installed version and thus don't have anything to diff against)
Attachments
Change History
comment:3 Changed 5 years ago by warner
- Description modified (diff)
reformatted summary to avoid wikification
comment:4 Changed 5 years ago by warner
hrm, I'm not sure this is right. There is always supposed to be a self.args['branch'] key. The per-step default branch is computed in Source.start here and passed in as an argument to startVC here, so the assignment that you're making optional is already incorporating the default branch information.
Am I misunderstanding something?
comment:5 Changed 5 years ago by warner
Ping?
I'm going to let 0.7.9 go out the door with this change, but I think we may need to revert it. The Source subclass __init__ method is supposed to set self.branch instead of copying the default branch into self.args['branch']. Then Source.start picks up the default from self.branch and passes it into startVC.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
