[MERGE] log multiple files and directories

Martin Pool mbp at sourcefrog.net
Wed Mar 25 09:14:33 GMT 2009


You might want a review from Vincent before taking this as definitive
but I thought I'd give you another pair of eyes.

I do think your three tier structure makes sense.

--- NEWS	2009-03-25 04:20:12 +0000
+++ NEWS	2009-03-25 05:33:40 +0000
@@ -22,6 +22,10 @@
 * New ``guess-renames`` command recognizes renames after they occur.
   (Aaron Bentley)

+* ``bzr log`` now supports filtering of multiple files and directories.
+  Directory filtering shows the changes to that directory object and
+  to any children of that directory.  (Ian Clatworthy, #97715)
+
 * ``bzr shelve`` can now apply changes without storing anything on the
   shelf, via the new --destroy option.  (Aaron Bentley)

It might be clearer as "bzr log can now take multiple files or
directories as arguments and will show changes that touch any of them"
if that's correct.

=== modified file 'bzrlib/builtins.py'
--- bzrlib/builtins.py	2009-03-24 12:15:01 +0000
+++ bzrlib/builtins.py	2009-03-25 07:16:47 +0000
@@ -2063,7 +2063,7 @@
       the revnocache plugin. This plugin buffers historical information
       trading disk space for faster speed.
     """
-    takes_args = ['location?']
+    takes_args = ['file*']
     _see_also = ['log-formats', 'revisionspec']
     takes_options = [
             Option('forward',

btw the argument name comes up in the usage, and it was meant to
convey that it could be a URL.  But I'm fine with the change.

+class LogRequest(object):
+    """Query parameters for logging a branch."""
+
+    def __init__(self,
+        direction='reverse',
+        specific_fileids=None,
+        start_revision=None,
+        end_revision=None,
+        limit=None,
+        message_search=None,
+        levels=1,
+        generate_tags=True,
+        delta_type=None,
+        diff_type=None,
+        _match_using_deltas=True,
+        ):
+        """Create a logging request.
+
+        Each of these parameter become a public attribute of the object.

(Just thinking aloud.)  Maybe this is just better passed as a dict?
It's not really a real object and it doesn't seem super likely to
become one in the future.  I know you're already improving it a lot
but having many assignments of parameters doesn't seem to help.  I
guess it does have the advantage the defaults are set in just one
place.  At any rate I would not block on it.

I've only skimmed the rest of the diff, and it looks basically good.
I can read it more closely tomorrow if that helps.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list