bugGNU arch -- a revision control system - Bugs: bug #15286, "tla [ar]browse" on...

 
 

bug #15286: "tla [ar]browse" on sftp:// has many dupes

Submitter:  Lionel Elie Mamane <lmamane>
Submitted:  Sat 24 Dec 2005 06:58:44 PM UTC
   
 
Category:  tla Severity:  3 - Normal
Item Group:  bug Status:  Fixed
Privacy:  Public Open/Closed:  Closed
Release:  tla-1.3.3
Fixed Release: 
Merge Request?:  None
Your Archive Name: 
Your Archive Location: 
Assigned to:  atai
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 03 Jan 2006 08:36:26 AM UTC, comment #3: 

patch applied.  Thanks

Andy Tai <atai>
Group administrator
Sat 24 Dec 2005 10:57:31 PM UTC, comment #2: 

Here's a patch to fix it:

--- orig/libarch/archive-pfs.c
+++ mod/libarch/archive-pfs.c
@@ -309,6 +309,7 @@
     }

   rel_free_table (files);
+  rel_sort_table_by_field (0, answer, 0);
   rel_uniq_by_field (&answer, 0);
   return answer;
 }

The reason for the bug is quite simple: In function pfs_baz_search, the directory list is created in the list the OS/sftp gives it to us, so not necessarily sorted. But rel_uniq_by_field supposes that this list is sorted (it removes only consecutives duplicates). So the list has to be explicitly sorted before being passed to rel_uniq_by_field. (Note that the uniquified list will be sorted again higher up in the call trace, by arch_archive_categories in archive.c . Maybe that later sort can be removed, maybe not. I'm not familiar enough with the code.)

This also explains why this didn't happen with http access: the .listing file is kept in sorted order!

Lionel Elie Mamane <lmamane>
Sat 24 Dec 2005 07:48:10 PM UTC, comment #1: 

The same bug shows with filesystem access to the repository.

Lionel Elie Mamane <lmamane>
Sat 24 Dec 2005 06:58:44 PM UTC, original submission:  

tla register-archive sftp://arch.debian.org/arch/pkg-horde/2006/
tla abrowse -A pkg-horde-hackers@lists.alioth.debian.org--2006 mnemo

Output:

pkg-horde-hackers@lists.alioth.debian.org--2006
  mnemo
    mnemo--sid
      mnemo--sid--1
        base-0 .. patch-6

      mnemo--sid--2
        base-0 .. patch-4

    mnemo--sid
      mnemo--sid--1
        base-0 .. patch-6

      mnemo--sid--2
        base-0 .. patch-4

    mnemo--upstream
      mnemo--upstream--1
        base-0 .. patch-2

      mnemo--upstream--2
        base-0 .. patch-1

    mnemo--upstream
      mnemo--upstream--1
        base-0 .. patch-2

      mnemo--upstream--2
        base-0 .. patch-1

  mnemo
    mnemo--sid
      mnemo--sid--1
        base-0 .. patch-6

      mnemo--sid--2
        base-0 .. patch-4

    mnemo--sid
      mnemo--sid--1
        base-0 .. patch-6

      mnemo--sid--2
        base-0 .. patch-4

    mnemo--upstream
      mnemo--upstream--1
        base-0 .. patch-2

      mnemo--upstream--2
        base-0 .. patch-1

    mnemo--upstream
      mnemo--upstream--1
        base-0 .. patch-2

      mnemo--upstream--2
        base-0 .. patch-1

Notice that the project is listed twice, in each project each branch is listed twice.

Accessing the same archive over http://arch.debian.org/arch/pkg-horde/2006/, everything works well.

Lionel Elie Mamane <lmamane>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2271:  ,,double-browse.tar.gz added by lmamane (517B - application/x-gzip - Changeset solving this bug.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-01-06 atai StatusConfirmed Fixed
2006-01-06 atai Open/ClosedOpen Closed
2006-01-06 atai StatusReady For Test Confirmed
2006-01-03 atai StatusNone Ready For Test
2006-01-02 atai Assigned toNone atai
2005-12-24 lmamane Attached File- Added ,,double-browse.tar.gz, #3212

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code