[Commented On] D9554: diff: add --from and --to flags as clearer alternative to -r -r

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Sat Dec 19 01:31:02 UTC 2020


mharbison72 added a comment.


  In D9554#145175 <https://phab.mercurial-scm.org/D9554#145175>, @martinvonz wrote:
  
  > In D9554#145074 <https://phab.mercurial-scm.org/D9554#145074>, @pulkit wrote:
  >
  >> In D9554#145072 <https://phab.mercurial-scm.org/D9554#145072>, @martinvonz wrote:
  >>
  >>> In D9554#145030 <https://phab.mercurial-scm.org/D9554#145030>, @pulkit wrote:
  >>>
  >>>> IIUC, this one was pushed. We should abandon it.
  >>>
  >>> This is for `hg diff`. I think you're thinking of the same thing for `hg status`. I haven't written a patch for that.
  >>
  >> I mean this patch was pushed as 64292addbe67bf4f089704cfcaf868aba7a5443b <https://phab.mercurial-scm.org/rHG64292addbe67bf4f089704cfcaf868aba7a5443b>. It seems somehow the commit message got trimmed which led to this differential not closing automatically.
  >
  > Haha, I bet the answer to the "somehow" is that the next line started with "diff --" ("diff --from ." to be specific). It feels like there must be a more modern solution. @mharbison72: Does your `hg phabimport` solve the problem (by getting more structured data from the server)?
  
  I think you're correct, and sadly, no- `hg phabimport` doesn't help because it seems that the core import functionality isn't capable of handling this.  I read the patch to a file, ran `hg import $patch`, and got the same result.  (In fact, it unhid the original import I had, which momentarily confused me.)  IDK if there are more options that we can/should throw at the core import (internally).  It should always be a git patch that is stuffed into the phab metadata, and since this wasn't updated by the commit, you can `hg phabread` it and see that it is correct.  But the import machinery truncates there.  I'm a little surprised that it didn't complain that it didn't know what `--from` meant.
  
  This is the second time this has happened in the last couple of weeks, so I think we should probably figure out how to address it.  (IDR which was the original where it happened, but the commit update may have changed the diff such that it doesn't have the original state now.)

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D9554/new/

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

To: martinvonz, #hg-reviewers, mharbison72, pulkit
Cc: Alphare, pulkit, mharbison72, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20201219/b6660902/attachment-0002.html>


More information about the Mercurial-patches mailing list