Skip to contentSkip to conversation

SVN/trac requests

lm-sensors Jean Delvare 3 participants 13 messages Sep 26, 2006 – Sep 27, 2006

lore
Share & tools
lore
#0 lore raw

Hi Axel,

I have the two following requests with regards to lm-sensors' SVN/trac:

1* Can the "V-2-3-1" tag be renamed to "V2-3-1"?

2* We often need to ask people to try the latest version of sensors-detect. For now we point them to:
http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/detect/sensors-detect?format=txt

The problem is that this version of the SVN file doesn't have its keywords substituted, so the version string reads:
'$Revision$ ($Date$)'
This might become a problem in the long run when users report with this version string, as we will be unable to tell what version of the file they have. So, is it possible to ask trac to provide the file with keywords substituted? I'm surprised this isn't the default...

Thanks,

Signature · 1 line
Jean Delvare
#1 lore raw

Hi,

Quoted 3 lines · Jean Delvare

I have the two following requests with regards to lm-sensors' SVN/trac:

1* Can the "V-2-3-1" tag be renamed to "V2-3-1"?

Yes, the contents of "tags" is (for svn) just another folder, so just as you rename conventional files/folders under svn you ranme this one, too, e.g. "svn mv V-2-3-1 V2-3-1; svn ci ." in the tags folder should be enough.

Quoted 11 lines

2* We often need to ask people to try the latest version of sensors-detect. For now we point them to:
http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/detect/sensors-detect?format=txt

The problem is that this version of the SVN file doesn't have its keywords substituted, so the version string reads:
'$Revision$ ($Date$)'
This might become a problem in the long run when users report with this version string, as we will be unable to tell what version of the file they have. So, is it possible to ask trac to provide the file with keywords substituted? I'm surprised this isn't the default...

Hm, I don't have a solution. First of all I wouldn't loop it through trac, but use the direct svn URL instead, e.g.

http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

But this has the same issue, so it doesn't solve the issue at hand.

