pulkit added a comment.

  (Replying because I adviced Zharas to take up this issue and he is a new 
mercurial user and have less context on the problem)
  
  In https://phab.mercurial-scm.org/D4876#74017, @martinvonz wrote:
  
  > I'm not sure how I feel about this. I think we talked within the team at 
Google about always passing a `-D now` and decided not to do it because of the 
issue you're fixing here (I may be confusing the discussion with one about 
using `hg metaedit`). Still, I feel like this patch is a workaround for the 
real problem. I assume that the real problem is that there the date is not 
normally updated when you amend a commit (i.e. you want to always pass `-D 
now`, not a specific other timestamp). If that's the problem we're trying 
address, should we instead introduce a config called something like 
`amend.updatetimestamp` that makes it update the timestamp to the current time? 
That would naturally not update the timestamp if the timestamp was the only 
thing that changed (just like this patch does it). The natural generalization 
of `amend.updatetimestamp` is something like `rewrite.updatetimestamp` that 
would be respected by amend, histedit, rebase, etc.
  >
  > What do you think? Is that the use case you're trying to address with this 
patch?
  
  
  I agree that the real problem is amend not updating the timestamp. People 
have aliased `amend` to `amend -D now` or just like you said, they always pass 
`-D now`. In such cases, even if the working directory is not changed, we end 
up creating a new commit with just date change. This patch tries to solve the 
problem of creating a new commit when only date has changed for people who do 
`amend -D now` always by preventing that if the config option is turned on.
  
  I like your idea of having a config option which is respected by all the 
commands.
  
  That said, will you like to see a v2 of this patch with inline comments 
addressed or we abandon this idea in favour of proposed config option to change 
the date.

INLINE COMMENTS

> martinvonz wrote in configitems.py:440-442
> "amend.dateonly" sounds like it only updates the date. Maybe 
> "amend.skipdateonly" or "amend.nodateonly"? It doesn't matter much because 
> we'll need to update it anyway later if we drop the "experimental" label.

"amend.skipdateonly" sounds good.

REPOSITORY
  rHG Mercurial

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

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

Reply via email to