From bd6bd837c5717077ba9cf08ab23611a665b93843 Mon Sep 17 00:00:00 2001 From: David Fifield Date: Tue, 2 Jun 2015 12:24:44 -0700 Subject: [PATCH] Fix line number anchors in gitweb links. In one case, provide a commit hash so that the line number is relative to a known commit of the file. I found the commit in bridgedb.git where the URL was added, then found a commit in torspec.git that was around the same time and seems to point to the right place. Subtract one from the line numbers; maybe the old gitweb and the new are off by one relative to each other. --- lib/bridgedb/Bridges.py | 2 +- lib/bridgedb/bridges.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py index d4e331e9..58a81cd9 100644 --- a/lib/bridgedb/Bridges.py +++ b/lib/bridgedb/Bridges.py @@ -63,7 +63,7 @@ class BridgeRingParameters(object): :ivar list needFlags: List of two-tuples of desired flags_ assigned to a Bridge by the Bridge DirAuth. - .. _flags: https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n1696 + .. _flags: https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt?id=6b557594ef#n1695 """ def __init__(self, needPorts=[], needFlags=[]): diff --git a/lib/bridgedb/bridges.py b/lib/bridgedb/bridges.py index 5fe3355d..40cc7d9c 100644 --- a/lib/bridgedb/bridges.py +++ b/lib/bridgedb/bridges.py @@ -109,7 +109,7 @@ def update(self, flags): | "Valid" if the router has been 'validated'. .. _dir-spec.txt: - https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt?id=7647f6d4d#n1603 + https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt?id=7647f6d4d#n1602 :param list flags: A list of strings containing each of the flags parsed from the 's'-line.