Opened 16 years ago

Closed 16 years ago

#150 closed Defect (wontfix)

Better extraction of svn revision for version.sh script

Reported by: cluthi Owned by: titer
Priority: Normal Milestone: Sometime
Component: Transmission Version: Other
Severity: Normal Keywords:
Cc: titer@…

Description

Hello, I have written a patch for getting the svn revision number. This way is quicker and safer. Quicker because it extracts the revision number directly from the .svn/entries file without checking every file and safer because it does not miss any revision. For example revision 968 was missed because only help files were committed. The extraction is compatible with both old (pre 1.4) version of subversion that uses xml for the entries file and version 1.4+ which does not use xml.

Attachments (3)

revision.patch (1.3 KB) - added by cluthi 16 years ago.
Patch for version.sh file: better extraction of svn revision number
revision2.patch (1.3 KB) - added by cluthi 16 years ago.
Better version of the patch using perl oneliners instead of grep/sed/tr piped
revision3.patch (930 bytes) - added by cluthi81 16 years ago.
Even better version of the patch (parsing output of svn info)

Download all attachments as: .zip

Change History (5)

Changed 16 years ago by cluthi

Patch for version.sh file: better extraction of svn revision number

Changed 16 years ago by cluthi

Better version of the patch using perl oneliners instead of grep/sed/tr piped

Changed 16 years ago by cluthi81

Even better version of the patch (parsing output of svn info)

comment:1 Changed 16 years ago by cluthi81

  • Cc titer@… added

comment:2 Changed 16 years ago by titer

  • Cc titer@… added; titer@… removed
  • Resolution set to wontfix
  • Status changed from new to closed

You could also just use `svnversion' - the problem with that is that it relies on the .svn files. The current method was chosen because it also has to work with source tarballs. It's not perfect because you can miss a revision from time to time, but that's not a big price to pay IMO.

Note: See TracTickets for help on using tickets.