Mercurial > hg
comparison mercurial/copies.py @ 18135:a6fe1b9cc68f
copies: make debug messages more sensible
The -> in debug messages is currently overloaded to mean both source to dest
and dest to source. To fix this, we add explicit labels and make the arrow
direction consistent.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 26 Dec 2012 15:03:58 -0800 |
parents | 6c35b53cd28b |
children | f23dea2b296e |
comparison
equal
deleted
inserted
replaced
18134:6c35b53cd28b | 18135:a6fe1b9cc68f |
---|---|
316 note += "*" | 316 note += "*" |
317 if f in diverge2: | 317 if f in diverge2: |
318 note += "!" | 318 note += "!" |
319 if f in renamedelete2: | 319 if f in renamedelete2: |
320 note += "%" | 320 note += "%" |
321 repo.ui.debug(" %s -> %s %s\n" % (f, fullcopy[f], note)) | 321 repo.ui.debug(" src: '%s' -> dst: '%s' %s\n" % (fullcopy[f], f, |
322 note)) | |
322 del diverge2 | 323 del diverge2 |
323 | 324 |
324 if not fullcopy: | 325 if not fullcopy: |
325 return copy, movewithdir, diverge, renamedelete | 326 return copy, movewithdir, diverge, renamedelete |
326 | 327 |
360 | 361 |
361 if not dirmove: | 362 if not dirmove: |
362 return copy, movewithdir, diverge, renamedelete | 363 return copy, movewithdir, diverge, renamedelete |
363 | 364 |
364 for d in dirmove: | 365 for d in dirmove: |
365 repo.ui.debug(" dir %s -> %s\n" % (d, dirmove[d])) | 366 repo.ui.debug(" discovered dir src: '%s' -> dst: '%s'\n" % |
367 (d, dirmove[d])) | |
366 | 368 |
367 # check unaccounted nonoverlapping files against directory moves | 369 # check unaccounted nonoverlapping files against directory moves |
368 for f in u1 + u2: | 370 for f in u1 + u2: |
369 if f not in fullcopy: | 371 if f not in fullcopy: |
370 for d in dirmove: | 372 for d in dirmove: |
371 if f.startswith(d): | 373 if f.startswith(d): |
372 # new file added in a directory that was moved, move it | 374 # new file added in a directory that was moved, move it |
373 df = dirmove[d] + f[len(d):] | 375 df = dirmove[d] + f[len(d):] |
374 if df not in copy: | 376 if df not in copy: |
375 movewithdir[f] = df | 377 movewithdir[f] = df |
376 repo.ui.debug(" file %s -> %s\n" % (f, df)) | 378 repo.ui.debug((" pending file src: '%s' -> " |
379 "dst: '%s'\n") % (f, df)) | |
377 break | 380 break |
378 | 381 |
379 return copy, movewithdir, diverge, renamedelete | 382 return copy, movewithdir, diverge, renamedelete |