Ticket #3905 (closed defect: fixed)

Opened 14 months ago

Last modified 13 months ago

twisted.python.versions support for SVN 1.6.1 and above

Reported by: termim Owned by: exarkun
Priority: normal Milestone:
Component: core Keywords: easy
Cc: termim, thijs, mwh Branch: branches/svn-wc-version-3905
Author: exarkun Launchpad Bug:

Description

In Subversion 1.6.1 they removed deprecated .svn/format file. The workspace format version remains the same v10. This broke twisted.python.versions. Attached patch fixes that (relative Twisted-8.2.0).

Attachments

versions.py.patch Download (1.3 KB) - added by termim 14 months ago.
fix versions.py for SVN >= 1.6.1 relative to trunk rev.27108

Change History

Changed 14 months ago by glyph

  • owner changed from glyph to termim

Thanks for your contribution! Please see TwistedDevelopment for some guidelines on getting this patch integrated more quickly. A few notes:

  1. Please contribute patches from a recent version of trunk, not the latest release. Also, please base your patches from the root of the tree rather than someplace inside it; it makes it easier to review patches if they are uniform.
  2. Please include some unit tests. We would generally prefer it if patches are developed in a test-driven way, since this makes it easier to achieve full code coverage. (In other words: if it's not test-driven, we can usually tell, because there are code-paths which the tests don't catch.)

Thanks again! Looking forward to an updated patch.

Changed 14 months ago by termim

fix versions.py for SVN >= 1.6.1 relative to trunk rev.27108

Changed 14 months ago by termim

Ok. Patch updated relative to the current trunk. I'm not sure regarding the unit tests. Currently this functionality (versions) has no unit tests at all.

Changed 14 months ago by thijs

  • owner termim deleted
  • cc thijs added
  • keywords easy, review added; easy removed
  • branch_author set to termim

I remember a patch from feisley for svn 1.5 that also didn't come with unit tests but was applied to the trunk so putting this one up for review.

Changed 14 months ago by exarkun

  • owner set to exarkun
  • keywords easy added; easy, review removed

Things were worse in the past than we would like them to be in the future. :) Even if a past change to this code was untested, that doesn't mean future changes may be untested. This must have unit tests. Also, #3511 did include unit tests (although it also speculatively fixed the code for SVN 1.6 as well, prior to the release of SVN 1.6, which turned out to be a failure, it seems).

Changed 14 months ago by exarkun

  • branch set to branches/svn-wc-version-3905
  • branch_author changed from termim to termim, exarkun

(In [27132]) Branching to 'svn-wc-version-3905'

Changed 14 months ago by exarkun

  • owner exarkun deleted
  • keywords review added

Gave something a whack in the branch. As time goes on, I'm less enamored of this functionality. The idea was that this would help us interpret bug reports. In practice, I haven't seen that happen.

Changed 14 months ago by exarkun

  • branch_author changed from termim, exarkun to exarkun

Changed 13 months ago by mwh

  • keywords review removed
  • cc mwh added
  • owner set to exarkun

Assuming this branch actually fixes the problem (something I'm not in a position to test) I think this looks fine. Please land, if you can test it.

I also agree that this looks like a treadmill it would be good to get off, but that's a matter for another branch.

Changed 13 months ago by exarkun

I tried it out on Karmic which has svn 1.6.1. And buildbot is happy.

Changed 13 months ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [27184]) Merge svn-wc-version-3905

Author: termim, exarkun Reviewer: mwhudson Fixes: #3905

Update twisted.python.versions so that it can actually parse svn 1.6.1's entries files.

Changed 13 months ago by feisley

Just a thought for the future, if this functionality is going to be kept in Twisted, it might be worth considering using utilities to get this rather than inspecting the format file itself.

For example: "svn info --xml" will give you the revision in XML format that is trivial to parse.

I think it is safe to assume if we are inspecting the information from a working copy that the cli tools are available to us, and if they are not, we simply do the same thing we do if the format file is not of appropriate version.

Note: See TracTickets for help on using tickets.