Re: svnlook pl --revprop does not work on transactions?

2010-03-01 Thread C. Michael Pilato
Olivier Dehon wrote:
 On Sat, 2010-02-27 at 08:43 -0600, Ryan Schmidt wrote:
 On Feb 27, 2010, at 08:36, Olivier Dehon wrote:
 On Fri, 2010-02-26 at 22:15 -0800, Alexey Neyman wrote:
 It seems that I encountered a bug in 'svnlook pl --revprop': it fails with 
 the following message:

 $ svnlook pl --revprop -t 10547-86b /svn/test-svn
 svnlook: Invalid revision number '-1'
 Looks like you need to use svnlook info -t to access the values of the
 properties that are going to be set on the revision-to-be (svn:log,
 svn:author, ...)
 Why can't he use svnlook pl --revprop -t as he suggested? svnlook help 
 pl suggests this should work.

 
 Agreed, it might be a missing feature. I was just trying to suggest a
 workaround for what the OP wanted to achieve.

This is not an oversight.  Subversion's public interfaces have always split
trees of changes in the repository into two non-overlapping segments:
revisions (which are sets of tree changes that have been promoted into new,
numbered, revisions by the commit process), and transactions (which are
sets of tree changes not yet promoted into revisions).  We believe that the
fact that those revisions are just promoted transactions (meaning, that
you can still address them by their transaction name) is a bit of an
implementation detail that needn't be revealed through the public interfaces
to Subversion.

-- 
C. Michael Pilato cmpil...@collab.net
CollabNet  www.collab.net  Distributed Development On Demand



signature.asc
Description: OpenPGP digital signature


Re: svnlook pl --revprop does not work on transactions?

2010-02-27 Thread Olivier Dehon
On Fri, 2010-02-26 at 22:15 -0800, Alexey Neyman wrote:
 Hi all,
 
 It seems that I encountered a bug in 'svnlook pl --revprop': it fails with 
 the following message:
 
 $ svnlook pl --revprop -t 10547-86b /svn/test-svn
 svnlook: Invalid revision number '-1'
 

Looks like you need to use svnlook info -t to access the values of the
properties that are going to be set on the revision-to-be (svn:log,
svn:author, ...)

-Olivier



Re: svnlook pl --revprop does not work on transactions?

2010-02-27 Thread Ryan Schmidt
On Feb 27, 2010, at 08:36, Olivier Dehon wrote:
 On Fri, 2010-02-26 at 22:15 -0800, Alexey Neyman wrote:
 It seems that I encountered a bug in 'svnlook pl --revprop': it fails with 
 the following message:
 
 $ svnlook pl --revprop -t 10547-86b /svn/test-svn
 svnlook: Invalid revision number '-1'
 
 Looks like you need to use svnlook info -t to access the values of the
 properties that are going to be set on the revision-to-be (svn:log,
 svn:author, ...)

Why can't he use svnlook pl --revprop -t as he suggested? svnlook help pl 
suggests this should work.


$ svnlook help pl
proplist (plist, pl): usage: 1. svnlook proplist REPOS_PATH PATH_IN_REPOS
 2. svnlook proplist --revprop REPOS_PATH

List the properties of a path in the repository, or
with the --revprop option, revision properties.
With -v, show the property values too.

Valid options:
  -r [--revision] ARG  : specify revision number ARG
  -t [--transaction] ARG   : specify transaction name ARG
  -v [--verbose]   : be verbose
  --revprop: operate on a revision property (use with -r or -t)
  --xml: output in XML






Re: svnlook pl --revprop does not work on transactions?

2010-02-27 Thread Alexey Neyman
Olivier,

