2009/1/2 Aaron Bentley <span dir="ltr">&lt;<a href="mailto:aaron@aaronbentley.com">aaron@aaronbentley.com</a>&gt;</span><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">&gt; == some motivation/history/gripes ==<br>
&gt; At work we have a human gatekeeper who checks who changed what files<br>
&gt; before it gets deployed.<br>
&gt; So I have scripts that does the following tasks on each of the component<br>
&gt; branches (there are about 40 components and I use scmproj to manage them<br>
&gt; sanely. thanks Alexander):<br>
&gt; 1) tag the dev branches to PRE-QA<br>
&gt; 2) determine what is missing in qa up to dev:tag:PRE-QA (create change<br>
&gt; report for the human gatekeeper to see which files changed)<br>
&gt; 3) pull changes to up to dev:tag:PRE-QA<br>
&gt;<br>
&gt; My problem is with step 2), normally it runs right after step 1) so I<br>
&gt; can use normal `missing -v`.<br>
<br>
</div>If I wanted a report of files changed, I would use diff -r ancestor: </blockquote><div><br>this shows a diff, I wan&#39;t output exactly like  `missing -v`<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
or<br>
status -r ancestor:. &nbsp;</blockquote><div><br>I&#39;d like to see the revisions with the files they touched <br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Merge --preview would also work, and this allows you to specify a<br>
particular tag.</blockquote><div><br>&nbsp;again this shows a diff, I wan&#39;t output exactly like  `missing -v`<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">
&gt; But if I need to run it later changes added after tag:PRE-QA are also shown.<br>
&gt;<br>
&gt; I started to implement `bzr missing --theirs-only -v -r..tag:PRE-QA`,<br>
&gt; which I got working in the backend,<br>
&gt; but I got stuck on the user interface ..AARG!:<br>
&gt; Users could potentially want to filter on the local revisions AND the<br>
&gt; remote revisions.<br>
<br></div>I don&#39;t understand this.</blockquote><div><br>sometimes the user might wan&#39;t to filter the local changes,<br>and sometimes the remote changes and sometimes both. <br>it has to be very clear when he means what. <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
&gt; So we may want to have separate options eg:<br>
&gt; `bzr missing --revision=-2..-1 --remote-revision=..tag:PRE-QA`<br>
<br>
</div><br>I don&#39;t understand why you&#39;d have --revision=-2..-1 and<br>
- --remote-revision=..tag:PRE-QA.<br>
<br>
What does that mean? &nbsp;Show me all the revisions in the range<br>
..tag:PRE-QA that are not present in the range -2..-1? &nbsp;That would be<br>
nearly all revisions.</blockquote><div><br>no. it means only show local changes in the range -2..-1 and only show<br>remote changes in the range ..tag:PRE-QA<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
We might well want to allow revision options, and if we did, I would<br>
expect them to be of the form: [REMOTE REVISION]..[LOCAL REVISION].</blockquote><div><br>This could work, but it has the limitation that you can only specify the max<br>local and remote revisions. It will be sufficient for my needs.<br>
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
&gt; and<br>
&gt; `bzr missing -r-2..-1 -f=..tag:PRE-QA` &nbsp;(-f for a lack of a better short<br>
&gt; option)<br>
<br></div>Again, I don&#39;t understand what this implies.</blockquote><div><br>show only the last local change and only the remote changes until tag:PRE-QA<br><br>Maybe there is not a lot of use cases for specifying the minimum version, so we can maybe put that functionality in a obscure option. the the above could be:<br>
`bzr missing -r tag:PRE-QA..-1 --min-revision ..-2`<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
&gt; on IRC asabil suggested I use `bzr pull --dry-run -v -r tag:PRE-QA`<br>
&gt; which simplifies<br>
&gt; the user interface a little (but the backend is more complex, because<br>
&gt; you have to<br>
&gt; make sure you don&#39;t apply any changes).<br>
<br></div><div class="Ih2E3d"><br>
&gt; After implementing that I realise that `bzr pull -v` doesn&#39;t print the<br>
&gt; file names (which is sort of the point for me) ..AAARG!<br>
&gt; so much for 2008-31-12T10:00..2009-01-01T06:38<br>
&gt;<br>
&gt; going forward I must choose between the following:<br>
&gt; a) implement `bzr missing *-r*-2..-1 *-f*=..tag:PRE-QA`<br>
&gt; or<br>
&gt; b) implement &nbsp;`bzr pull -v *--show-files*` === `bzr pull -v *-f*`<br>
&gt;<br>
&gt; suggestions would be appreciated. I lean towards a) since I&#39;m 90% there..<br>
<br>
</div>I suggest c) add a revision spec that finds the common ancestor with a<br>
revisionspec, so that you can do<br>
<br>
diff -r revancestor:tag:PRE-QA or status -r revancestor:tag:PRE-QA</blockquote><div><br>Will this work if the tag is only present on the remote side?<br>As mentioned above, diff and status won&#39;t work for my use case.<br>
<br><br>I spent most of yesterday on implementing a), I think I should submit that as is as<br>rfc so we can continue the discussion there.<br><br></div></div><br>thank a lot for the feedback, its much appreciated!<br>-marius<br>