##// END OF EJS Templates
addremove: use uipathfn instead of m.rel() for recorded similatity message...
Martin von Zweigbergk -
r41811:0a5a6675 default
parent child Browse files
Show More
@@ -1092,7 +1092,7 b' def addremove(repo, matcher, prefix, uip'
1092 1092 repo.ui.status(status, label=label)
1093 1093
1094 1094 renames = _findrenames(repo, m, added + unknown, removed + deleted,
1095 similarity)
1095 similarity, uipathfn)
1096 1096
1097 1097 if not dry_run:
1098 1098 _markchanges(repo, unknown + forgotten, deleted, renames)
@@ -1121,8 +1121,12 b' def marktouched(repo, files, similarity='
1121 1121 status = _('removing %s\n') % abs
1122 1122 repo.ui.status(status)
1123 1123
1124 # TODO: We should probably have the caller pass in uipathfn and apply it to
1125 # the messages above too. forcerelativevalue=True is consistent with how
1126 # it used to work.
1127 uipathfn = getuipathfn(repo, forcerelativevalue=True)
1124 1128 renames = _findrenames(repo, m, added + unknown, removed + deleted,
1125 similarity)
1129 similarity, uipathfn)
1126 1130
1127 1131 _markchanges(repo, unknown + forgotten, deleted, renames)
1128 1132
@@ -1161,7 +1165,7 b' def _interestingfiles(repo, matcher):'
1161 1165
1162 1166 return added, unknown, deleted, removed, forgotten
1163 1167
1164 def _findrenames(repo, matcher, added, removed, similarity):
1168 def _findrenames(repo, matcher, added, removed, similarity, uipathfn):
1165 1169 '''Find renames from removed files to added ones.'''
1166 1170 renames = {}
1167 1171 if similarity > 0:
@@ -1171,7 +1175,7 b' def _findrenames(repo, matcher, added, r'
1171 1175 or not matcher.exact(new)):
1172 1176 repo.ui.status(_('recording removal of %s as rename to %s '
1173 1177 '(%d%% similar)\n') %
1174 (matcher.rel(old), matcher.rel(new),
1178 (uipathfn(old), uipathfn(new),
1175 1179 score * 100))
1176 1180 renames[new] = old
1177 1181 return renames
General Comments 0
You need to be logged in to leave comments. Login now