[MERGE][bug #172649] 'bzr uncommit' avoids 'branch.revision_history()'
John Arbash Meinel
john at arbash-meinel.com
Thu May 29 23:57:35 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ian Clatworthy wrote:
| John Arbash Meinel wrote:
|> This patch updates 'bzr uncommit' to avoid ever accessing
|> 'Branch.revision_history()'. This saves a lot of time, and makes the
|> command
|> much more interactive.
|
| This is looking promising but isn't ready for merging yet.
| In particular, 'bzr selftest uncommit' has 9 failures and
| 'bzr selftest log' isn't pretty. :-)
|
Well selftest uncommit was trivial enough. I wasn't handling 'uncommit' back to
NULL_REVISION, but that's why I had added those tests a long time ago :).
The log was also pretty easy to fix. It was just referencing a variable I had
removed, and so I had to go back and change "len(which_revs)" to "branch_revno".
| bb: resubmit
|
| Another minor thing ...
|
|> - if verbose:
|> - print 'Removing revno %d: %s' % (len(rh)+1, rev_id)
|
| We can't take that logic out without violating what the docstring
| promises. I can't see that verbose gains anything here myself so
| I'd be ok with updating the docstring to say that the parameter is
| ignored. While you're there, could you add a param description for
| local please?
|
| Ian C.
I added the description, and I restored the "verbose" functionality. It *used*
to be necessary because uncommit might spend a lot of time actually removing
stuff from disk. Any more, all uncommit does is show the log and set a pointer.
So attached is the quick update which passes all 'bzr selftest log' and 'bzr
selftest uncommit'.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkg/NN8ACgkQJdeBCYSNAAM5JgCdHdDY9Ryw2zYh4W66K5+RmCHx
adsAniNXymwcGpi33hPBk9Sjpr7cAA/q
=ykFe
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uncommit_perf.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080529/26e84cea/attachment-0001.diff
More information about the bazaar
mailing list