mercurial branch name use integer as a name
2024-09-05 00:28:07
问题:
mercurial branch name use integer as a name
解决:
到安装目录下找到mercurial/scmutil.py文件(我的:/usr/local/Cellar/mercurial/3.8.1/lib/python2.7/site-packages/mercurial),修改下面
def checknewlabel(repo, lbl, kind):
# Do not use the "kind" parameter in ui output.
# It makes strings difficult to translate.
if lbl in ['tip', '.', 'null']:
raise error.Abort(_("the name '%s' is reserved") % lbl)
for c in (':', '\0', '\n', '\r'):
if c in lbl:
raise error.Abort(_("%r cannot be used in a name") % c)
//这里以前没有注释掉,现在注释掉,这样就不会对名称进行int检查,就可以使用
//int 类型的名字了
# try:
# int(lbl)
# raise error.Abort(_("cannot use an integer as a name"))
# except ValueError:
# pass
参考:
https://www.mercurial-scm.org/pipermail/mercurial-devel/2013-February/048686.html
https://www.mercurial-scm.org/pipermail/mercurial-devel/2012-October/045567.html (重要)
最新文章
- python代码中碰到的问题及解决
- spring cloud资料
- 查看SQLServer最耗资源时间的SQL语句
- css3 选择器(二)
- windows hosts
- Eclipse下新建Maven项目、自动打依赖jar包
- CentOS 安装SolrCloud
- Qt通过UDP传图片,实现自定义分包和组包
- ubuntu安装postgresql与postgis
- ant+dbunit 导xml到mysql
- 如何设置虚拟机、开发板、windows IP才能互相PING通
- 进入IT行业四月后的感想(生活日志)欢迎评论
- lesson - 4 Linux目录文件管理
- 举例MyBatis的常用的API及方法
- 原生js写的flybird小游戏
- vmware完整克隆(linux)
- Android:Unable to find explicit activity class
- Guava cache 示例
- C#控件之:进度条(ProgressBar)
- delphi JPG或BMP图片透明显示