D6115: unamend: added match as argument for scmutil.movedirstate

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Mar 13 00:56:54 EDT 2019


martinvonz added a comment.


  In https://phab.mercurial-scm.org/D6115#89208, @taapas1128 wrote:
  
  > Earlier it didn't but now it can I suppose it should after the modification.
  
  
  The `@command` decorator defines what arguments that command accepts. In this case, it's an empty list (on line 167), which means it accepts no arguments.
  
  > Is there supposed to be any other way to verify it ?
  
  You can simply run the command and see how it works. If you're in the root of the hg repo, just try this:
  
    $ ./hg unamend foo
    hg unamend: invalid arguments
    hg unamend
    
    undo the most recent amend operation on a current changeset
    
    (use 'hg unamend -h' to show more help)
  
  
  
  > (the tests pass successfully)
  
  I haven't checked, but I assume there are no tests for `hg unamend <file>` (or if there are, it still fails with the error I showed above).

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6115

To: taapas1128, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list