Edgewall Software

Ticket #1358 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[patch] repository resync fails

Reported by: Matthew Good <trac matt-good net> Owned by: jonas
Priority: highest Milestone: 0.9
Component: general Version: devel
Severity: blocker Keywords: patch
Cc:

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

Change History

Changed 4 years ago by mrowe

  • status changed from new to closed
  • resolution set to fixed

Patch applied in [1444].

Add/Change #1358 ([patch] repository resync fails)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.