Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#10372 closed (fixed)

get_svn_revision() should be more robust

Reported by: rjaarts Owned by: mboersma
Component: Core (Other) Version: 1.0
Severity: Keywords: version Google App Engine GAE
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by mboersma)

When Django is used in the Google App Engine (GAE)environment there is a problem with the django get_svn_revision() function. This occurs only in when using the GAE SDK and when a checked out version of Django is used.
The get_svn_revision() function checks for existence of a ".svn/entries" file. This file will exist if Django was checked out, but GAE will prevent reading that file, which results in an raised error. Would be nice if this error could be catched, and perhaps a warning logged, and simple "unknown" would be returned.

Attachments (1)

10372.diff (735 bytes) - added by mboersma 5 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 5 years ago by Alex

  • milestone changed from 1.1 beta to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

This isn't a feature and thus isn't for the 1.1 beta.

comment:2 Changed 5 years ago by jacob

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 5 years ago by mboersma

  • Owner changed from nobody to mboersma
  • Status changed from new to assigned

comment:4 Changed 5 years ago by mboersma

  • Description modified (diff)
  • Has patch set
  • Summary changed from get_svn_version() should be more robust to get_svn_revision() should be more robust

Changed 5 years ago by mboersma

comment:5 Changed 5 years ago by Valera_Grishin

There is another problem with get_svn_version. Tortoise SVN client (don't known if others do so too) allows for changing default name of directory .svn to _svn. Using this feature will cause get_svn_version to always fail, since .svn is hardcoded.

comment:6 Changed 5 years ago by mtredinnick

This is a utility function that works for a normal subversion checkout. So if Tortoise SVN renames things to something non-standard, they just don't see the revision number. Same as people who aren't using subversion as their primary system for checking out the code (I never see the version number, for example). We shouldn't raise errors, but if the version number doesn't display, that's the way it goes. No harm done. If you must see the version number, don't rename the .svn directory and always use subversion to check out the code.

comment:7 Changed 5 years ago by jacob

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [10377]) Fixed #10372: made get_svn_revision() more robust. Thanks, mboersma.

comment:8 Changed 5 years ago by jacob

(In [10378]) [1.0.X] Fixed #10372: made get_svn_revision() more robust. Thanks, mboersma. Backport of r10377 from trunk.

comment:9 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.