[darcs-devel] [issue194] bug in darcs

Daniel Stutzbach bugs at darcs.net
Mon Jul 3 13:22:41 PDT 2006


New submission from Daniel Stutzbach <agthorr at cs.uoregon.edu>:

While doing a push, darcs died and told me to submit the following
information.  If there's a simple workaround that will let me complete
the push, that would be very much appreciated.  Let me know if there's
any further information I can provide.

The machine I'm pushing from is an AMD Opteron running Linux.  The
machine I'm pushing to runs Solaris.

The Opteron's --exact-version is:

------------------------------------------------------------------------
darcs compiled on May 15 2006, at 00:35:04
# configured Mon May 15 00:29:05 CEST 2006
./configure --with-static-libs

Context:

[TAG 1.0.7
Tommy Pettersson <ptp at lysator.liu.se>**20060513171438] 
------------------------------------------------------------------------

The Solaris machine's is:

------------------------------------------------------------------------
darcs compiled on Mar  4 2006, at 21:34:19
# configured Tue Feb 28 07:02:39 EST 2006
./configure --no-create --no-recursion

Context:

[TAG 1.0.6
Tommy Pettersson <ptp at lysator.liu.se>**20060228111841] 
------------------------------------------------------------------------

and the output of the command is:

------------------------------------------------------------------------
Pushing to "ix.cs.uoregon.edu:src/crawler/"...

Fri Oct 28 21:14:54 PDT 2005  agthorr at barsoom.org
  * Changes to h2cdf and d2cdf for greater accuracy
Shall I push this patch? (1/?)  [ynWvpxqadjkc], or ? for help: 

Sat Oct 29 01:47:17 PDT 2005  agthorr at barsoom.org
  * Bugfix for tools.py.  Removed a
Shall I push this patch? (2/?)  [ynWvpxqadjkc], or ? for help: 

Sat Oct 29 10:56:34 PDT 2005  agthorr at barsoom.org
  * Bugfix for h2cdft in tools.py
Shall I push this patch? (3/?)  [ynWvpxqadjkc], or ? for help: 

Sat Oct 29 13:35:10 PDT 2005  agthorr at barsoom.org
  * Fixed h2cdft so d2cdft works correctly
Shall I push this patch? (4/?)  [ynWvpxqadjkc], or ? for help: 

Sun Oct 30 10:56:12 PST 2005  agthorr at barsoom.org
  * Added pickler support; added strptime()
Shall I push this patch? (5/?)  [ynWvpxqadjkc], or ? for help: 

Sat Dec  3 13:45:14 PST 2005  agthorr at barsoom.org
  * Added get_start_time to tools
Shall I push this patch? (6/?)  [ynWvpxqadjkc], or ? for help: 

Fri Dec  2 11:46:41 PST 2005  agthorr at barsoom.org
  * Updated Infinity to work on Windows
Shall I push this patch? (7/?)  [ynWvpxqadjkc], or ? for help: 

Fri Dec  2 11:47:34 PST 2005  agthorr at barsoom.org
  * parse_tools.py, part 1
Shall I push this patch? (8/?)  [ynWvpxqadjkc], or ? for help: 

Fri Dec  2 11:53:43 PST 2005  agthorr at barsoom.org
  * Moved stuff out of parse_tools.py, now in tools.py
Shall I push this patch? (9/?)  [ynWvpxqadjkc], or ? for help: 

Fri Dec  2 12:29:14 PST 2005  agthorr at barsoom.org
  * Added tools.py for crawler backwards compatibility
Shall I push this patch? (10/?)  [ynWvpxqadjkc], or ? for help: 

Fri Dec  2 16:56:43 PST 2005  agthorr at barsoom.org
  * Made tools.py less path-sensitive
Shall I push this patch? (11/?)  [ynWvpxqadjkc], or ? for help: 

Fri Dec  2 16:56:53 PST 2005  agthorr at barsoom.org
  * Made import of parse_tools optional
