作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如果我从 DOS 提示符运行以下命令:
hg parent --template {latesttag}
然后我得到按预期返回的最新标签值。但是,如果我从 powershell 控制台中运行相同的命令,则会出现以下错误:
hg parent :选项 -i 无法识别
我需要命令在 powershell 中运行,以便我可以将其结果作为要使用的变量。知道我需要做什么才能运行命令吗?
最佳答案
您应该只需要将参数括在 --template
中。在引号中,以便 Powershell 知道它是一个字符串:
hg parents --template '{latesttag}'
hg parents --template '"{latesttag}"'
关于powershell - 如何从 Powershell 中获取最新的 Mercurial 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6180786/
我是一名优秀的程序员,十分优秀!