[PATCH] Re: How to explore a remote branch?

Matthieu Moy Matthieu.Moy at imag.fr
Thu Mar 23 18:22:09 GMT 2006


Aaron Bentley <aaron.bentley at utoronto.ca> writes:

> Matthieu Moy wrote:
>> Just waking up the thread, since my patch seems to have been
>> forgotten :
>
> I think LOCATION is better than PATH, because paths are locations, but
> other kinds of locations can also be used.

Here it is:


=== modified file 'a/bzrlib/builtins.py'
--- a/bzrlib/builtins.py        
+++ b/bzrlib/builtins.py        
@@ -1063,16 +1063,23 @@


 class cmd_log(Command):
-    """Show log of this branch.
+    """Show log of a branch.

     To request a range of logs, you can use the command -r begin..end
     -r revision requests a specific revision, -r ..end or -r begin.. are
     also valid.
+
+    LOCATION can either be a filename or a branch location. If it is a
+    filename, only logs for revisions which modified that file will be
+    printed. The filename can also be remote, e.g.
+    bzr log sftp://host.com/path/to/branch/path/to/file
+    will list all revisions that changed the bzr file in the specified
+    branch.
     """

     # TODO: Make --revision support uuid: and hash: [future tag:] notation.

-    takes_args = ['filename?']
+    takes_args = ['location?']
     takes_options = [Option('forward',
                             help='show from oldest to newest'),
                      'timezone', 'verbose',
@@ -1085,7 +1092,7 @@
                      'short',
                      ]
     @display_command
-    def run(self, filename=None, timezone='original',
+    def run(self, location=None, timezone='original',
             verbose=False,
             show_ids=False,
             forward=False,
@@ -1103,10 +1110,10 @@

         # log everything
         file_id = None
-        if filename:
+        if location:
             # find the file id to log:

-            dir, fp = bzrdir.BzrDir.open_containing(filename)
+            dir, fp = bzrdir.BzrDir.open_containing(location)
             b = dir.open_branch()
             if fp != '':
                 try:





More information about the bazaar mailing list