Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11584 closed defect (fixed)

NoSuchChangeset is raised if repository is empty

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.2
Component: version control/browser Version: 1.0.1
Severity: normal Keywords:
Cc: Ryan J Ollos Branch:
Release Notes:
  • Prevent NoSuchChangeset error on browser view if default repository is empty.
  • Prevent NoSuchChangeset error from GitNode.__init__ if git repository is empty.
API Changes:
Internal Changes:

Description

In some repository types, browser page raises NoSuchChangeset if empty. Especially, when the repository is default, other registered repositories don't be shown in the browser page by the NoSuchChangeset error.

Repository type 1.0.1 0.12.5
svn NoSuchChangeset No error
direct-svnfs No error No error
git cached_repository = enabled NoSuchChangeset (n/a)
git cached_repository = disabled NoSuchChangeset (n/a)
hg No error No error

I think browser page shouldn't raise NoSuchChangeset even if empty.

Attachments (0)

Change History (7)

in reply to:  description comment:1 by Ryan J Ollos, 10 years ago

Replying to jomae:

Especially, when the repository is default, other registered repositories don't be shown in the browser page by the NoSuchChangeset error.

I've been bothered by this as well. I didn't realize the behavior was different in Trac 0.12.x. It would be great to fix it.

comment:2 by Jun Omae, 10 years ago

Milestone: next-stable-1.0.x1.0.2
Owner: set to Jun Omae
Status: newassigned

Proposed changes in jomae.git@t11584.

The issue has been introduced in [10433] which shows branch and tag labels in browser page. The feature calls repos.get_changeset() with the specified rev parameter or the youngest revision. It works well if not empty. However, it crashes due to that the youngest revision is not found if empty. [69bc9463/jomae.git] would fix it.

Git repository has another issue. SubversionRepository.get_node() with empty repository doesn't raise NoSuchChangeset and SubversionNode.get_entries() returns an empty list. But git repository raises if empty. This behavior is to show "No files" on browser page in the case. [539dd995/jomae.git] would fix it.

comment:3 by Jun Omae, 10 years ago

I noticed that log page on an empty git repository raises a NoSuchChangeset. I'm reworking it.

comment:4 by Jun Omae, 10 years ago

I revised jomae.git@t11584 branch. It fixes NoSuchChangeset on log page with an empty git repository.

comment:5 by Jun Omae, 10 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [12717-12720] and merged to trunk in [12721].

comment:6 by Ryan J Ollos, 10 years ago

Cc: Ryan J Ollos added

After [12717], it looks like we could also remove the following two lines:

  • tracopt/versioncontrol/svn/tests/svn_fs.py

    diff --git a/tracopt/versioncontrol/svn/tests/svn_fs.py b/tracopt/versioncontrol
    index 61a60d0..a0e3abf 100644
    a b class SubversionRepositoryTestSetup(TestSetup):  
    5959        pool = core.svn_pool_create(None)
    6060        dumpstream = None
    6161        try:
    62             if os.path.exists(REPOS_PATH):
    63                 print 'trouble ahead with db/rep-cache.db... see #8278'
    6462            r = repos.svn_repos_create(REPOS_PATH, '', '', None, None, pool)
    6563            if hasattr(repos, 'svn_repos_load_fs2'):
    6664                repos.svn_repos_load_fs2(r, dumpfile, StringIO(),

comment:7 by Jun Omae, 10 years ago

Indeed. Committed in [12733] and merged to trunk in [12734].

Modify Ticket

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