Ticket #340 (new defect)

Opened 4 months ago

Last modified 2 weeks ago

Git.startVC overrides the default branch setting even if branch argument is None

Reported by: dionoea Assigned to: dustin
Priority: major Milestone: 0.8.0
Component: other Version: 0.7.8
Keywords: review Cc: dionoea@videolan.org, dustin

Description (Last modified by warner)

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 (0.5 kB) - added by dustin on 08/31/08 07:45:11.
340-conditional.patch

Change History

08/31/08 06:36:45 changed by dustin

  • cc changed from dionoea@videolan.org to dionoea@videolan.org, dustin.

08/31/08 07:45:11 changed by dustin

  • attachment 340-conditional.patch added.

340-conditional.patch

08/31/08 07:45:30 changed by dustin

  • keywords changed from git branch to review devtree.

09/03/08 15:28:14 changed by warner

  • description changed.

reformatted summary to avoid wikification

09/03/08 15:32:17 changed 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?

09/15/08 22:29:44 changed 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.

09/16/08 11:48:19 changed by warner

  • owner set to dustin.
  • milestone changed from undecided to 0.8.0.

12/28/08 18:36:35 changed by dustin

  • keywords deleted.

12/28/08 21:51:41 changed by dustin

  • keywords set to review.

oops, still needs review