[英]How to repo init a manifest file ignoring annotation tag?
repo manifest file has a line as below: 回购清单文件的一行如下:
<project name="something" path="something" revision="some sha"><annotation version="1.2.3" />
When I do repo init
on the manifest, it fails saying: 当我在清单上执行repo init
时,它不会说:
fatal: no name in <annotation> within /path/of/manifest.xml
It works if I change annotation tag in manifest as <annotation name="version" value="1.2.3" />
, but is there a way to workaround this? 如果我将清单中的注释标记更改为<annotation name="version" value="1.2.3" />
,它将起作用,但是是否有解决方法? I don't want to change those old manifest files, is there a way to do repo init by ignoring " annotation " tag? 我不想更改那些旧的清单文件,是否有一种方法可以通过忽略“ 注释 ”标签来进行回购初始化?
According to the manifest format , name
and value
are required. 根据清单格式 , name
和value
是必需的。 repo init
does not have any option that works on it. repo init
没有任何repo init
选项。
Specify another manifest or omit -m <manifest.xml>
in repo init
, and leave -m manifest
to repo sync
. 在repo init
指定另一个清单或忽略-m <manifest.xml>
,并保留-m manifest
以进行repo sync
。
You could modify the manifest between repo init
and repo sync
, like commenting out the annotation lines or making a new copy without annotation lines. 您可以在repo init
和repo sync
之间修改清单,例如注释掉注释行或制作没有注释行的新副本。 So you don't have to commit the changes. 因此,您不必提交更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.