Edgewall Software

Ticket #6120 (new defect)

Opened 14 months ago

Last modified 13 months ago

Trac reports for existing rev 'No changeset ??? in the repository' + solution

Reported by: trebor74hr@… Owned by: cboos
Priority: high Milestone: 0.11-retriage
Component: version control/changeset view Version: devel
Severity: normal Keywords: needfinfo
Cc:

Description

We use Trac 0.11dev-r6038 which is installed on win32+standalone. Our trac was originally installed as 0.10, and recently upgraded to 0.11dev-r6038.

when i type url:

http://localhost/trac/changeset/1492

browser:

Error: No such changeset
No changeset 1492 in the repository

in trac.log:

   2007-10-02 14:39:42,555 Trac[__init__] DEBUG: Dispatching <Request "GET u'/chrome/common/css/changeset.css'">
   2007-10-02 14:39:42,555 Trac[__init__] DEBUG: Dispatching <Request "GET u'/chrome/common/css/diff.css'">
   2007-10-02 14:39:42,571 Trac[__init__] DEBUG: Dispatching <Request "GET u'/chrome/common/css/code.css'">
   2007-10-02 14:39:42,696 Trac[__init__] DEBUG: Dispatching <Request "GET u'/chrome/common/js/diff.js'">
   2007-10-02 14:39:42,930 Trac[__init__] DEBUG: Dispatching <Request "GET u'/changeset/1492'">
   2007-10-02 14:39:42,993 Trac[__init__] DEBUG: cache metadata undefined (youngest_rev=u'')
   2007-10-02 14:39:42,993 Trac[__init__] INFO: repos rev [1501] != cached rev [None]
   2007-10-02 14:39:42,993 Trac[__init__] DEBUG: Retrieving session for ID u'user1'
   2007-10-02 14:39:43,085 Trac[__init__] WARNING: 404 No such changeset (No changeset 1492 in the repository)
   2007-10-02 14:39:43,085 Trac[__init__] DEBUG: Prepare chrome data for request

Solution:

table system record youngest_rev was empty, after i updated it to 1491 it worked properly. now it is at 1501 - the newest revision in our svn. the 1491 is last rev viewed by trac 0.10, and http://localhost/trac/changeset/1491 works ok.

Proposal:

to avoid such problems - if system.youngest_rev is empty then handle case

Attachments

Change History

follow-up: ↓ 3   Changed 14 months ago by eblot

  • keywords needfinfo added

Have you run "trac-admin resync" after the upgrade?

  Changed 14 months ago by anonymous

no I did not, i did what is listed in TracUpgrade:

  • trac-admin upgrade
  • trac-admin wiki upgrade

Should I have done this? Why is not written in TracUpgrade, or better why trac-admin upgrade didn't do this?

in reply to: ↑ 1   Changed 14 months ago by anonymous

Replying to eblot:

Have you run "trac-admin resync" after the upgrade?

sorry, didn't use reply button for my last comment.

  Changed 14 months ago by cboos

Well, the upgrade should have done the necessary steps. No, it's something different here, the get_youngest_rev_in_cache called in source:trunk/trac/upgrade/db20.py failed for some reason, and youngest_rev was set to ''.

Even with that failure, with youngest_rev == '' (moments later reset to None), this should have triggered a full resync. Right after the following line is logged:

INFO: repos rev [1501] != cached rev [None]

that code is executed:

            self.log.info("repos rev [%s] != cached rev [%s]" %
                          (repos_youngest, self.youngest))
            if self.youngest:
                next_youngest = self.repos.next_rev(self.youngest)
            else:
                next_youngest = None
                try:
                    next_youngest = self.repos.oldest_rev
                    next_youngest = self.repos.normalize_rev(next_youngest)
                except TracError:
                    return # can't normalize oldest_rev: repository was empty

(source:trunk/trac/versioncontrol/cache.py@6048#L126)

I think we should log that TracError to be able to understand what happened (normally, repos.oldest_rev should simply return 1 ... or was this a scoped repository?)

  Changed 13 months ago by cboos

  • milestone changed from 0.11 to 0.11.1

Not for 0.11.

Add/Change #6120 (Trac reports for existing rev 'No changeset ??? in the repository' + solution)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from cboos. Next status will be 'new'
The owner will change from cboos to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.