[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH]Issue #2219 - svn:keywords canonicalization

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2005-03-02 05:55:49 CET

On Wed, 2005-03-02 at 09:22, Madan U Sreenivasan wrote:
> On Tue, 2005-03-01 at 21:31, John Peacock wrote:
> > Max Bowsher wrote:
> [...]
> > >
> > > I think we should canonicalize towards:
> > >
> > > HeadURL
> > > Author
> > > Revision
> > > Date
> > > Id
> >
> > I have no real problem with this, as long as the documentation is
> > changed to reflect it (and it more closely reflect the CVS usage, so
> > there is less suprise).
> [...]
> If a guy does a ps of "auTHoR", he must be new ( or is doing
> destructive testing ;-) ).... so, for a new guy, if he does a ps of
> "auTHoR" and on a pg, gets "LastChangedBy", it would be very confusing.
> I feel that if a user does a ps of "auTHoR",then on doing a pg, he
> should get "Author". That is, the proper capitalized version of whatever
> form on the keyword/alias he has specified.
> [...]
Hi,

Find attached the testcase for the above proposed. Pl. comment.

Regards,
Madan.

#----------------------------------------------------------------------
# Testing for canonicalized input to svn:keywords
# Propset a case-different keyword and check if
# expansion works
def canonicalize_keywords_prop(sbox):
  "test canonocalization of the svn:keywords input"

  sbox.build()
  wc_dir = sbox.wc_dir

  # The bug didn't occur if there were multiple files in the
  # directory, so setup an empty directory.
  iota_path = os.path.join(wc_dir, 'iota')
  
  # lastchangedrevision
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "lastchangedrevision",
                                     iota_path)

  expected_output = ["LastChangedRevision\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # revision
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "revision",
                                     iota_path)

  expected_output = ["Revision\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # rev
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "rev",
                                     iota_path)

  expected_output = ["Rev\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # lastchangedby
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "lastchangedby",
                                     iota_path)

  expected_output = ["LastChangedBy\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # author
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "author",
                                     iota_path)

  expected_output = ["Author\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # headurl
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "headurl",
                                     iota_path)

  expected_output = ["HeadURL\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # url
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "url",
                                     iota_path)

  expected_output = ["URL\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # lastchangeddate
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "lastchangeddate",
                                     iota_path)

  expected_output = ["LastChangedDate\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # date
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "date",
                                     iota_path)

  expected_output = ["Date\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)
  # id
  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
                                     "svn:keywords",
                                     "id",
                                     iota_path)

  expected_output = ["Id\n"]
  svntest.actions.run_and_verify_svn(None, expected_output, [], 'propget',
                                     "svn:keywords",
                                     iota_path)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 2 05:49:45 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.