Patchwork [STABLE] record: update help message to use operation instead of "record" (issue5432)

login
register
mail settings
Submitter Boris Feld
Date April 24, 2017, 3:41 p.m.
Message ID <208a60229f9bdf043514.1493048470@marion-duprey-portable>
Download mbox | patch
Permalink /patch/20285/
State Accepted
Headers show

Comments

Boris Feld - April 24, 2017, 3:41 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1493046804 -7200
#      Mon Apr 24 17:13:24 2017 +0200
# Branch stable
# Node ID 208a60229f9bdf04351442c7a2fd66f41b83ea3e
# Parent  0ea1d9a750da142e67690d88644ce4121ed268a1
record: update help message to use operation instead of "record" (issue5432)

Update the hunk selector help message to use the operation name instead
of using "record" for all operations. Extract the help message in the same way
as other single and multiple message line.
Update tests to make sure that both "revert" and "discard" variants are tested.
Yuya Nishihara - April 25, 2017, 2:12 p.m.
On Mon, 24 Apr 2017 17:41:10 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1493046804 -7200
> #      Mon Apr 24 17:13:24 2017 +0200
> # Branch stable
> # Node ID 208a60229f9bdf04351442c7a2fd66f41b83ea3e
> # Parent  0ea1d9a750da142e67690d88644ce4121ed268a1
> record: update help message to use operation instead of "record" (issue5432)

Looks good. Queued, thanks!
Sean Farley - April 25, 2017, 9:15 p.m.
Boris Feld <boris.feld@octobus.net> writes:

> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1493046804 -7200
> #      Mon Apr 24 17:13:24 2017 +0200
> # Branch stable
> # Node ID 208a60229f9bdf04351442c7a2fd66f41b83ea3e
> # Parent  0ea1d9a750da142e67690d88644ce4121ed268a1
> record: update help message to use operation instead of "record" (issue5432)
>
> Update the hunk selector help message to use the operation name instead
> of using "record" for all operations. Extract the help message in the same way
> as other single and multiple message line.
> Update tests to make sure that both "revert" and "discard" variants are tested.
>
> diff -r 0ea1d9a750da -r 208a60229f9b mercurial/patch.py
> --- a/mercurial/patch.py	Tue Apr 18 11:10:08 2017 -0700
> +++ b/mercurial/patch.py	Mon Apr 24 17:13:24 2017 +0200
> @@ -992,6 +992,38 @@
>              'record': _("record this change to '%s'?"),
>              'revert': _("revert this change to '%s'?"),
>          }[operation],
> +        'help': {
> +            'discard': _('[Ynesfdaq?]'
> +                      '$$ &Yes, discard this change'
> +                      '$$ &No, skip this change'
> +                      '$$ &Edit this change manually'
> +                      '$$ &Skip remaining changes to this file'
> +                      '$$ Discard remaining changes to this &file'
> +                      '$$ &Done, skip remaining changes and files'
> +                      '$$ Discard &all changes to all remaining files'
> +                      '$$ &Quit, discarding no changes'
> +                      '$$ &? (display help)'),
> +            'record': _('[Ynesfdaq?]'
> +                      '$$ &Yes, record this change'
> +                      '$$ &No, skip this change'
> +                      '$$ &Edit this change manually'
> +                      '$$ &Skip remaining changes to this file'
> +                      '$$ Record remaining changes to this &file'
> +                      '$$ &Done, skip remaining changes and files'
> +                      '$$ Record &all changes to all remaining files'
> +                      '$$ &Quit, recording no changes'
> +                      '$$ &? (display help)'),
> +            'revert': _('[Ynesfdaq?]'
> +                      '$$ &Yes, revert this change'
> +                      '$$ &No, skip this change'
> +                      '$$ &Edit this change manually'
> +                      '$$ &Skip remaining changes to this file'
> +                      '$$ Revert remaining changes to this &file'
> +                      '$$ &Done, skip remaining changes and files'
> +                      '$$ Revert &all changes to all remaining files'
> +                      '$$ &Quit, reverting no changes'
> +                      '$$ &? (display help)')

Perhaps as a follow-up (after the freeze) these could be consolidated
since they all follow the same pattern? Not a big deal, though.
Ryan McElroy - April 26, 2017, 8:59 a.m.
On 4/25/17 10:15 PM, Sean Farley wrote:
> Boris Feld <boris.feld@octobus.net> writes:
>
>> # HG changeset patch
>> # User Boris Feld <boris.feld@octobus.net>
>> # Date 1493046804 -7200
>> #      Mon Apr 24 17:13:24 2017 +0200
>> # Branch stable
>> # Node ID 208a60229f9bdf04351442c7a2fd66f41b83ea3e
>> # Parent  0ea1d9a750da142e67690d88644ce4121ed268a1
>> record: update help message to use operation instead of "record" (issue5432)
>>
>> Update the hunk selector help message to use the operation name instead
>> of using "record" for all operations. Extract the help message in the same way
>> as other single and multiple message line.
>> Update tests to make sure that both "revert" and "discard" variants are tested.
>>
>> diff -r 0ea1d9a750da -r 208a60229f9b mercurial/patch.py
>> --- a/mercurial/patch.py	Tue Apr 18 11:10:08 2017 -0700
>> +++ b/mercurial/patch.py	Mon Apr 24 17:13:24 2017 +0200
>> @@ -992,6 +992,38 @@
>>               'record': _("record this change to '%s'?"),
>>               'revert': _("revert this change to '%s'?"),
>>           }[operation],
>> +        'help': {
>> +            'discard': _('[Ynesfdaq?]'
>> +                      '$$ &Yes, discard this change'
>> +                      '$$ &No, skip this change'
>> +                      '$$ &Edit this change manually'
>> +                      '$$ &Skip remaining changes to this file'
>> +                      '$$ Discard remaining changes to this &file'
>> +                      '$$ &Done, skip remaining changes and files'
>> +                      '$$ Discard &all changes to all remaining files'
>> +                      '$$ &Quit, discarding no changes'
>> +                      '$$ &? (display help)'),
>> +            'record': _('[Ynesfdaq?]'
>> +                      '$$ &Yes, record this change'
>> +                      '$$ &No, skip this change'
>> +                      '$$ &Edit this change manually'
>> +                      '$$ &Skip remaining changes to this file'
>> +                      '$$ Record remaining changes to this &file'
>> +                      '$$ &Done, skip remaining changes and files'
>> +                      '$$ Record &all changes to all remaining files'
>> +                      '$$ &Quit, recording no changes'
>> +                      '$$ &? (display help)'),
>> +            'revert': _('[Ynesfdaq?]'
>> +                      '$$ &Yes, revert this change'
>> +                      '$$ &No, skip this change'
>> +                      '$$ &Edit this change manually'
>> +                      '$$ &Skip remaining changes to this file'
>> +                      '$$ Revert remaining changes to this &file'
>> +                      '$$ &Done, skip remaining changes and files'
>> +                      '$$ Revert &all changes to all remaining files'
>> +                      '$$ &Quit, reverting no changes'
>> +                      '$$ &? (display help)')
> Perhaps as a follow-up (after the freeze) these could be consolidated
> since they all follow the same pattern? Not a big deal, though.
>

+1 as an after-freeze clean-up.
Boris Feld - April 26, 2017, 9:41 a.m.
On 25/04/2017 23:15, Sean Farley wrote:
> Boris Feld <boris.feld@octobus.net> writes:
>
>> # HG changeset patch
>> # User Boris Feld <boris.feld@octobus.net>
>> # Date 1493046804 -7200
>> #      Mon Apr 24 17:13:24 2017 +0200
>> # Branch stable
>> # Node ID 208a60229f9bdf04351442c7a2fd66f41b83ea3e
>> # Parent  0ea1d9a750da142e67690d88644ce4121ed268a1
>> record: update help message to use operation instead of "record" (issue5432)
>>
>> Update the hunk selector help message to use the operation name instead
>> of using "record" for all operations. Extract the help message in the same way
>> as other single and multiple message line.
>> Update tests to make sure that both "revert" and "discard" variants are tested.
>>
>> diff -r 0ea1d9a750da -r 208a60229f9b mercurial/patch.py
>> --- a/mercurial/patch.py	Tue Apr 18 11:10:08 2017 -0700
>> +++ b/mercurial/patch.py	Mon Apr 24 17:13:24 2017 +0200
>> @@ -992,6 +992,38 @@
>>               'record': _("record this change to '%s'?"),
>>               'revert': _("revert this change to '%s'?"),
>>           }[operation],
>> +        'help': {
>> +            'discard': _('[Ynesfdaq?]'
>> +                      '$$ &Yes, discard this change'
>> +                      '$$ &No, skip this change'
>> +                      '$$ &Edit this change manually'
>> +                      '$$ &Skip remaining changes to this file'
>> +                      '$$ Discard remaining changes to this &file'
>> +                      '$$ &Done, skip remaining changes and files'
>> +                      '$$ Discard &all changes to all remaining files'
>> +                      '$$ &Quit, discarding no changes'
>> +                      '$$ &? (display help)'),
>> +            'record': _('[Ynesfdaq?]'
>> +                      '$$ &Yes, record this change'
>> +                      '$$ &No, skip this change'
>> +                      '$$ &Edit this change manually'
>> +                      '$$ &Skip remaining changes to this file'
>> +                      '$$ Record remaining changes to this &file'
>> +                      '$$ &Done, skip remaining changes and files'
>> +                      '$$ Record &all changes to all remaining files'
>> +                      '$$ &Quit, recording no changes'
>> +                      '$$ &? (display help)'),
>> +            'revert': _('[Ynesfdaq?]'
>> +                      '$$ &Yes, revert this change'
>> +                      '$$ &No, skip this change'
>> +                      '$$ &Edit this change manually'
>> +                      '$$ &Skip remaining changes to this file'
>> +                      '$$ Revert remaining changes to this &file'
>> +                      '$$ &Done, skip remaining changes and files'
>> +                      '$$ Revert &all changes to all remaining files'
>> +                      '$$ &Quit, reverting no changes'
>> +                      '$$ &? (display help)')
> Perhaps as a follow-up (after the freeze) these could be consolidated
> since they all follow the same pattern? Not a big deal, though.
I also think they can be consolidated in a better way, but I don't know 
which way yet. I'm not fully aware how mercurial i18n works, but I would 
be inclined to put them at the module level or perhaps in a separate 
module to defined them once, what do you think?
Yuya Nishihara - April 26, 2017, 11:42 a.m.
On Wed, 26 Apr 2017 09:59:50 +0100, Ryan McElroy wrote:
> On 4/25/17 10:15 PM, Sean Farley wrote:
> > Boris Feld <boris.feld@octobus.net> writes:
> >
> >> # HG changeset patch
> >> # User Boris Feld <boris.feld@octobus.net>
> >> # Date 1493046804 -7200
> >> #      Mon Apr 24 17:13:24 2017 +0200
> >> # Branch stable
> >> # Node ID 208a60229f9bdf04351442c7a2fd66f41b83ea3e
> >> # Parent  0ea1d9a750da142e67690d88644ce4121ed268a1
> >> record: update help message to use operation instead of "record" (issue5432)
> >>
> >> Update the hunk selector help message to use the operation name instead
> >> of using "record" for all operations. Extract the help message in the same way
> >> as other single and multiple message line.
> >> Update tests to make sure that both "revert" and "discard" variants are tested.
> >>
> >> diff -r 0ea1d9a750da -r 208a60229f9b mercurial/patch.py
> >> --- a/mercurial/patch.py	Tue Apr 18 11:10:08 2017 -0700
> >> +++ b/mercurial/patch.py	Mon Apr 24 17:13:24 2017 +0200
> >> @@ -992,6 +992,38 @@
> >>               'record': _("record this change to '%s'?"),
> >>               'revert': _("revert this change to '%s'?"),
> >>           }[operation],
> >> +        'help': {
> >> +            'discard': _('[Ynesfdaq?]'
> >> +                      '$$ &Yes, discard this change'
> >> +                      '$$ &No, skip this change'
> >> +                      '$$ &Edit this change manually'
> >> +                      '$$ &Skip remaining changes to this file'
> >> +                      '$$ Discard remaining changes to this &file'
> >> +                      '$$ &Done, skip remaining changes and files'
> >> +                      '$$ Discard &all changes to all remaining files'
> >> +                      '$$ &Quit, discarding no changes'
> >> +                      '$$ &? (display help)'),
> >> +            'record': _('[Ynesfdaq?]'
> >> +                      '$$ &Yes, record this change'
> >> +                      '$$ &No, skip this change'
> >> +                      '$$ &Edit this change manually'
> >> +                      '$$ &Skip remaining changes to this file'
> >> +                      '$$ Record remaining changes to this &file'
> >> +                      '$$ &Done, skip remaining changes and files'
> >> +                      '$$ Record &all changes to all remaining files'
> >> +                      '$$ &Quit, recording no changes'
> >> +                      '$$ &? (display help)'),
> >> +            'revert': _('[Ynesfdaq?]'
> >> +                      '$$ &Yes, revert this change'
> >> +                      '$$ &No, skip this change'
> >> +                      '$$ &Edit this change manually'
> >> +                      '$$ &Skip remaining changes to this file'
> >> +                      '$$ Revert remaining changes to this &file'
> >> +                      '$$ &Done, skip remaining changes and files'
> >> +                      '$$ Revert &all changes to all remaining files'
> >> +                      '$$ &Quit, reverting no changes'
> >> +                      '$$ &? (display help)')
> > Perhaps as a follow-up (after the freeze) these could be consolidated
> > since they all follow the same pattern? Not a big deal, though.

These messages can't be split nor be boilerplate because of translation.
Sean Farley - April 26, 2017, 6:25 p.m.
Yuya Nishihara <yuya@tcha.org> writes:

> On Wed, 26 Apr 2017 09:59:50 +0100, Ryan McElroy wrote:
>> On 4/25/17 10:15 PM, Sean Farley wrote:
>> > Boris Feld <boris.feld@octobus.net> writes:
>> >
>> >> # HG changeset patch
>> >> # User Boris Feld <boris.feld@octobus.net>
>> >> # Date 1493046804 -7200
>> >> #      Mon Apr 24 17:13:24 2017 +0200
>> >> # Branch stable
>> >> # Node ID 208a60229f9bdf04351442c7a2fd66f41b83ea3e
>> >> # Parent  0ea1d9a750da142e67690d88644ce4121ed268a1
>> >> record: update help message to use operation instead of "record" (issue5432)
>> >>
>> >> Update the hunk selector help message to use the operation name instead
>> >> of using "record" for all operations. Extract the help message in the same way
>> >> as other single and multiple message line.
>> >> Update tests to make sure that both "revert" and "discard" variants are tested.
>> >>
>> >> diff -r 0ea1d9a750da -r 208a60229f9b mercurial/patch.py
>> >> --- a/mercurial/patch.py	Tue Apr 18 11:10:08 2017 -0700
>> >> +++ b/mercurial/patch.py	Mon Apr 24 17:13:24 2017 +0200
>> >> @@ -992,6 +992,38 @@
>> >>               'record': _("record this change to '%s'?"),
>> >>               'revert': _("revert this change to '%s'?"),
>> >>           }[operation],
>> >> +        'help': {
>> >> +            'discard': _('[Ynesfdaq?]'
>> >> +                      '$$ &Yes, discard this change'
>> >> +                      '$$ &No, skip this change'
>> >> +                      '$$ &Edit this change manually'
>> >> +                      '$$ &Skip remaining changes to this file'
>> >> +                      '$$ Discard remaining changes to this &file'
>> >> +                      '$$ &Done, skip remaining changes and files'
>> >> +                      '$$ Discard &all changes to all remaining files'
>> >> +                      '$$ &Quit, discarding no changes'
>> >> +                      '$$ &? (display help)'),
>> >> +            'record': _('[Ynesfdaq?]'
>> >> +                      '$$ &Yes, record this change'
>> >> +                      '$$ &No, skip this change'
>> >> +                      '$$ &Edit this change manually'
>> >> +                      '$$ &Skip remaining changes to this file'
>> >> +                      '$$ Record remaining changes to this &file'
>> >> +                      '$$ &Done, skip remaining changes and files'
>> >> +                      '$$ Record &all changes to all remaining files'
>> >> +                      '$$ &Quit, recording no changes'
>> >> +                      '$$ &? (display help)'),
>> >> +            'revert': _('[Ynesfdaq?]'
>> >> +                      '$$ &Yes, revert this change'
>> >> +                      '$$ &No, skip this change'
>> >> +                      '$$ &Edit this change manually'
>> >> +                      '$$ &Skip remaining changes to this file'
>> >> +                      '$$ Revert remaining changes to this &file'
>> >> +                      '$$ &Done, skip remaining changes and files'
>> >> +                      '$$ Revert &all changes to all remaining files'
>> >> +                      '$$ &Quit, reverting no changes'
>> >> +                      '$$ &? (display help)')
>> > Perhaps as a follow-up (after the freeze) these could be consolidated
>> > since they all follow the same pattern? Not a big deal, though.
>
> These messages can't be split nor be boilerplate because of translation.

Can something like this be done:

_('$$ %s remaining changes to this &file') % _('Discard')?

If not, then yeah, probably not possible nor worth it.
Jun Wu - April 27, 2017, 10:27 a.m.
Excerpts from Sean Farley's message of 2017-04-26 11:25:44 -0700:
> Can something like this be done:
> 
> _('$$ %s remaining changes to this &file') % _('Discard')?
> 
> If not, then yeah, probably not possible nor worth it.

This assumes verb is before object. Not all languages are in that order [1].

[1]: https://books.google.co.uk/books?id=MWbrvUiYzSkC&pg=PA36&hl=en#v=onepage&q&f=false
Jun Wu - April 27, 2017, 10:33 a.m.
Excerpts from Jun Wu's message of 2017-04-27 03:27:25 -0700:
> Excerpts from Sean Farley's message of 2017-04-26 11:25:44 -0700:
> > Can something like this be done:
> > 
> > _('$$ %s remaining changes to this &file') % _('Discard')?
> > 
> > If not, then yeah, probably not possible nor worth it.
> 
> This assumes verb is before object. Not all languages are in that order [1].
> 
> [1]: https://books.google.co.uk/books?id=MWbrvUiYzSkC&pg=PA36&hl=en#v=onepage&q&f=false

Ah, I realize it's making the order translatable. That is smart.
Yuya Nishihara - April 27, 2017, 3:23 p.m.
On Thu, 27 Apr 2017 03:33:55 -0700, Jun Wu wrote:
> Excerpts from Jun Wu's message of 2017-04-27 03:27:25 -0700:
> > Excerpts from Sean Farley's message of 2017-04-26 11:25:44 -0700:
> > > Can something like this be done:
> > > 
> > > _('$$ %s remaining changes to this &file') % _('Discard')?
> > > 
> > > If not, then yeah, probably not possible nor worth it.

Generally no.

> > This assumes verb is before object. Not all languages are in that order [1].
> > 
> > [1]: https://books.google.co.uk/books?id=MWbrvUiYzSkC&pg=PA36&hl=en#v=onepage&q&f=false
> 
> Ah, I realize it's making the order translatable. That is smart.

Even though the order is fixable, surrounding particles may be in different
form depending on the verb, for example.
Sean Farley - April 27, 2017, 5:50 p.m.
Yuya Nishihara <yuya@tcha.org> writes:

> On Thu, 27 Apr 2017 03:33:55 -0700, Jun Wu wrote:
>> Excerpts from Jun Wu's message of 2017-04-27 03:27:25 -0700:
>> > Excerpts from Sean Farley's message of 2017-04-26 11:25:44 -0700:
>> > > Can something like this be done:
>> > > 
>> > > _('$$ %s remaining changes to this &file') % _('Discard')?
>> > > 
>> > > If not, then yeah, probably not possible nor worth it.
>
> Generally no.
>
>> > This assumes verb is before object. Not all languages are in that order [1].
>> > 
>> > [1]: https://books.google.co.uk/books?id=MWbrvUiYzSkC&pg=PA36&hl=en#v=onepage&q&f=false
>> 
>> Ah, I realize it's making the order translatable. That is smart.
>
> Even though the order is fixable, surrounding particles may be in different
> form depending on the verb, for example.

Fair enough, then I don't think there is much to do to clean this up.

Patch

diff -r 0ea1d9a750da -r 208a60229f9b mercurial/patch.py
--- a/mercurial/patch.py	Tue Apr 18 11:10:08 2017 -0700
+++ b/mercurial/patch.py	Mon Apr 24 17:13:24 2017 +0200
@@ -992,6 +992,38 @@ 
             'record': _("record this change to '%s'?"),
             'revert': _("revert this change to '%s'?"),
         }[operation],
