示例#1
0
 def commit_cb(self, menu, tree, path=None):
     from bzrlib.plugins.gtk.commit import CommitDialog
     dialog = CommitDialog(tree, path)
     response = dialog.run()
     if response != Gtk.ResponseType.NONE:
         dialog.hide()
         dialog.destroy()
示例#2
0
        branch = None
        try:
            tree, path = WorkingTree.open_containing(file)
            branch = tree.branch
        except NotBranchError, e:
            path = e.path
            #return
        except NoWorkingTree, e:
            path = e.base
            try:
                (branch, path) = Branch.open_containing(path)
            except NotBranchError, e:
                path = e.path

        from bzrlib.plugins.gtk.commit import CommitDialog
        dialog = CommitDialog(tree, path)
        response = dialog.run()
        if response != gtk.RESPONSE_NONE:
            dialog.hide()
            dialog.destroy()

    def log_cb(self, menu, vfs_file):
        # We can only cope with local files
        if vfs_file.get_uri_scheme() != 'file':
            return

        file = vfs_file.get_uri()

        # We only want to continue here if we get a NotBranchError
        try:
            branch, path = Branch.open_containing(file)