comparison mercurial/copies.py @ 18355:2330d97e7707

copies: make the loss in _backwardcopies more stable A couple of tests shows slightly more correct output. That is pure coincidence.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 15 Jan 2013 02:59:12 +0100
parents f23dea2b296e
children 5a4f220fbfca
comparison
equal deleted inserted replaced
18354:cf5c76017e11 18355:2330d97e7707
149 # Even though we're not taking copies into account, 1:n rename situations 149 # Even though we're not taking copies into account, 1:n rename situations
150 # can still exist (e.g. hg cp a b; hg mv a c). In those cases we 150 # can still exist (e.g. hg cp a b; hg mv a c). In those cases we
151 # arbitrarily pick one of the renames. 151 # arbitrarily pick one of the renames.
152 f = _forwardcopies(b, a) 152 f = _forwardcopies(b, a)
153 r = {} 153 r = {}
154 for k, v in f.iteritems(): 154 for k, v in sorted(f.iteritems()):
155 # remove copies 155 # remove copies
156 if v in a: 156 if v in a:
157 continue 157 continue
158 r[v] = k 158 r[v] = k
159 return r 159 return r