[MERGE] Make dpush help/error a bit more generic

Jelmer Vernooij jelmer at samba.org
Mon May 18 01:43:17 BST 2009


On Sun, May 17, 2009 at 07:25:24PM -0500, John Arbash Meinel wrote:
> Martin Pool wrote:
> > 2009/5/17 Jelmer Vernooij <jelmer at samba.org>:
> >> On Sun, May 17, 2009 at 11:36:29AM +0200, Martin Pool wrote:
> >>> 2009/5/16 Jelmer Vernooij <jelmer at vernstok.nl>:
> >>>> dpush' help and errors currently suggest that dpush is useful when
> >>>> pushing into foreign branches, while in fact it's only useful to push
> >>>> between branches in different vcs'es. bzr-git now supports pushing
> >>>> from local into remote git branches and, since there is no conversion
> >>>> necessary there, the current dpush descriptions are a bit confusing.
> >>>> The attached patch fixes the dpush help/error.
> >>> BB: tweak
> >>> Would "not necessary" be more better than "not possible"?
> >>> Could I persuade you to think about changing the command to push --lossy?
> >> I'm slowly getting used to the idea. We need to figure out what to do
> >> with the --no-rebase option that exists for dpush in that case. What
> >> about?

> >> bzr push --lossy                        (now: bzr dpush --no-rebase)
> >> bzr push --lossy --rebase       (now: bzr dpush)

> > I think that's reasonable; I'd probably also be ok with it defaulting
> > to --rebase but that seems more dangerous.  Either way, it's different
> > from the postconditions that normally hold for push, but I think
> > people will still see the conceptual operation as being the same.


> So internally it will be a little tricky to support, since if --lossy is
>  given (or possibly rebase) then we need to lock_write else lock_read,
> but it certainly isn't insurmountable.

> Personally, it feels like 'bzr push --lossy --no-rebase' is a yagni. If
> people want 'push --lossy' they almost definitely want to rebase,
> otherwise they can't continue working on their feature. (So if they
> don't want --rebase, it is only because they don't want to waste the
> time, since they are deleting the branch anyway.)

> That said, Jelmer might have a real use case for --no-rebase. I'm
> tempted to just introduce 'push --lossy' and not worry about it.
One of the things I've been doing is keep a git mirror of my bitlbee
bzr branch around.

I can keep this git repo up to date simply by running 
"bzr dpush --no-rebase git+ssh://git.samba.org/data/git/jelmer/bitlbee.git" and without needing to do any rebasing (which would destroy e.g. --fixes properties and rename tracking).

Obviously this only works for git because of its nature (the sha of a
dpushed revision is always the same for that particular revision).

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer at samba.org> - http://jelmer.vernstok.nl/



More information about the bazaar mailing list