Ticket #340 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

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

340-conditional.patch Download (521 bytes) - added by dustin 5 years ago.
340-conditional.patch

Change History

comment:1 Changed 5 years ago by dustin

  • Cc dustin added

Changed 5 years ago by dustin

340-conditional.patch

comment:2 Changed 5 years ago by dustin

  • Keywords review devtree added; git branch removed

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.

comment:6 Changed 5 years ago by warner

  • Owner set to dustin
  • Milestone changed from undecided to 0.8.0

comment:7 Changed 4 years ago by dustin

  • Keywords review devtree removed

comment:8 Changed 4 years ago by dustin

  • Keywords review added

oops, still needs review

comment:9 Changed 4 years ago by dustin

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from 0.8.0 to 0.7.9

No complaints about this in 0.7.9..

Note: See TracTickets for help on using tickets.