[ANN][RFC] plugin package: ezbzr

Jan Hudec bulb at ucw.cz
Fri Jan 20 12:56:23 GMT 2006


On Fri, Jan 20, 2006 at 19:36:31 +1100, Martin Pool wrote:
> On 20 Jan 2006, Jan Hudec <bulb at ucw.cz> wrote:
> > On Thu, Jan 19, 2006 at 08:19:27 -0500, Nathaniel McCallum wrote:
> > > Its not scary, its just basically a shortcut for:
> > > $ TEMP=`mktemp`
> > > $ cd $TEMP
> > > $ branch --basis=mybranch sftp://foo//bar
> > > $ cd bar
> > > $ bzr merge mybranch
> > > $ bzr commit "Merged into mainline"
> > 
> > This *IS* damn *MUCH* scary.
> > 
> > > $ bzr push
> > > $ cd $orig_dir
> > > $ rm -rf $TEMP
> > > 
> > > If conflicts occur, the temp directory is left alone and instructions on
> > > how to proceed are printed on the screen.
> > 
> > Semantic conflicts may occur without syntactic ones ever appearing.
> > Especially since the push is likely to be to a public place, it is
> > absolutely necessary to run syntax check, unit test (if available) and
> > that human actually *reads* the diff before it is commited.
> > 
> > Yes, I have already seen such merge that did not declare a conflict, but
> > the result did not compile at all.
> 
> Yes, testing and reviewing the diff after merging is pretty important.
> But I think the basic idea is nice; it's basically what I do when
> merging new work into bzr.dev.
> 
> So if we can make bzr somehow get that test/review phase it'd be good.
> 
> Running a configurable 'make check' after merging would be a good start.
> (Indeed relying on the selftest might encourage people to make it
> solid.)
> 
> I'd also like something that previews a merge - basically jsut the same
> recipe but running bzr diff at the end instead of commit/push.

Well, if the commit includes running an editor, it is possible to
display the diff there -- I was always doing that with Arch, have done
it with Mercurial and could do it as well with Bzr. From the top of my
head the command would be something like ($1 is the temporary filename):

vim "+r !bzr diff" "+set ft=diff buftype=help nomodifiable nomodified" \
	"+vsplit $1"

(wrap in a shell-script and set as BZREDITOR - the weird 'buftype=help'
setting has the effect that if you :x the log buffer, vim will exit)

And if it then refuses to commit with empty message, you can abort
easily.

The other think is, that I would really like the merge with reversed
parent. Then I'd use normal 3 commands - merge --to, commit, push.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060120/2f93367e/attachment.pgp 


More information about the bazaar mailing list