/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 diff.py

  • Committer: Aaron Bentley
  • Date: 2008-02-23 06:37:01 UTC
  • Revision ID: aaron@aaronbentley.com-20080223063701-ldxzam7yf4u8wng8
Handle conflicts appropriately

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
from bzrlib.patches import parse_patches
37
37
from bzrlib.trace import warning
38
38
from bzrlib.plugins.gtk.window import Window
39
 
from dialog import error_dialog
 
39
from dialog import error_dialog, info_dialog, warning_dialog
40
40
 
41
41
 
42
42
class SelectCancelled(Exception):
476
476
                    self.directive, progress.DummyProgress())
477
477
                merger.check_basis(True)
478
478
                merger.merge_type = _mod_merge.Merge3Merger
 
479
                conflict_count = merger.do_merge()
479
480
                merger.set_pending()
480
 
                conflict_count = merger.do_merge()
 
481
                if conflict_count == 0:
 
482
                    # No conflicts found.
 
483
                    info_dialog(_('Merge successful'),
 
484
                                _('All changes applied successfully.'))
 
485
                else:
 
486
                    # There are conflicts to be resolved.
 
487
                    warning_dialog(_('Conflicts encountered'),
 
488
                                   _('Please resolve the conflicts manually'
 
489
                                     ' before committing.'))
481
490
                self.destroy()
482
491
            except Exception, e:
483
492
                error_dialog('Error', str(e))