Re: [fossil-users] Partial hash collision

2014-03-26 Thread Baruch Burstein
On Tue, Mar 25, 2014 at 11:50 PM, Andy Goth andrew.m.g...@gmail.com wrote:


 and allows you to search for commits by prefix. IOW the prefix thing
 is a pure convenience to reduce the amount of stuff to enter.


 Understood, but this convenience feature feeds back into the database
 when the user enters a prefix into a commit comment or a ticket or a
 wiki page.


I would assume that a non-unique prefix should resolve to the earlier of
the two. That would solve this problem, since older tickets etc. would
continue to refer to the same commit/artifact as they did originally. I
don't know if this is what actually happens, though.



-- 
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Baruch Burstein
I was wrong. See http://www.fossil-scm.org/index.html/artifact/ebb0


On Wed, Mar 26, 2014 at 9:15 AM, Baruch Burstein bmburst...@gmail.comwrote:

 On Tue, Mar 25, 2014 at 11:50 PM, Andy Goth andrew.m.g...@gmail.comwrote:


 and allows you to search for commits by prefix. IOW the prefix thing
 is a pure convenience to reduce the amount of stuff to enter.


 Understood, but this convenience feature feeds back into the database
 when the user enters a prefix into a commit comment or a ticket or a
 wiki page.


 I would assume that a non-unique prefix should resolve to the earlier of
 the two. That would solve this problem, since older tickets etc. would
 continue to refer to the same commit/artifact as they did originally. I
 don't know if this is what actually happens, though.



 --
 ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı




-- 
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Richard Hipp
On Tue, Mar 25, 2014 at 5:50 PM, Andy Goth andrew.m.g...@gmail.com wrote:

 On 3/25/2014 4:40 PM, Andreas Kupries wrote:

 On Tue, Mar 25, 2014 at 2:28 PM, Andy Goth andrew.m.g...@gmail.com
 wrote:

 Fossil uses unique prefixes of checksums as identifiers.


 No, it does not. Fossil stores full identifiers


 I was referring only to the display.  Full identifiers are usually shown
 only in detail pages and the actual manifests.


My original idea was to show the first 10 characters of the hash in all
cases and if the first 10 characters are ambiguous, show additional
characters as necessary to make the hash unambiguous.

But, as the longest collision I've yet seen is only 4 characters, I never
have gotten around to modifying the display logic.

In order to get a 10-character collision on the SHA1 hash to two
check-ins,  you'd need a repository with about a million check-ins (or else
you'd need to be very unlucky).  The TCL project has 17241 check-ins over
16 years.  SQLite has 12841 check-ins in 13.8 years.  Fossil has 6823
check-ins in 6.7 years.  Do you see the trend?  The first collision is
hundreds of years away.

But, yes, it would be good to go ahead and fix this.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Jan Nijtmans
2014-03-26 11:42 GMT+01:00 Baruch Burstein bmburst...@gmail.com:
 On Wed, Mar 26, 2014 at 12:30 PM, Richard Hipp d...@sqlite.org wrote:
 But, as the longest collision I've yet seen is only 4 characters, I never
 have gotten around to modifying the display logic.

 Just for the record: Fossil itself has a 7 character collision. I didn't
 check the netbsd repositories.

http://fossil-scm.org/index.html/info/a16236e70dafc57f564b20f35670afad02a8fc7a

A fossil rebuild is necessary for this to appear in the ticket
hyperlinks as well.

Regards,
Jan Nijtmans
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Baruch Burstein
Out of curiosity, in the tcl repository I found 2 8-long collisions. I
don't have anything bigger to test. This is what I used:

select substr(uuid, 1, 8) a, count(*) b from blob group by a having b1
order by b;


On Wed, Mar 26, 2014 at 1:01 PM, Jan Nijtmans jan.nijtm...@gmail.comwrote:

 2014-03-26 11:42 GMT+01:00 Baruch Burstein bmburst...@gmail.com:
  On Wed, Mar 26, 2014 at 12:30 PM, Richard Hipp d...@sqlite.org wrote:
  But, as the longest collision I've yet seen is only 4 characters, I
 never
  have gotten around to modifying the display logic.
 
  Just for the record: Fossil itself has a 7 character collision. I didn't
  check the netbsd repositories.

 
 http://fossil-scm.org/index.html/info/a16236e70dafc57f564b20f35670afad02a8fc7a
 

 A fossil rebuild is necessary for this to appear in the ticket
 hyperlinks as well.

 Regards,
 Jan Nijtmans
 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Joerg Sonnenberger
