                     @display_tab("project-editor")
                 @editor.display_tab(path:opened_path, foreground:opts.foreground)
 
-    switch_displayed_branch: (new_branch) =>
-        if new_branch != @meta.display_branch
-            @meta.display_branch = new_branch
-            @update_file_list_tab()
-            @update_commits_tab()
-
-    update_commits_tab: () =>
-        {commit_list, commits} = @meta.logs[@meta.display_branch]
-
-        # Set the selector that allows one to choose the current branch.
-        select = @container.find(".project-commits-branch")
-        select.empty()
-        for branch in @meta.branches
-            select.append($("<option>").text(branch).attr("value",branch))
-        select.val(@meta.display_branch)
-        that = @
-        select.change  () ->
-            that.switch_displayed_branch($(@).val())
-            return false
-
-        # Set the list of commits for the current branch.
-        list = @container.find(".project-commits-list")
-        list.empty()
-        for id in commit_list
-            entry = commits[id]
-            t = template_project_commit_single.clone()
-            t.find(".project-commit-single-message").text(trunc(entry.message, 80))
-            t.find(".project-commit-single-author").text(entry.author)
-            t.find(".project-commit-single-date").attr('title', entry.date).timeago()
-            t.find(".project-commit-single-sha").text(id.slice(0,10))
-            list.append(t)
-
-    # Display all the branches, along with information about each one.
-    update_branches_tab: () =>
-        list = @container.find(".project-branches-list")
-        list.empty()
-
-        current_branch = @meta.current_branch
-        @container.find(".project-branch").text(current_branch)
-        that = @
-
-        for branch in @meta.branches
-            t = template_project_branch_single.clone()
-            t.find(".project-branch-single-name").text(branch)
-            if branch == current_branch
-                t.addClass("project-branch-single-current")
-                t.find("a[href=#checkout]").hide()
-                #t.find("a[href=#compare]").hide()
-                t.find("a[href=#merge]").hide()
-            t.data('branch', branch)
-
-            # TODO -- combine following three into a single loop
-
-            # Make it so clicking on the "Checkout" button checks out a given branch.
-            t.find("a[href=#checkout]").data("branch", branch).click (evt) ->
-                branch = $(@).data('branch')
-                that.branch_op(branch:branch, op:'checkout')
-                return false
-
-            t.find("a[href=#delete]").data("branch",branch).click (evt) ->
-                branch = $(@).data('branch')
-                # TODO -- stern warnings
-                that.branch_op(branch:branch, op:'delete')
-                return false
-
-            t.find("a[href=#merge]").data("branch",branch).click (evt) ->
-                branch = $(@).data('branch')
-                # TODO -- stern warnings
-                that.branch_op(branch:branch, op:'merge')
-                return false
-
-            list.append(t)
-
-        @container.find(".project-branches").find("input").attr('placeholder',"Create a new branch from '#{current_branch}'...")
-
-    #########################################
-    # Operations on files in a path and branch.
-    #########################################
-
-    path_action: (opts) =>
-        opts = defaults opts,
-            action  : required     # 'delete', 'move'
-            branch  : undefined    # defaults to displayed branch
-            path    : undefined    # defaults to displayed current_path
-            commit_mesg : required
-            extra_options : undefined  # needed for some actions
-
-        spin_timer = undefined
-
-        async.series([
-            # Display the file/listing spinner
-            (cb) =>
-                spinner = @container.find(".project-file-listing-spinner")
-                spin_timer = setTimeout((()->spinner.show().spin()), 500)
-                cb()
-            # Switch to different branch if necessary
-            (cb) =>
-                if opts.branch != @meta.current_branch
-                    @branch_op(branch:opts.branch, op:'checkout', cb:cb)
-                else
-                    cb()
-
-            # Carry out the action
-            (cb) =>
-                switch opts.action
-                    when 'delete'
-                        salvus_client.remove_file_from_project
-                            project_id : @project.project_id
-                            path       : opts.path
-                            cb         : (err, mesg) =>
-                                if err
-                                    cb(err)
-                                else if mesg.event == "error"
-                                    cb(mesg.error)
-                                else
-                                    @current_path.pop()
-                                    cb()
-                    when 'move'
-                        salvus_client.move_file_in_project
-                            project_id : @project.project_id
-                            src        : opts.path
-                            dest       : opts.extra_options.dest
-                            cb         : (err, mesg) =>
-                                if err
-                                    cb(err)
-                                else if mesg.event == "error"
-                                    cb(mesg.error)
-                                else
-                                    @current_path = opts.extra_options.dest.split('/')
-                                    cb()
-                    else
-                        cb("unknown path action #{opts.action}")
-
-            # Reload the files/branches/etc to take into account new commit, file deletions, etc.
-            (cb) =>
-                clearTimeout(spin_timer)
-                @update_file_list_tab()
-                cb()
-
-        ], (err) ->
-            if err
-                alert_message(type:"error", message:err)
-        )
 
 project_pages = {}
 

                that.display_tab(link.data("target"))
                return false

            that.update_file_list_tab()

            if name == "project-file-listing"
                tab.onshow = () ->
                    that.editor?.hide_editor_content()


    # Update the listing of files in the current_path, or display of the current file.
    update_file_list_tab: (no_focus) =>
        @_update_file_list_tab no_focus, () =>
            @_show_all_files = false

    init_listing_show_all: () =>
        @container.find(".project-file-listing-show_all").click () =>
