/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to commit.py

  • Committer: John Arbash Meinel
  • Date: 2007-10-02 18:26:42 UTC
  • mto: (322.1.1 trunk) (330.3.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: john@arbash-meinel.com-20071002182642-qs9ohpjp8fdkkl2o
Handle pointless commits and trees with unknown files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
564
564
 
565
565
        local = self._check_local.get_active()
566
566
 
567
 
        # if list(self._wt.unknowns()) != []:
568
 
        #     response = question_dialog(_("Commit with unknowns?"),
569
 
        #        _("Unknown files exist in the working tree. Commit anyway?"))
570
 
        #     if response == gtk.RESPONSE_NO:
571
 
        #         return
 
567
        # All we care about is if there is a single unknown, so if this loop is
 
568
        # entered, then there are unknown files.
 
569
        # TODO: jam 20071002 It seems like this should cancel the dialog
 
570
        #       entirely, since there isn't a way for them to add the unknown
 
571
        #       files at this point.
 
572
        for path in self._wt.unknowns():
 
573
            response = self._question_dialog(
 
574
                _("Commit with unknowns?"),
 
575
                _("Unknown files exist in the working tree. Commit anyway?"))
 
576
            if response == gtk.RESPONSE_NO:
 
577
                return
 
578
            break
572
579
 
573
580
        specific_files = None
574
581
        rev_id = None
579
586
                       local=local,
580
587
                       specific_files=specific_files)
581
588
        except errors.PointlessCommit:
582
 
            response = question_dialog(_('Commit with no changes?'),
583
 
                                       _('There are no changes in the working tree.'))
 
589
            response = self._question_dialog(
 
590
                                _('Commit with no changes?'),
 
591
                                _('There are no changes in the working tree.'
 
592
                                  ' Do you want to commit anyway?'))
584
593
            if response == gtk.RESPONSE_YES:
585
594
                rev_id = self._wt.commit(message,
586
595
                               allow_pointless=True,