[Pkg-bazaar-commits] ./bzr/unstable r468: - Interpret arguments to bzr status
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:19:02 UTC 2009
------------------------------------------------------------
revno: 468
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Wed 2005-05-11 16:05:28 +1000
message:
- Interpret arguments to bzr status
- Handle giving a non-default branch to bzr status
- bzr status docs
modified:
NEWS
bzrlib/commands.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2005-05-11 05:55:27 +0000
+++ b/NEWS 2005-05-11 06:05:28 +0000
@@ -36,7 +36,8 @@
* New option ``bzr commit --file`` to take a message from a file,
suggested by LarstiQ.
- * New syntax ``bzr status [FILE...]`` contributed by Bartosz Oler.
+ * New syntax ``bzr status [FILE...]`` contributed by Bartosz
+ Oler. File may be in a branch other than the working directory.
* ``bzr log`` and ``bzr root`` can be given an http URL instead of
a filename.
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-05-11 06:00:57 +0000
+++ b/bzrlib/commands.py 2005-05-11 06:05:28 +0000
@@ -216,13 +216,26 @@
To see ignored files use 'bzr ignored'. For details in the
changes to file texts, use 'bzr diff'.
+
+ If no arguments are specified, the status of the entire working
+ 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.
"""
takes_args = ['file*']
takes_options = ['all', 'show-ids']
aliases = ['st', 'stat']
def run(self, all=False, show_ids=False, file_list=None):
- b = Branch('.', lock_mode='r')
+ if file_list:
+ b = Branch(file_list[0], lock_mode='r')
+ file_list = [b.relpath(x) for x in file_list]
+ # special case: only one path was given and it's the root
+ # of the branch
+ if file_list == ['']:
+ file_list = None
+ else:
+ b = Branch('.', lock_mode='r')
import status
status.show_status(b, show_unchanged=all, show_ids=show_ids,
file_list=file_list)
More information about the Pkg-bazaar-commits
mailing list