Permalink
Browse files

Bug fix. Syncing branches, under Trac's control, from the same reposi…

…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...
1 parent 71596ae commit f8d40b3686b6e0529dd98609bed02be901ee9e32 @maraujop committed Oct 12, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 mercurialchangeset/admin.py
@@ -173,9 +173,9 @@ def check_revision(self, rev_hash):
sql_string = """
SELECT rev, author, time, message
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()
return len(rows) == 1

0 comments on commit f8d40b3

Please sign in to comment.