Mercurial bisect有什么用处? [英] What is Mercurial bisect good for?

查看:99
本文介绍了Mercurial bisect有什么用处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读hg bisect及其有趣之处,因为它能够知道哪个版本引入了错误,但是我想知道人们将这些信息用于什么目的.我能想到的唯一一件事就是试图缩小哪些日期可能需要修复数据,如果它是导致某种形式的无效数据的错误.

I've been reading about hg bisect and its interesting to be able to know which revision introduced a bug, but I'd like to know what people use this information for. The only thing I can think of is trying to narrow down which dates might need a data fix if it's a bug that results in some form of invalid data.

更新: 我认为在发布此信息之前我完全误解了这个目的.我当时在想进行调试,找出哪一行引入了该错误,然后使用bisect.似乎bisect对我来说是一种不必花费时间猜测错误可能在哪里以及放置断点或日志记录的方法.相反,我应该编写一个现在失败的小测试,通过以前的修订,并一分为二地告诉我问题的根源.

update: I think I completely misunderstood the purpose before I posted this. I was thinking that I would do the debugging and find which line(s) introduced the bug and then use bisect. It seems bisect is a way for me to not have to spend time guessing where the bug might be and placing breakpoints or logging. Instead I should write a small test that fails now, passes in a past revision and have bisect tell me where the problem originates.

推荐答案

跟踪引入错误的变更集.我认为这非常有用.如果您的软件突然发生故障,并且您不知道是由哪个更改引起的,则将错误一分为二可以轻松地查找到该更改.我对您所说的约会一无所知.

To track down the changeset that introduced a bug. I think it's obvious that this is very useful. If your software suddenly fails and you don't know which change caused the bug bisect makes it easy to track down that change. I don't get at all what you're saying about dates.

这篇关于Mercurial bisect有什么用处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