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