+        'help': {
+            'discard': _('[Ynesfdaq?]'
+                      '$$ &Yes, discard this change'
+                      '$$ &No, skip this change'
+                      '$$ &Edit this change manually'
+                      '$$ &Skip remaining changes to this file'
+                      '$$ Discard remaining changes to this &file'
+                      '$$ &Done, skip remaining changes and files'
+                      '$$ Discard &all changes to all remaining files'
+                      '$$ &Quit, discarding no changes'
+                      '$$ &? (display help)'),
+            'record': _('[Ynesfdaq?]'
+                      '$$ &Yes, record this change'
+                      '$$ &No, skip this change'
+                      '$$ &Edit this change manually'
+                      '$$ &Skip remaining changes to this file'
+                      '$$ Record remaining changes to this &file'
+                      '$$ &Done, skip remaining changes and files'
+                      '$$ Record &all changes to all remaining files'
+                      '$$ &Quit, recording no changes'
+                      '$$ &? (display help)'),
+            'revert': _('[Ynesfdaq?]'
+                      '$$ &Yes, revert this change'
+                      '$$ &No, skip this change'
+                      '$$ &Edit this change manually'
+                      '$$ &Skip remaining changes to this file'
+                      '$$ Revert remaining changes to this &file'
+                      '$$ &Done, skip remaining changes and files'
+                      '$$ Revert &all changes to all remaining files'
+                      '$$ &Quit, reverting no changes'
+                      '$$ &? (display help)')
+        }[operation]
     }
 
     def prompt(skipfile, skipall, query, chunk):