Shall I push this patch? (12/?)  [ynWvpxqadjkc], or ? for help: 

Tue May 16 15:20:16 PDT 2006  agthorr at barsoom.org
  * Added many new cases to parse_tools and made more robust
Shall I push this patch? (13/?)  [ynWvpxqadjkc], or ? for help: 

Sun May 21 11:02:33 PDT 2006  agthorr at barsoom.org
  * Ported gnutella analysis tools to 64-bit
Shall I push this patch? (14/?)  [ynWvpxqadjkc], or ? for help: 
darcs: bug in darcs!
in function reconcile_unwindings
Original patch:
merger 0.0 (
merger 0.0 (
hunk ./parse_tools.py 710
+    scale = 1.0/(total+gap)
merger 0.0 (
merger 0.0 (
hunk ./parse_tools.py 717
+    pairs = sorted(pairs)
merger 0.0 (
hunk ./parse_tools.py 708
-def h2cdf(pairs):
+def d2cdf(d): return d2cdft(d)[0]
+
+def cdf2ccdf(lst):
+    if len(lst) == 2 and type(lst) == type(()):
+        lst, total = lst
+        return [(x, 100.0-y) for x, y in lst] + [[], [], [total]]
+    return [(x, 100.0-y) for x, y in lst]
+
+def h2cdft(pairs):
hunk ./parse_tools.py 708
-def h2cdf(pairs):
+def h2cdf(pairs, gap=0):
)
)
hunk ./parse_tools.py 671
-def eq_e(x,y):
-    epsilon = 0.01 * min(abs(x),abs(y))
-    if abs(x - y) <= epsilon: return True
-    return False
-
-def fcdf(values):
-    values = list(values)
-    values.sort()
-    cdf = [(values[i], (i+1)*100.0/len(values)) for i in xrange(len(values))]
-    count = 0
-    i = 0
-    while i < len(cdf)-2:
-        if eq_e(cdf[i][0], cdf[i-1][0]) and eq_e(cdf[i][0], cdf[i-2][0]) or \
-               eq_e(cdf[i][1], cdf[i-1][1]) and eq_e(cdf[i][1], cdf[i-2][1]):
-            del cdf[i]
-            count += 1
-        else:
-            i += 1
-    return cdf 
-
-try:
-    Infinity = float('Infinity')
-except ValueError:
-    Infinity = float(10**10)
-
-def d2cdft(d):
-    return h2cdft(d.items())
-    total = sum(d.values())
-    n = 0
-    keys = sorted(d.iterkeys())
-    rv = [(keys[0], 0.0)]
-    for v in sorted(d.iterkeys()):
-        if v == Infinity: continue
-        n += d[v]*100.0/total
-        rv.append((v,n))
-    return rv, total
-
-def d2cdf(d): return d2cdft(d)[0]
-
-def cdf2ccdf(lst):
-    if len(lst) == 2 and type(lst) == type(()):
-        lst, total = lst
-        return [(x, 100.0-y) for x, y in lst] + [[], [], [total]]
-    return [(x, 100.0-y) for x, y in lst]
-
-def h2cdft(pairs):
-    pairs = sorted(pairs)
-    total = sum([y for x,y in pairs])
-    n = 0
-    rv = [(pairs[0][0], 0.0)]
-    for x,y in pairs:
-        if x == Infinity: continue
-        n += y*100.0/total
-        if len(rv) and (x,n) == rv[-1]: continue
-        rv.append((x, rv[-1][1]))
-        rv.append((x,n))
-    return rv, total
-
-def h2cdf(pairs): return h2cdft(pairs)[0]
-
-def memoize(f):
-    def g(*args):
-        if args not in g.cache:
-            if len(g.cache) > 100000:
-                for k in random.sample(g.cache.iterkeys(), 10000):
-                    del g.cache[k]
-            g.cache[args] = f(*args)
-        return g.cache[args]
-    g.cache = {}
-    return g
-
-def bisect(g, lowx, highx, target=0):
-    f = lambda x: target-g(x)
-    lowy = f(lowx)
-    highy = f(highx)
-    assert sign(lowy) != sign(highy), (lowx, lowy, highx, highy)
-    while 1:
-        midx = (lowx + highx) / 2.0
-        y = f(midx)
-        if y == 0:
-            break
-        if midx == lowx or midx == highx: break
-        if sign(y) == sign(lowy):
-            # Too low
-            lowx = midx
-        else:
-            # Too high
-            highx = midx
-    return midx
-
-def sign(x):
-    if not x: return 0
-    return x / abs(x)
-
-try:
-    from utils.orthogonal import P_roots
-    from Numeric import sum
-    
-    @memoize
-    def quad(func,a,b,n=5):
-        """val = quad(func,a,b,n=5)
-    
-        Integrate func(x) from a to b using Gaussian Quadrature of order n.
-        """
-        [x,w] = P_roots(n)
-        y = (b-a)*(x+1)/2.0 + a
-        return (b-a)/2.0*sum(w*func(y))
-    
-    @memoize
-    def quadtol(func,a,b,tol=1e-7,NMAX=200):
-        """val = quadtol(func,a,b,tol=1e-7,NMAX=30)
-    
-        Integrate func(x) from a to b using Gaussian Quadrature 
-        with absolute tolerance tol.
-        """
-        err = 100.0
-        val = err
-        n = 5
-        while (err > tol) and (n < NMAX):
-            if (n>=NMAX):
-                raise "NMAX (%d) exceeded. Latest difference = %e" % (n,err)
-            newval = quad(func,a,b,n)
-            err = abs(newval-val)
-            val = newval
-            n = int(n * 1.3)
-        return val
-except ImportError:
-    pass
-
-def cdf2h(data):
-    rv = [data[0]]
-    for i in range(1,len(data)):
-        rv.append((data[i][0], data[i][1]-data[i-1][1]))
-    return rv
-
-def from_items(lst):
-    rv = {}
-    for k, v in lst:
-        rv[k] = v
-    return rv
-
-def as_seconds(dt):
-    return dt.days*24*60*60.0 + dt.seconds + dt.microseconds/1000000.0
-
-def as_minutes(dt):
-    return dt.days*24*60.0 + (dt.seconds + dt.microseconds/1000000.0)/60.0
- 
-def completion_bar(seq, length=None):
-    if length is None: length = len(seq)
-    length = float(length)
-    hashes = 0.0
-    for i, x in izip(count(), seq):
-        while i/length > hashes / 80.0:
-            sys.stderr.write('#')
-            sys.stderr.flush()
-            hashes += 1
-        yield x
-    while hashes < 80.0:
-        sys.stderr.write('#')
-        hashes += 1
-    sys.stderr.write('\n')
-
-def strptime(s):
-    return datetime.datetime(*time.strptime(s, '%Y-%m-%d %H:%M:%S')[:6])
)
)
merger 0.0 (
hunk ./parse_tools.py 717
-        rv.append((x, pairs[-1][1]))
+        rv.append((x, rv[-1][1]))
merger 0.0 (
hunk ./parse_tools.py 717
-a        rv.append((x, pairs[-1][1]))
+        rv.append((x, pairs[-1][1]))
merger 0.0 (
hunk ./parse_tools.py 716
+        if len(rv) and (x,n) == rv[-1]: continue
+a        rv.append((x, pairs[-1][1]))
hunk ./parse_tools.py 715
-        n += y*100.0/total
+        n += y*100.0*scale
)
)
)
)
Please report this to bugs at darcs.net
If possible include the output of 'darcs --exact-version'.
------------------------------------------------------------------------

----------
messages: 726
nosy: agthorr, droundy, tommy
status: unread
title: bug in darcs

____________________________________
Darcs issue tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue194>
____________________________________




More information about the darcs-devel mailing list