Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#1358 closed defect (fixed)

[patch] repository resync fails

Reported by: Matthew Good <trac matt-good net> Owned by: Jonas Borgström
Priority: highest Milestone: 0.9
Component: general Version: devel
Severity: blocker Keywords: patch
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

With the new version control changes trying to sync a new project, or resync an existing wouldn't get any revisions. The looping condition for retrieving revisions exits immediately since the initial revision will be '0'.

Here's the necessary patch:

=== trac/versioncontrol/cache.py
==================================================================
--- trac/versioncontrol/cache.py  (revision 1835)
+++ trac/versioncontrol/cache.py  (local)
@@ -61,7 +61,7 @@
                 current_rev = self.repos.next_rev(youngest_stored)
             else:
                 current_rev = self.repos.oldest_rev
-            while current_rev:
+            while current_rev is not None:
                 changeset = self.repos.get_changeset(current_rev)
                 cursor.execute("INSERT INTO revision (rev,time,author,message) "
                                "VALUES (%s,%s,%s,%s)", (current_rev,

Attachments (0)

Change History (1)

comment:1 by Mark Rowe, 20 years ago

Resolution: fixed
Status: newclosed

Patch applied in [1444].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.