[Pkg-bazaar-commits] ./bzr/unstable r545: - --forward option for log
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:19:10 UTC 2009
------------------------------------------------------------
revno: 545
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Thu 2005-05-19 21:11:53 +1000
message:
- --forward option for log
modified:
NEWS
bzrlib/commands.py
testbzr
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2005-05-17 08:40:22 +0000
+++ b/NEWS 2005-05-19 11:11:53 +0000
@@ -11,7 +11,8 @@
shows all versioned files and unknown files but not ignored files.
* ``bzr log`` runs from most-recent to least-recent, the reverse
- of the previous order.
+ of the previous order. The previous behaviour can be obtained
+ with the ``--forward`` option.
ENHANCEMENTS:
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-05-19 06:37:21 +0000
+++ b/bzrlib/commands.py 2005-05-19 11:11:53 +0000
@@ -585,13 +585,18 @@
"""Show log of this branch.
TODO: Option to limit range.
+ """
- TODO: Option to show in forward order.
- """
takes_args = ['filename?']
- takes_options = ['timezone', 'verbose', 'show-ids']
- def run(self, filename=None, timezone='original', verbose=False, show_ids=False):
+ takes_options = ['forward', 'timezone', 'verbose', 'show-ids']
+
+ def run(self, filename=None, timezone='original',
+ verbose=False,
+ show_ids=False,
+ forward=False):
from bzrlib import show_log, find_branch
+
+ direction = (forward and 'forward') or 'reverse'
if filename:
b = find_branch(filename, lock_mode='r')
@@ -608,7 +613,8 @@
show_timezone=timezone,
verbose=verbose,
show_ids=show_ids,
- to_file=sys.stdout)
+ to_file=sys.stdout,
+ direction=direction)
@@ -959,6 +965,7 @@
'all': None,
'help': None,
'file': unicode,
+ 'forward': None,
'message': unicode,
'profile': None,
'revision': int,
=== modified file 'testbzr'
--- a/testbzr 2005-05-19 07:14:26 +0000
+++ b/testbzr 2005-05-19 11:11:53 +0000
@@ -337,6 +337,9 @@
runcmd('bzr commit -m add-spaces')
runcmd('bzr check')
+ runcmd('bzr log')
+ runcmd('bzr log --forward')
+
runcmd('bzr info')
More information about the Pkg-bazaar-commits
mailing list