I would guess that the keyword substitution happens at the client, and svn/trac offer the raw contents only. :(

Signature · 8 lines
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060926/c63d34f6/attachment.bin 
#2 lore raw
In reply to Jean Delvare

Hi.

Quoted 9 lines · Axel Thimm

Hm, I don't have a solution. First of all I wouldn't loop it through trac, but use the direct svn URL instead, e.g.

http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

But this has the same issue, so it doesn't solve the issue at hand.

I would guess that the keyword substitution happens at the client, and svn/trac offer the raw contents only. :(

Keyword substitution is disabled by default and must be enabled explicitly if wanted.

See:
http://svnbook.red-bean.com/en/1.2/svn.advanced.props.html#svn.advanced.props.special.keywords

Bye, Mike

#3 lore raw
In reply to Jean Delvare
Quoted 11 lines

Hi,

Quoted 3 lines · Jean Delvare

I have the two following requests with regards to lm-sensors' SVN/trac:

1* Can the "V-2-3-1" tag be renamed to "V2-3-1"?

Yes, the contents of "tags" is (for svn) just another folder, so just as you rename conventional files/folders under svn you ranme this one, too, e.g. "svn mv V-2-3-1 V2-3-1; svn ci ." in the tags folder should be enough.

Yeah, it worked :) Thanks! I expected something more obscure. In fact I didn't expect it to be possible from the client side. Now the only drawback is that the timestamp on the renamed directory changed, but that's a minor annoyance we should be able to live with.

Quoted 12 lines
Quoted 11 lines

2* We often need to ask people to try the latest version of sensors-detect. For now we point them to:
http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/detect/sensors-detect?format=txt

The problem is that this version of the SVN file doesn't have its keywords substituted, so the version string reads:
'$Revision$ ($Date$)'
This might become a problem in the long run when users report with this version string, as we will be unable to tell what version of the file they have. So, is it possible to ask trac to provide the file with keywords substituted? I'm surprised this isn't the default...

Quoted 4 lines

Hm, I don't have a solution. First of all I wouldn't loop it through trac, but use the direct svn URL instead, e.g.

http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

Then this is considered an external link by trac, which adds a special icon in front of it. I linked to trac to avoid that.

Quoted 4 lines

But this has the same issue, so it doesn't solve the issue at hand.

I would guess that the keyword substitution happens at the client, and svn/trac offer the raw contents only. :(

I guessed so, but trac could be seen as a client.

Signature · 1 line
Jean Delvare
#4 lore raw
In reply to Jean Delvare
Quoted 8 lines
Quoted 7 lines · Axel Thimm

Hm, I don't have a solution. First of all I wouldn't loop it through trac, but use the direct svn URL instead, e.g.

http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

But this has the same issue, so it doesn't solve the issue at hand.

Quoted 8 lines
Quoted 2 lines

I would guess that the keyword substitution happens at the client, and svn/trac offer the raw contents only. :(

Keyword substitution is disabled by default and must be enabled explicitly if wanted.

See:
http://svnbook.red-bean.com/en/1.2/svn.advanced.props.html#svn.advanced.props.special.keywords

Well we did enable keyword substitution for this file:

$ svn propget svn:keywords prog/detect/sensors-detect
Author Date Id Revision

And it works well on my side. What I would like is to get it to work in trac, i.e. trac would serve keyword-substituted files rather than "raw" files. Any idea how to do that, if possible at all?

Another option is to give the users a simple svn command to type to retrieve just that file:
svn export http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

However it is significantly less convenient, as the user might not have svn installed. Or maybe we can install a simple CGI script on the web server which would run this command and return the result to the user? I can't seem to find an option to output the file to stdout though, which we would need.

Signature · 1 line
Jean Delvare
#5 lore raw
In reply to Jean Delvare

Quoting myself:

Quoted 9 lines

Another option is to give the users a simple svn command to type to retrieve just that file:
svn export http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

However it is significantly less convenient, as the user might not have svn installed. Or maybe we can install a simple CGI script on the web server which would run this command and return the result to the user? I can't seem to find an option to output the file to stdout though, which we would need.

Ah, it appears that "svn cat" does just that, so it could actually work.

Signature · 1 line
Jean Delvare
#6 lore raw
In reply to Jean Delvare
Quoted 8 lines · Michael Renzmann
Quoted 7 lines · Axel Thimm

Hm, I don't have a solution. First of all I wouldn't loop it through trac, but use the direct svn URL instead, e.g.

http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

But this has the same issue, so it doesn't solve the issue at hand.

Quoted 8 lines
Quoted 2 lines

I would guess that the keyword substitution happens at the client, and svn/trac offer the raw contents only. :(

Keyword substitution is disabled by default and must be enabled explicitly if wanted.

See:
http://svnbook.red-bean.com/en/1.2/svn.advanced.props.html#svn.advanced.props.special.keywords

But the file in question already has svn:keywords properly set.

Signature · 8 lines
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060926/2bda417a/attachment.bin 
#7 lore raw
In reply to Jean Delvare
Quoted 15 lines · Jean Delvare
Quoted 10 lines
Quoted 9 lines · Axel Thimm

Hm, I don't have a solution. First of all I wouldn't loop it through trac, but use the direct svn URL instead, e.g.

http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

But this has the same issue, so it doesn't solve the issue at hand.

I would guess that the keyword substitution happens at the client, and svn/trac offer the raw contents only. :(

Another option is to give the users a simple svn command to type to retrieve just that file:
svn export http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

Quoted 5 lines

However it is significantly less convenient, as the user might not have svn installed. Or maybe we can install a simple CGI script on the web server which would run this command and return the result to the user? I can't seem to find an option to output the file to stdout though, which we would need.

If no native solution in svn/trac is found maybe the scripts doing the snapshots could extract this file w/ keywords and place it to a canonical place?

Signature · 8 lines
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060926/67d79b99/attachment.bin 
#8 lore raw
In reply to Jean Delvare

Hi Axel,

Quoted 22 lines · Jean Delvare
Quoted 15 lines
Quoted 10 lines
Quoted 9 lines · Axel Thimm

Hm, I don't have a solution. First of all I wouldn't loop it through trac, but use the direct svn URL instead, e.g.

http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

But this has the same issue, so it doesn't solve the issue at hand.

I would guess that the keyword substitution happens at the client, and svn/trac offer the raw contents only. :(

Another option is to give the users a simple svn command to type to retrieve just that file:
svn export http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

Quoted 5 lines

However it is significantly less convenient, as the user might not have svn installed. Or maybe we can install a simple CGI script on the web server which would run this command and return the result to the user? I can't seem to find an option to output the file to stdout though, which we would need.

Quoted 3 lines

If no native solution in svn/trac is found maybe the scripts doing the snapshots could extract this file w/ keywords and place it to a canonical place?

This would imply up to 24h of delay before the user can pick the new version of the script. I'm OK with daily snapshots for the project itself, but sensors-detect is a bit special in that it helps us investigating user problems, and being able to update the script with new data and tell the user to try the new version the minute after is very convenient.

I wouldn't bother if the script wasn't run by root. I'd make the file available on my server and I'd tell the users to pick it there. But from a security point of view, that sucks. I really want people to get a file from lm-sensors.org. And I want the file to come right out of the Subversion repository, with no man in the middle.

Thanks,

Signature · 1 line
Jean Delvare
#9 lore raw
In reply to Jean Delvare

Hi,

Quoted 26 lines · Jean Delvare
Quoted 22 lines · Jean Delvare
Quoted 15 lines
Quoted 10 lines
Quoted 9 lines · Axel Thimm

Hm, I don't have a solution. First of all I wouldn't loop it through trac, but use the direct svn URL instead, e.g.

http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

But this has the same issue, so it doesn't solve the issue at hand.

I would guess that the keyword substitution happens at the client, and svn/trac offer the raw contents only. :(

Another option is to give the users a simple svn command to type to retrieve just that file:
svn export http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect

Quoted 5 lines

However it is significantly less convenient, as the user might not have svn installed. Or maybe we can install a simple CGI script on the web server which would run this command and return the result to the user? I can't seem to find an option to output the file to stdout though, which we would need.

Quoted 3 lines

If no native solution in svn/trac is found maybe the scripts doing the snapshots could extract this file w/ keywords and place it to a canonical place?

Quoted 6 lines

This would imply up to 24h of delay before the user can pick the new version of the script. I'm OK with daily snapshots for the project itself, but sensors-detect is a bit special in that it helps us investigating user problems, and being able to update the script with new data and tell the user to try the new version the minute after is very convenient.

Indeed, stretching feedback cycles to 24 hours is ugly. :/

Quoted 5 lines

I wouldn't bother if the script wasn't run by root. I'd make the file available on my server and I'd tell the users to pick it there. But from a security point of view, that sucks. I really want people to get a file from lm-sensors.org. And I want the file to come right out of the Subversion repository, with no man in the middle.

Still assuming there is no native way to ask trac/svn to add keyword expansion, live cuts could be made by using svn's commit triggering system instead of using cron.

Signature · 8 lines
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060926/a629e43e/attachment.bin 
#10 lore raw
In reply to Jean Delvare

Hi.

Quoted 3 lines · Axel Thimm

Still assuming there is no native way to ask trac/svn to add keyword expansion, live cuts could be made by using svn's commit triggering system instead of using cron.

As far as I know, Trac is not able of keyword expansion so far. However, I'll ask on #trac and see what I can find out about that.

The option with letting a commit trigger the "export script" came to my mind, too, when I read about Jean's reservation regarding a cron-based solution.

Bye, Mike

#11 lore raw
In reply to Jean Delvare

Hi again.

Quoted 2 lines · Michael Renzmann

As far as I know, Trac is not able of keyword expansion so far. However, I'll ask on #trac and see what I can find out about that.

Outcome: no support for keyword expansion at this time. Trac accesses the repository directly and would need to take care of the expansion itself (just as the svn client does).

See also:
http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/4133
http://trac.edgewall.org/ticket/717

Bye, Mike

#12 lore raw
In reply to Jean Delvare

Hi Michael,

Quoted 10 lines · Michael Renzmann
Quoted 2 lines

As far as I know, Trac is not able of keyword expansion so far. However, I'll ask on #trac and see what I can find out about that.

Outcome: no support for keyword expansion at this time. Trac accesses the repository directly and would need to take care of the expansion itself (just as the svn client does).

See also:
http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/4133
http://trac.edgewall.org/ticket/717

Thanks for the investigation. Hopefully a future version of trac will support keyword substitution. In the meantime, we can go with either a commit-triggered script, or a CGI. I have a CGI working, it's really simple:

---8<---
#!/bin/sh
# Let the users access the latest version of sensors-detect, with keywords

# substituted.

echo "Content-Type: text/plain"
echo

svn cat http://lm-sensors.org/svn/lm-sensors/trunk/prog/detect/sensors-detect
---8<---

Is there a problem with having this CGI running on the lm-sensors.org server? Or is the commit-triggered approach prefered for performance reasons? I don't know how to do commit-triggered scripts.

Note that if this is too much hassle, we can probably stick to the current situation for some more time; the lack of keyword substitution is only a minor annoyance.

Thanks,

Signature · 1 line
Jean Delvare