On Wed, Mar 26, 2014 at 01:36:46PM +0200, Baruch Burstein wrote:
 Out of curiosity, in the tcl repository I found 2 8-long collisions. I
 don't have anything bigger to test. This is what I used:
 
 select substr(uuid, 1, 8) a, count(*) b from blob group by a having b1
 order by b;

By that test, I see 467 collission for src.fossil for 8 characters and 4
collissions for 10 characters. For pkgsrc.fossil it is 142 collisions
for 8 characters and none for 10 characters.

Joerg
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Stephan Beal
On Wed, Mar 26, 2014 at 1:14 PM, Joerg Sonnenberger jo...@britannica.bec.de
 wrote:

 By that test, I see 467 collission for src.fossil for 8 characters and 4
 collissions for 10 characters. For pkgsrc.fossil it is 142 collisions
 for 8 characters and none for 10 characters.


Last summer i remember running some numbers on this in the tcl repo and
IIRC the biggest collision was 10 or 11. 12 seemed to be the magic point at
which all collisions disappear (IIRC).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Mallik Abhinas
Hi Folks:Can some one please guide me how to configure fossil web server on  80 
port. I want to change it from 8080 to 80. on a ubuntu box.
-Abhinas

Date: Wed, 26 Mar 2014 14:14:25 +0100
From: sgb...@googlemail.com
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Partial hash collision

On Wed, Mar 26, 2014 at 1:22 PM, Stephan Beal sgb...@googlemail.com wrote:


Last summer i remember running some numbers on this in the tcl repo and IIRC 
the biggest collision was 10 or 11. 12 seemed to be the magic point at which 
all collisions disappear (IIRC).


It seems that in fossil the highest collision in fossil is 8 bytes long:
sqlite select substr(uuid,0,8) as short, count(*) from blob group by short 
having count(short)1;
b652b90|2sqlite select uuid from blob where uuid glob 'b652b90*';
b652b900e940c3bb5cbbfb2b0c4a98cb5edb1c90  # a ticket re. RSS 
feedb652b9088b0d9e9cc8c2fb4c153443d72429d7c9  # some old/replaced C file

sqlite select substr(uuid,0,9) as short, count(*) from blob group by short 
having count(short)1;sqlite select substr(uuid,0,10) as short, count(*) from 
blob group by short having count(short)1;
sqlite select substr(uuid,0,11) as short, count(*) from blob group by short 
having count(short)1;
collisions start to become common at 7 bytes:
sqlite select substr(uuid,0,7) as short, count(*) from blob group by short 
having count(short)1;
0830c3|26fdf52|28d712d|2904ab4|2927257|2940431|2b652b9|2ba837f|2bdbf14|2be32eb|2c1b1ba|2c8735d|2
d07537|2d43165|2e980ba|2ef17fb|2f94f7e|2

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbealFreedom is sloppy. But since tyranny's the only 
guaranteed byproduct of those who insist on a perfect world, freedom will have 
to do. -- Bigby Wolf



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users  
  ___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread JR
@Mallik.  If you are using fossil server, start it with -P 80 or --port
8080.

JR