@@ -1010,16 +1042,7 @@ 
         if skipfile is not None:
             return skipfile, skipfile, skipall, newpatches
         while True:
-            resps = _('[Ynesfdaq?]'
-                      '$$ &Yes, record this change'
-                      '$$ &No, skip this change'
-                      '$$ &Edit this change manually'
-                      '$$ &Skip remaining changes to this file'
-                      '$$ Record remaining changes to this &file'
-                      '$$ &Done, skip remaining changes and files'
-                      '$$ Record &all changes to all remaining files'
-                      '$$ &Quit, recording no changes'
-                      '$$ &? (display help)')
+            resps = messages['help']
             r = ui.promptchoice("%s %s" % (query, resps))
             ui.write("\n")
             if r == 8: # ?
diff -r 0ea1d9a750da -r 208a60229f9b tests/test-revert-interactive.t
--- a/tests/test-revert-interactive.t	Tue Apr 18 11:10:08 2017 -0700
+++ b/tests/test-revert-interactive.t	Mon Apr 24 17:13:24 2017 +0200
@@ -46,6 +46,7 @@ 
   > y
   > y
   > y
+  > ?
   > y
   > n
   > n
@@ -88,6 +89,17 @@ 
    3
    4
    5
+  revert change 3/6 to 'folder1/g'? [Ynesfdaq?] ?
+  
+  y - yes, revert this change
+  n - no, skip this change
+  e - edit this change manually
+  s - skip remaining changes to this file
+  f - revert remaining changes to this file
+  d - done, skip remaining changes and files
+  a - revert all changes to all remaining files
+  q - quit, reverting no changes
+  ? - ? (display help)
   revert change 3/6 to 'folder1/g'? [Ynesfdaq?] y
   
   @@ -1,5 +2,6 @@
@@ -264,6 +276,7 @@ 
   M folder1/g
   $ hg revert --interactive f << EOF
   > y
+  > ?
   > y
   > n
   > n
@@ -279,6 +292,17 @@ 
    3
    4
    5
+  discard change 1/2 to 'f'? [Ynesfdaq?] ?
+  
+  y - yes, discard this change
+  n - no, skip this change
+  e - edit this change manually
+  s - skip remaining changes to this file
+  f - discard remaining changes to this file
+  d - done, skip remaining changes and files
+  a - discard all changes to all remaining files
+  q - quit, discarding no changes
+  ? - ? (display help)
   discard change 1/2 to 'f'? [Ynesfdaq?] y
   
   @@ -2,6 +1,5 @@
@@ -436,4 +460,3 @@ 
   forget added file newfile (Yn)? y
   $ hg status
   ? newfile
-