Actually, I tried to check the presence of some custom properties (say, 
foo:bar and foo:baz), so svnlook info does not print them. These properties 
are essentially boolean (they're either present or not). So, I tried to check 
them all in one run. Instead, I am doing several svnlook pg --revprop -t 
TXN, which works.

Regards,
Alexey.

On Saturday 27 February 2010 06:36:44 am Olivier Dehon wrote:
 On Fri, 2010-02-26 at 22:15 -0800, Alexey Neyman wrote:
  Hi all,
 
  It seems that I encountered a bug in 'svnlook pl --revprop': it fails
  with the following message:
 
  $ svnlook pl --revprop -t 10547-86b /svn/test-svn
  svnlook: Invalid revision number '-1'
 
 Looks like you need to use svnlook info -t to access the values of the
 properties that are going to be set on the revision-to-be (svn:log,
 svn:author, ...)
 
 -Olivier
 


Re: svnlook pl --revprop does not work on transactions?

2010-02-27 Thread Alexey Neyman
On Saturday 27 February 2010 11:35:24 am Lieven Govaerts wrote:
  Note that it always uses svn_fs_revision_proplist(), even when '-t TXN'
  is passed. In this case, c-rev_id == SVN_INVALID_REVNUM (-1), and
  svn_fs_revision_proplist() rightfully fails.
 
  Shouldn't it be using svn_fs_txn_proplist() instead, just as
  get_property() chooses between svn_fs_txn_prop() and
  svn_fs_revision_prop()?
 
 Think so. Do you want to submit a patch to fix this issue?

Sure, attached.

Alexey.
Index: subversion/svnlook/main.c
===
--- subversion/svnlook/main.c	(revision 917057)
+++ subversion/svnlook/main.c	(working copy)
@@ -1687,7 +1687,14 @@
 }
   else
 {
-  SVN_ERR(svn_fs_revision_proplist(props, c-fs, c-rev_id, pool));
+  if (! c-is_revision)
+	{
+	  SVN_ERR(svn_fs_txn_proplist(props, c-txn, pool));
+	}
+  else
+	{
+	  SVN_ERR(svn_fs_revision_proplist(props, c-fs, c-rev_id, pool));
+	}
   revprop = TRUE;
 }
 


svnlook pl --revprop does not work on transactions?

2010-02-26 Thread Alexey Neyman
Hi all,

It seems that I encountered a bug in 'svnlook pl --revprop': it fails with 
the following message:

$ svnlook pl --revprop -t 10547-86b /svn/test-svn
svnlook: Invalid revision number '-1'

Observed with Subversion 1.6.6. Looks like offending code is this block in 
do_plist():

==
  if (path != NULL)
...
  else
{
  SVN_ERR(svn_fs_revision_proplist(props, c-fs, c-rev_id, pool));
  revprop = TRUE;
}
==

Note that it always uses svn_fs_revision_proplist(), even when '-t TXN' is 
passed. In this case, c-rev_id == SVN_INVALID_REVNUM (-1), and 
svn_fs_revision_proplist() rightfully fails.

Shouldn't it be using svn_fs_txn_proplist() instead, just as 
get_property() chooses between svn_fs_txn_prop() and 
svn_fs_revision_prop()?

This conditional is still in /trunk, so most likely, bug is also 
reproducible with top-of-trunk Subversion.

Regards,
Alexey.


svnlook pl --revprop does not work on transactions?

2010-02-26 Thread Alexey Neyman
Hi all,

It seems that I encountered a bug in 'svnlook pl --revprop': it fails with 
the following message:

$ svnlook pl --revprop -t 10547-86b /svn/test-svn
svnlook: Invalid revision number '-1'

Observed with Subversion 1.6.6. Looks like offending code is this block in 
do_plist():

==
  if (path != NULL)
...
  else
{
  SVN_ERR(svn_fs_revision_proplist(props, c-fs, c-rev_id, pool));
  revprop = TRUE;
}
==

Note that it always uses svn_fs_revision_proplist(), even when '-t TXN' is 
passed. In this case, c-rev_id == SVN_INVALID_REVNUM (-1), and 
svn_fs_revision_proplist() rightfully fails.

Shouldn't it be using svn_fs_txn_proplist() instead, just as 
get_property() chooses between svn_fs_txn_prop() and 
svn_fs_revision_prop()?

This conditional is still in /trunk, so most likely, bug is also 
reproducible with top-of-trunk Subversion.

Regards,
Alexey.


signature.asc
Description: This is a digitally signed message part.