On Wed, Mar 26, 2014 at 10:57 AM, Mallik Abhinas fiftysix...@outlook.comwrote:

 Hi Folks:
 Can some one please guide me how to configure fossil web server on  80
 port. I want to change it from 8080 to 80. on a ubuntu box.

 -Abhinas

 --
 Date: Wed, 26 Mar 2014 14:14:25 +0100
 From: sgb...@googlemail.com
 To: fossil-users@lists.fossil-scm.org
 Subject: Re: [fossil-users] Partial hash collision


 On Wed, Mar 26, 2014 at 1:22 PM, Stephan Beal sgb...@googlemail.comwrote:

 Last summer i remember running some numbers on this in the tcl repo and
 IIRC the biggest collision was 10 or 11. 12 seemed to be the magic point at
 which all collisions disappear (IIRC).


 It seems that in fossil the highest collision in fossil is 8 bytes long:

 sqlite select substr(uuid,0,8) as short, count(*) from blob group by
 short having count(short)1;
 b652b90|2
 sqlite select uuid from blob where uuid glob 'b652b90*';
 b652b900e940c3bb5cbbfb2b0c4a98cb5edb1c90  # a ticket re. RSS feed
 b652b9088b0d9e9cc8c2fb4c153443d72429d7c9  # some old/replaced C file

 sqlite select substr(uuid,0,9) as short, count(*) from blob group by
 short having count(short)1;
 sqlite select substr(uuid,0,10) as short, count(*) from blob group by
 short having count(short)1;
 sqlite select substr(uuid,0,11) as short, count(*) from blob group by
 short having count(short)1;

 collisions start to become common at 7 bytes:

 sqlite select substr(uuid,0,7) as short, count(*) from blob group by
 short having count(short)1;
 0830c3|2
 6fdf52|2
 8d712d|2
 904ab4|2
 927257|2
 940431|2
 b652b9|2
 ba837f|2
 bdbf14|2
 be32eb|2
 c1b1ba|2
 c8735d|2
 d07537|2
 d43165|2
 e980ba|2
 ef17fb|2
 f94f7e|2


 --
 - stephan beal
 http://wanderinghorse.net/home/stephan/
 http://gplus.to/sgbeal
 Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
 those who insist on a perfect world, freedom will have to do. -- Bigby Wolf

 ___ fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

 ___
 fossil-users mailing list
 fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Stephan Beal
On Wed, Mar 26, 2014 at 5:03 PM, Mallik Abhinas fiftysix...@outlook.comwrote:

 @ JR: Could you please guide me where do I change it ?


You pass the parameters JR mentioned to fossil, like this:

fossil server --port 8080

then visit http://localhost:8080 with your browser.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-26 Thread Mallik Abhinas

@Stephen: Do I have to be a root to run this command in terminal ?
And I want it to be changed to 80, I want my website to run in 80 port not on 
8080.
-Mallik
Date: Wed, 26 Mar 2014 17:14:20 +0100
From: sgb...@googlemail.com
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Partial hash collision

On Wed, Mar 26, 2014 at 5:03 PM, Mallik Abhinas fiftysix...@outlook.com wrote:




@ JR: Could you please guide me where do I change it ?
You pass the parameters JR mentioned to fossil, like this:
fossil server --port 8080

then visit http://localhost:8080 with your browser.
-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbealFreedom is sloppy. But since tyranny's the only 
guaranteed byproduct of those who insist on a perfect world, freedom will have 
to do. -- Bigby Wolf



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users  
  ___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Partial hash collision

2014-03-25 Thread Andy Goth
Fossil uses unique prefixes of checksums as identifiers.  What does it 
do when a previously-unique prefix becomes ambiguous due to a new commit?


Also, what happens when an existing comment (or ticket or wiki page or 
whatever) references a no-longer-unique prefix?  Fossil can't rewrite 
the old manifest without changing every checksum forward, so its only 
hope is to change the display, but that leads to more problems.


It's quite likely this has already been discussed and resolved, but I 
haven't been able to track down any emails or documentation on the matter.


I wish I could give you a test case, but the SHA1 function is thankfully 
difficult to invert, even for prefixes. :^)


--
Andy Goth | andrew.m.goth/at/gmail/dot/com
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Partial hash collision

2014-03-25 Thread Andy Goth

On 3/25/2014 4:40 PM, Andreas Kupries wrote:

On Tue, Mar 25, 2014 at 2:28 PM, Andy Goth andrew.m.g...@gmail.com wrote:

Fossil uses unique prefixes of checksums as identifiers.


No, it does not. Fossil stores full identifiers


I was referring only to the display.  Full identifiers are usually shown
only in detail pages and the actual manifests.


and allows you to search for commits by prefix. IOW the prefix thing
is a pure convenience to reduce the amount of stuff to enter.


Understood, but this convenience feature feeds back into the database
when the user enters a prefix into a commit comment or a ticket or a
wiki page.

--
Andy Goth | andrew.m.goth/at/gmail/dot/com
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users