Page MenuHomePhabricator

Wrong message, when create diff with untracked changes
Closed, ResolvedPublic

Description

How to reproduce:

  1. Have a working copy with 1 untracked change in it.
  2. Run arc diff --update D1

Current error message is:

You have untracked files in this working copy.

  Working copy: /Volumes/web/project/

  Untracked changes in working copy:
  (To ignore this change, add it to "1".)
    some-file.txt

    Ignore this untracked file and continue? [y/N]

Note add it to "1" part instead add it to "svn:externals" part like in message before:

ou have untracked files in this working copy.

  Working copy: /Volumes/web/project/

  Untracked changes in working copy:
  (To ignore this change, add it to "svn:ignore".)
    some-file.txt

    Ignore this untracked file and continue? [y/N]

This happens because in ArcanistWorkflow.php (see https://secure.phabricator.com/diffusion/ARC/browse/master/src/workflow/ArcanistWorkflow.php;0b1acf0dc02af2dc554570a811c077c33b682b03$922) we're passing 2 parameters (number of changes to detect proper label and filename to add them) but we're using 1st one in the error message laster (which is number of changes) instead of 2nd one (filename to exclude).

I guess using %2$s in actual label translation (the 2 ones based on number of changes) instead of %s should do the trick.