Skip to content

Commit

Permalink
Bug fix. Syncing branches, under Trac's control, from the same reposi…
Browse files Browse the repository at this point in the history
…tory was failing because of a bug in `check_revision`

Only one of the branches or repositories was being synced into Trac's
revision table, because `check_revision` was only checking hashes, which
is only one of the two columns that compose the primary key.
  • Loading branch information
maraujop committed Oct 12, 2010
1 parent 71596ae commit f8d40b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mercurialchangeset/admin.py
Expand Up @@ -173,9 +173,9 @@ def check_revision(self, rev_hash):
sql_string = """ sql_string = """
SELECT rev, author, time, message SELECT rev, author, time, message
FROM revision FROM revision
WHERE rev LIKE %s WHERE repos LIKE %s AND rev LIKE %s
""" """
self.cursor.execute(sql_string, (rev_hash,)) self.cursor.execute(sql_string, (self.repository_id, rev_hash,))
rows = self.cursor.fetchall() rows = self.cursor.fetchall()


return len(rows) == 1 return len(rows) == 1
Expand Down

0 comments on commit f8d40b3

Please sign in to comment.