Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 23481:94091ab9d112
addremove: restore the relative path printing when files are named
This fixes the previously mentioned issue with 3778884197f0, and undoes its
corresponding test change.
The test change demonstrates the correctness when a file is specified (i.e. the
glob is required on Windows because relative paths use '\' and absolute paths
use '/'). It is admittedly very subtle, but there will be a more robust test in
the addremove -S v3 series.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 04 Dec 2014 23:08:27 -0500 |
parents | 3778884197f0 |
children | 891aaa7c0c70 |
comparison
equal
deleted
inserted
replaced
23480:88d2d77eb981 | 23481:94091ab9d112 |
---|---|
728 unknownset = set(unknown + forgotten) | 728 unknownset = set(unknown + forgotten) |
729 toprint = unknownset.copy() | 729 toprint = unknownset.copy() |
730 toprint.update(deleted) | 730 toprint.update(deleted) |
731 for abs in sorted(toprint): | 731 for abs in sorted(toprint): |
732 if repo.ui.verbose or not m.exact(abs): | 732 if repo.ui.verbose or not m.exact(abs): |
733 rel = m.rel(abs) | |
734 if abs in unknownset: | 733 if abs in unknownset: |
735 status = _('adding %s\n') % ((m.anypats() and rel) or abs) | 734 status = _('adding %s\n') % m.uipath(abs) |
736 else: | 735 else: |
737 status = _('removing %s\n') % ((m.anypats() and rel) or abs) | 736 status = _('removing %s\n') % m.uipath(abs) |
738 repo.ui.status(status) | 737 repo.ui.status(status) |
739 | 738 |
740 renames = _findrenames(repo, m, added + unknown, removed + deleted, | 739 renames = _findrenames(repo, m, added + unknown, removed + deleted, |
741 similarity) | 740 similarity) |
742 | 741 |