The given config option i.e. rewrite.update-timestamp updates date to current when True. However when only date is to be updated to current with the working directory clean and no other attributes changing then it does not amend as stated in issue 5828. Further when --date flag is specified along with the new config option then --date is given priority over the config option.
Details
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
mercurial/cmdutil.py | ||
---|---|---|
2548 | If you move this change after the if statement at line 2565 on this side and drop changes to that if, it should work, right? |
I overlooked that, thanks for pointing.
test-check-code.t and test-check-commit.t says hi!
Also, the test output is flaky since dateutil.makedate() returns time.time() which always changes, this also leads to hash being changed in test output. You should glob time and hash I think.
test-amend.t has two cases namely obsstore-on and obsstore-off. Output of both should be updated. You can do #if obsstore-on else endif kind of thing which is done in rest of the test.
Also, please run all the tests.
mercurial/cmdutil.py | ||
---|---|---|
2445 | Let's move the date changing logic here, it will be cleaner. |
@pulkit dealt with test-check-code.t and test-check-commit.t . And dealt with test-amend.t by making mockmakedate() as in test-journal.t . I have run all the tests. Please review.
Nice work! Can you update description of this patch with details in commit message about behavior of the new config option and how it solves the given issue?
Thanks for queueing. I will make the follow up patch for the inline comments that will make it more concise.
Let's move the date changing logic here, it will be cleaner.