You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> on 2005/10/23 09:17:25 UTC

[PATCH] Add two small subcommands to svnlook.rb.

Hi,

I added implementation of two subcommands, 'uuid' and 'youngest',
to svnlook.rb.
This patch is a very very easy stuff. :-)
Please check it.

Regards,

-nori


Log:
[[[
Add two subcommands to tools/examples/svnlook.rb.

* tools/examples/svnlook.rb
  (SvnLook#cmd_uuid,
   SvnLook#cmd_youngest): New methods for two subcommands.
  (usage): Add description for two subcommands added.
]]]


Index: tools/examples/svnlook.rb
===================================================================
--- tools/examples/svnlook.rb	(revision 16925)
+++ tools/examples/svnlook.rb	(working copy)
@@ -143,6 +143,16 @@
     print_tree(Editor, 0)
   end
 
+  # Output the repository's UUID.
+  def cmd_uuid
+    puts @fs.uuid
+  end
+
+  # Output the repository's youngest revision.
+  def cmd_youngest
+    puts @fs.youngest_rev
+  end
+
   # Return a property of the specified revision or transaction.
   # Name: the ID of the property you want to retrieve. 
   #       E.g. Svn::Core::PROP_REVISION_LOG
@@ -502,6 +512,8 @@
     "   info:          print the author, data, log_size, and log message.",
     "   log:           print log message.",
     "   tree:          print the tree.",
+    "   uuid:          print the repository's UUID.",
+    "   youngest:      print the youngest revision number.",
   ]
   puts(messages.join("\n"))
   exit(1)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Add two small subcommands to svnlook.rb.

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

In <20...@dolphin.c.u-tokyo.ac.jp>
  "Re: [PATCH] Add two small subcommands to svnlook.rb." on Mon, 24 Oct 2005 00:54:00 +0900 (JST),
  Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> wrote:

> > > I added implementation of two subcommands, 'uuid' and 'youngest',
> > > to svnlook.rb.
> > > This patch is a very very easy stuff. :-)
> > > Please check it.
> > 
> > The codes are no problem. But I have a request. Could you
> > add comments that the two subcommands ignore REV and TXN
> > argument?
> 
> Thank you for reviewing my code, kou.
> Yeah, it should have comments as you suggest.
> I fixed the patch.

OK. Could you commit the patch, nori?


Thanks,
--
kou

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Add two small subcommands to svnlook.rb.

Posted by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp>.
Hi,

> > I added implementation of two subcommands, 'uuid' and 'youngest',
> > to svnlook.rb.
> > This patch is a very very easy stuff. :-)
> > Please check it.
> 
> The codes are no problem. But I have a request. Could you
> add comments that the two subcommands ignore REV and TXN
> argument?

Thank you for reviewing my code, kou.
Yeah, it should have comments as you suggest.
I fixed the patch.

Regards,

-nori


Log:
[[[
Add two subcommands to tools/examples/svnlook.rb.

* tools/examples/svnlook.rb
  (SvnLook#cmd_uuid,
   SvnLook#cmd_youngest): New methods for two subcommands.
  (usage): Add description for the two subcommands and also a note that
  those subcommands ignore revision/transaction specified.
]]]


Index: tools/examples/svnlook.rb
===================================================================
--- tools/examples/svnlook.rb	(revision 16943)
+++ tools/examples/svnlook.rb	(working copy)
@@ -143,6 +143,16 @@
     print_tree(Editor, 0)
   end
 
+  # Output the repository's UUID.
+  def cmd_uuid
+    puts @fs.uuid
+  end
+
+  # Output the repository's youngest revision.
+  def cmd_youngest
+    puts @fs.youngest_rev
+  end
+
   # Return a property of the specified revision or transaction.
   # Name: the ID of the property you want to retrieve. 
   #       E.g. Svn::Core::PROP_REVISION_LOG
@@ -462,6 +472,10 @@
     "   info:          print the author, data, log_size, and log message.",
     "   log:           print log message.",
     "   tree:          print the tree.",
+    "   uuid:          print the repository's UUID.",
+    "   youngest:      print the youngest revision number.",
+    "",
+    "For `uuid' and `youngest', REV and TXN are ignored.",
   ]
   puts(messages.join("\n"))
   exit(1)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Add two small subcommands to svnlook.rb.

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

In <20...@dolphin.c.u-tokyo.ac.jp>
  "[PATCH] Add two small subcommands to svnlook.rb." on Sun, 23 Oct 2005 18:17:25 +0900 (JST),
  Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> wrote:

> I added implementation of two subcommands, 'uuid' and 'youngest',
> to svnlook.rb.
> This patch is a very very easy stuff. :-)
> Please check it.

The codes are no problem. But I have a request. Could you
add comments that the two subcommands ignore REV and TXN
argument?


Thanks,
--
kou

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org