<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 14, 2012 at 12:09 PM, Jon Szymaniak <span dir="ltr">&lt;<a href="mailto:jon.szymaniak@gmail.com" target="_blank">jon.szymaniak@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb adM"><div class="h5">&gt;&gt; tl;dr: Doesn&#39;t the &quot;update&quot; in lines 142-147 of hg.py cause issues when<br>


&gt;&gt; SRCREV is a tag?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi all,<br>
&gt;&gt;<br>
&gt;&gt; I didn&#39;t have any luck with this post on the Yocto mailing list. Since it seems<br>
&gt;&gt; more like a bitbake issue (I&#39;m very hesitant to cry &quot;bug&quot; at this point),<br>
&gt;&gt; I hope I&#39;m in the right place.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve been running into &quot;Fetcher failures&quot; for my recipes using<br>
&gt;&gt; mercurial recently, which report that I&#39;m asking for an unknown revision,<br>
&gt;&gt; despite it being valid. A trimmed log is at the end of this post.<br>
&gt;&gt;<br>
&gt;&gt; After looking at hg.py, it seems the issue is that the<br>
&gt;&gt; &#39;hg update -r MY_TAG&#39; that follows the &#39;hg clone -r MY_TAG ...&#39; is doomed to<br>
&gt;&gt; fail because that tag isn&#39;t visible until the next rev, where the action of<br>
&gt;&gt; tagging it is committed.<br>
&gt;&gt;<br>
&gt;&gt; For example, if I clone v1.1.0, I won&#39;t see that tag because the tag is added<br>
&gt;&gt; to .hgtags in commit 41:58b..<br>
&gt;&gt;<br>
&gt;&gt;       tip                             41:58b8f368be68<br>
&gt;&gt;       v1.1.0                        40:a925b596c163<br>
&gt;&gt;       v1.0.4                        39:6bf84da2571e<br>
&gt;&gt;<br>
&gt;&gt; Therefore once I&#39;ve cloned with &quot;-r v1.1.0&quot;, I can&#39;t do an update<br>
&gt;&gt; specifying tag v1.1.0.<br>
&gt;&gt;<br>
&gt;&gt; Does this sound right, or am I way off here?<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m not sure if using a tag rather than the revision number is unorthodox or<br>
&gt;&gt; abnormal for bb&#39;s, so below&#39;s my use case, for a <a href="http://my-app_0.1.2.bb" target="_blank">my-app_0.1.2.bb</a><br>
&gt;&gt;<br>
&gt;&gt; require my-app.inc<br>
&gt;&gt; PR = &quot;${INC_PR}.0&quot;<br>
&gt;&gt; SRCREV = &quot;v${PV}&quot;<br>
&gt;&gt;<br>
&gt;&gt; Therefore to bring in a new version, I can simply copy this file to a<br>
&gt;&gt; <a href="http://my-app_1.1.0.bb" target="_blank">my-app_1.1.0.bb</a>, and adjust PR back to 0 if needed.<br>
&gt;&gt;<br>
&gt;&gt; We have a policy not to move version tags, so tag--&gt;revision should be 1:1. Is<br>
&gt;&gt; what I&#39;m seeing a non-issue simply because one shouldn&#39;t use tags in SRCREV?<br>
&gt;&gt;<br>
&gt;<br>
&gt; FWIW, the hg fetcher is a little unloved. We don&#39;t have many developers<br>
&gt; who use it or are familiar with how hg works. If there are some ways we<br>
&gt; can fix things I&#39;d be interested in patches.<br>
&gt;<br>
&gt; I&#39;m afraid I haven&#39;t had a chance to look at the details of the above<br>
&gt; yet though.<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Richard<br>
&gt;<br>
<br>
</div></div>Hi Richard,<br>
<br>
Thanks for pinging back on this. (Sorry I just double-sent this to<br>
you. Forgot to include the list! :P)<br>
<br>
I think a fairly simple solution might be to just clone the entire<br>
repo by not adding &quot;-r REV&quot; to options[] for an &#39;hg clone&#39; invocation.<br>
The &#39;hg update&#39; that follows on lines 142-147 should set the repo to<br>
the desired revision.</blockquote></div><br>This does sound like the best bet, to me.<br>-- <br>Christopher Larson<br>
</div>