spectral added a comment.

  In https://phab.mercurial-scm.org/D3209#51512, @quark wrote:
  
  > Returning 1 is actually more consistent with other core commands like pull, 
push, commit. See 
https://www.mercurial-scm.org/pipermail/mercurial-devel/2012-January/037711.html.
 Scripts should be updated to use `$?` explicitly.
  
  
  I'm not sure how scripts can be updated to use $? explicitly.  Mercurial 
exits 1 in many situations:
  
  - nothing found
  - hg verify, if there's any problems
  - unresolved conflicts when updating/rebasing/whatever
  - histedit 'edit' seems to dump you back into a terminal with exit status 1
  - MQ seems to use it a lot
  - I think a few others?
  
  Yes, none of these apply to `hg amend`, so doing something like `hg amend; [[ 
$? -eq 1 ]] && hg evolve -a` is feasible, but again, feels really weird and 
non-discoverable. :/
  
  I also see a few cases that return 2, mostly in MQ stuff (though there is one 
case in test-bookmarks-pushpull.t that's a little odd).  There's obviously the 
"255" return whenever there's a major problem.
  
  I'm not too tied to the patch and can abandon it if people feel it's 
incorrect.

REPOSITORY
  rHG Mercurial

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

To: spectral, #hg-reviewers
Cc: quark, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to