/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 handle-patch

  • Committer: Vincent Ladeuil
  • Date: 2008-05-05 18:16:46 UTC
  • mto: (487.1.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 490.
  • Revision ID: v.ladeuil+lp@free.fr-20080505181646-n95l8ltw2u6jtr26
Fix bug #187283 fix replacing _() by _i18n().

* genpot.sh 
Remove duplication. Add the ability to specify the genrated pot
file on command-line for debugging purposes.

* po/olive-gtk.pot:
Regenerated.

* __init__.py, branch.py, branchview/treeview.py, checkout.py,
commit.py, conflicts.py, diff.py, errors.py, initialize.py,
merge.py, nautilus-bzr.py, olive/__init__.py, olive/add.py,
olive/bookmark.py, olive/guifiles.py, olive/info.py,
olive/menu.py, olive/mkdir.py, olive/move.py, olive/remove.py,
olive/rename.py, push.py, revbrowser.py, status.py, tags.py:
Replace all calls to _() by calls to _i18n(), the latter being
defined in __init__.py and imported in the other modules from
there. This fix the problem encountered countless times when
running bzr selftest and getting silly error messages about
boolean not being callables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
 
3
 
from bzrlib import errors, merge_directive
4
 
from bzrlib.plugin import load_plugins
5
 
from bzrlib.plugins.gtk import open_display
6
 
load_plugins()
7
 
 
8
 
import sys
9
 
 
10
 
if len(sys.argv) < 2:
11
 
        print "Usage: handle-patch <path>"
12
 
        sys.exit(1)
13
 
 
14
 
 
15
 
path = sys.argv[1]
16
 
 
17
 
try:
18
 
        from bzrlib.plugins.gtk.diff import (DiffController,
19
 
                                                                                 MergeDirectiveController)
20
 
        if path == '-':
21
 
                lines = sys.stdin.readlines()
22
 
        else:
23
 
                lines = open(path, 'rb').readlines()
24
 
        lines = [l.replace('\r\n', '\n') for l in lines]
25
 
        try:
26
 
                directive = merge_directive.MergeDirective.from_lines(lines)
27
 
        except errors.NotAMergeDirective:
28
 
                controller = DiffController(path, lines)
29
 
        else:
30
 
                controller = MergeDirectiveController(path, directive)
31
 
        window = controller.window
32
 
        window.show()
33
 
        gtk = open_display()
34
 
        window.connect("destroy", gtk.main_quit)
35
 
except Exception, e:
36
 
        from dialog import error_dialog
37
 
        error_dialog('Error', str(e))
38
 
        raise
39
 
gtk.main()
 
1
#!/bin/sh
 
2
/home/abentley/bin/bzr ghandle-patch "$@"