        def nodes_in_branch(branch, options={})
          hg_args = ['rhlog', '--template={node}\n', "--rhbranch=#{CGI.escape(branch)}"]
          hg_args << "--from=#{CGI.escape(branch)}"
          hg_args << '--to=0'
          hg_args << "--limit=#{options[:limit]}" if options[:limit]
          hg(*hg_args) { |io| io.readlines.map { |e| e.chomp } }
        end