[MERGE] Add support for `bzr pull --dry-run`
Marius Kruger
amanic at gmail.com
Thu Jan 1 04:43:04 GMT 2009
hi,
This patch adds support for `bzr pull --dry-run`, which prints out the same
as `bzr pull`
without actually pulling the changes.
I added all the tests I could think of with my tired brain, let me know it I
need more.
== 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`.
But if I need to run it later changes added after tag:PRE-QA are also shown.
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.
So we may want to have separate options eg:
`bzr missing --revision=-2..-1 --remote-revision=..tag:PRE-QA`
and
`bzr missing -r-2..-1 -f=..tag:PRE-QA` (-f for a lack of a better short
option)
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..
== ==
--
<| regards
U| Marius
H| <><
Z| my first patch using http://colemak.com/ !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090101/c35d3ce5/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20090101063206-bzr.pull_dry-run.patch
Type: text/x-diff
Size: 25304 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090101/c35d3ce5/attachment-0001.bin
More information about the bazaar
mailing list