[MERGE] Give commit a progress bar
Martin Pool
mbp at sourcefrog.net
Fri Apr 21 09:01:18 BST 2006
On 21 Apr 2006, Robert Collins <robertc at robertcollins.net> wrote:
> > > self.work_tree.lock_write()
> > > + self.pb = bzrlib.ui.ui_factory.nested_progress_bar()
> > > try:
> > > + # Cannot commit with conflicts present.
> > > + if len(self.work_tree.conflicts())>0:
> > > + raise ConflictsInTree
> > > +
> > > # setup the bound branch variables as needed.
> > > self._check_bound_branch()
> >
> > I'm curious - why did you move the conflict detection from below?
>
> Bug #5798: 'conflicts in tree' check happens after commit message
> editor.
>
> If you type in a careful email, and then get a conflict warning, it can
> piss one off. I was in the area.. shrug.
Oh, great. It would be good to add a comment to make sure no one breaks
it in future. Better yet a test... (as a wise man said :-) but that may
need this refactored to avoid running the real editor or something.
> Well, its likely that it will grow further, and we have multiple places
> this will be needed eventually - for instance in doCleanups [or similar]
> in TestCase.tearDown(), in the multiple-unlock actions of InterFOO
> classes, etc. Seems to me we should figure out the right idiom in once
> place and once that is done move it to a class representing cleanups
> somewhere.
OK, fair enough. We could perhaps make it more like the behaviour of
try/finally but will anyone care? (Actually it could be useful to make
it log the prior exceptions, like exceptions from __del__)
> > I (still) dislike these docstrings; they use up memory and hide the real
> > docstring without adding anything useful. (I know we talked about it
> > before, no action is required for this commit.) I would prefer if they
> > could just be comments.
>
> Do we have a bug open on the solution we came up with? Or a spec? Either
> of those would be good - as a QA aspect of the code base its something I
> might get around to post dapper :)
OK
https://launchpad.net/products/bzr/+spec/declare-protocol-implementation
--
Martin
More information about the bazaar
mailing list