[MERGE][#172612] bzr commit: don't print the revision number twice

Alexander Belchenko bialix at ukr.net
Sat Dec 1 03:02:05 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt Nordhoff пишет:
> Alexander Belchenko wrote:
>> Matt Nordhoff пишет:
>>> Alexander Belchenko wrote:
>>>> Matt Nordhoff пишет:
>>>>> Alexander Belchenko wrote:
>>> In the case where no location is passed, there would be an extra space
>>> at the end of the message. The location is never not passed, and nobody
>>> would see the space (and my shell seems to remove it entirely), but that
>>> would still bother me.
>> IIUC, location *should* be passed all the time.
>> Otherwise why for you deprecate old behavior?
> 
> location is and always has been passed all the time, at least from
> bzrlib. But deprecating means it should still work. I guess you have a
> point that an extra space is even less important when it's only from
> deprecated behaviour that never happens anyway.

Bug #172612 is about noise in output. IMO we should go further and fix
another noise factor, i.e. when no location specified. In this case
your patch will produce line with single word:

Committing

and that's all. IMO it's a bit strange and incomplete.
There was revno in this line
if no location specified, but now it's just floating alone.
We could remove it in this case completely. I.e.:

     def started(self, revno, rev_id, location=None):
         if location is not None:
- -            location = ' to "' + unescape_for_display(location, 'utf-8') + '"'
+            self._note('Committing to: %s', unescape_for_display(location, 'utf-8'))
         else:
+            # When started was added, location was only made optional by
+            # accident.  Matt Nordhoff 20071129
+            symbol_versioning.warn("As of bzr 0.93 you must pass a location "
+                                   "to started.", DeprecationWarning,
+                                   stacklevel=2)
- -             location = ''
- -        self._note('Committing revision %d%s.', revno, location)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHUM6tzYr338mxwCURAhOqAKCP4x2nLWXgLQ3g5PlrhYOmeiBvNACfQvC3
FOpb0Hnp9Hbu/OR83T68X7o=
=Cpjo
-----END PGP SIGNATURE-----



More information about the bazaar mailing list