[Pkg-bazaar-commits] ./bzr/unstable r914: - fix up breakage of 'bzr log -v' by root_id patch
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:21:26 UTC 2009
------------------------------------------------------------
revno: 914
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Tue 2005-07-12 11:30:55 +1000
message:
- fix up breakage of 'bzr log -v' by root_id patch
modified:
TODO
bzrlib/commands.py
bzrlib/log.py
-------------- next part --------------
=== modified file 'TODO'
--- a/TODO 2005-07-11 06:52:36 +0000
+++ b/TODO 2005-07-12 01:30:55 +0000
@@ -28,6 +28,10 @@
* Add of a file that was present in the base revision should put back
the previous file-id.
+* Not sure I'm happy with needing to pass a root id to EmptyTree;
+ comparing anything against an EmptyTree with no root should have the
+ same effect(?)
+
* Handle diff of files which do not have a trailing newline; probably
requires patching difflib to get it exactly right, or otherwise
calling out to GNU diff.
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-07-11 22:21:16 +0000
+++ b/bzrlib/commands.py 2005-07-12 01:30:55 +0000
@@ -51,8 +51,11 @@
assert cmd.startswith("cmd_")
return cmd[4:].replace('_','-')
+
def _parse_revision_str(revstr):
- """This handles a revision string -> revno.
+ """This handles a revision string -> revno.
+
+ This always returns a list. The list will have one element for
It supports integers directly, but everything else it
defers for passing to Branch.get_revision_info()
@@ -329,9 +332,11 @@
directory is shown. Otherwise, only the status of the specified
files or directories is reported. If a directory is given, status
is reported for everything inside that directory.
+
+ If a revision is specified, the changes since that revision are shown.
"""
takes_args = ['file*']
- takes_options = ['all', 'show-ids']
+ takes_options = ['all', 'show-ids', 'revision']
aliases = ['st', 'stat']
def run(self, all=False, show_ids=False, file_list=None):
@@ -344,9 +349,10 @@
file_list = None
else:
b = find_branch('.')
- import status
- status.show_status(b, show_unchanged=all, show_ids=show_ids,
- specific_files=file_list)
+
+ from bzrlib.status import show_status
+ show_status(b, show_unchanged=all, show_ids=show_ids,
+ specific_files=file_list)
class cmd_cat_revision(Command):
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py 2005-07-11 07:33:45 +0000
+++ b/bzrlib/log.py 2005-07-12 01:30:55 +0000
@@ -192,7 +192,7 @@
if last_revno:
if last_revno == 1:
- this_tree = EmptyTree()
+ this_tree = EmptyTree(branch.get_root_id())
else:
this_revno = last_revno - 1
this_revision_id = branch.revision_history()[this_revno]
More information about the Pkg-bazaar-commits
mailing list