Edgewall Software
Modify

Opened 7 years ago

Closed 5 years ago

Last modified 18 months ago

#6120 closed defect (worksforme)

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

Reported by: trebor74hr@… Owned by: cboos
Priority: high Milestone:
Component: version control/changeset view Version: devel
Severity: normal Keywords: needfinfo
Cc:
Release Notes:
API Changes:

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 (0)

Change History (9)

comment:1 follow-up: Changed 7 years ago by eblot

  • Keywords needfinfo added

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

comment:2 Changed 7 years 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?

comment:3 in reply to: ↑ 1 Changed 7 years 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.

comment:4 Changed 7 years 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?)

comment:5 Changed 7 years ago by cboos

  • Milestone changed from 0.11 to 0.11.1

Not for 0.11.

comment:6 Changed 6 years ago by cboos

  • Milestone 0.11-retriage deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Please reopen if this happens with a recent Trac release (≥ 0.11.4).

comment:7 Changed 5 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

This just happened to me with Trac 0.11.5 after upgrading from Trac 0.9.5. The instructions supplied in TracUpgrade were followed, as mentioned above, before hitting this problem.

Again, as mentioned above, this solved the problem:

trac-admin /path/to/trac_environment resync

comment:8 Changed 5 years ago by cboos

  • Milestone set to 0.12-multirepos
  • Status changed from reopened to new

Ok, so it would be interesting to create a 0.9.5 environment, with a cached repos, see if the upgrade to multirepos works fine ;-)

comment:9 Changed 5 years ago by cboos

  • Milestone 0.12-multirepos deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cboos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from cboos 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.