Revision 371d907a pithos/backends/lib/sqlalchemy/node.py

b/pithos/backends/lib/sqlalchemy/node.py
784 784
    
785 785
    def latest_version_list(self, parent, prefix='', delimiter=None,
786 786
                            start='', limit=10000, before=inf,
787
                            except_cluster=0, pathq=[], domain=None, filterq=[], sizeq=None):
787
                            except_cluster=0, pathq=[], domain=None,
788
                            filterq=[], sizeq=None, all_props=False):
788 789
        """Return a (list of (path, serial) tuples, list of common prefixes)
789 790
           for the current versions of the paths with the given parent,
790 791
           matching the following criteria.
......
831 832
           will always match.
832 833
           
833 834
           Limit applies to the first list of tuples returned.
835
           
836
           If all_props is True, return all properties after path, not just serial.
834 837
        """
835 838
        
836 839
        if not start or start < prefix:
......
839 842
        
840 843
        v = self.versions.alias('v')
841 844
        n = self.nodes.alias('n')
842
        s = select([n.c.path, v.c.serial]).distinct()
845
        if not all_props:
846
            s = select([n.c.path, v.c.serial]).distinct()
847
        else:
848
            s = select([n.c.path,
849
                        v.c.serial, v.c.node, v.c.hash,
850
                        v.c.size, v.c.type, v.c.source,
851
                        v.c.mtime, v.c.muser, v.c.uuid,
852
                        v.c.checksum, v.c.cluster]).distinct()
843 853
        filtered = select([func.max(self.versions.c.serial)])
844 854
        if before != inf:
845 855
            filtered = filtered.where(self.versions.c.mtime < before)
......
910 920
            props = rp.fetchone()
911 921
            if props is None:
912 922
                break
913
            path, serial = props
923
            path = props[0]
924
            serial = props[1]
914 925
            idx = path.find(delimiter, pfz)
915 926
            
916 927
            if idx < 0:

Also available in: Unified diff