comparison tests/test-remotefilelog-local.t @ 45812:976b26bdd0d8

commit: warn the user when a commit already exists Sometimes, a commit will result in an exact match of a preexisting commit, and if that commit isn't a branch head, hg will incorrectly note that it created a new head. Instead, we should warn the user that commit already existed in the repository. In practice, this bug is rather uncommon, and will only occur when the usr explicitly sets the date. Please note that this commit contains an API change to cmdutil.commitstatus() Differential Revision: https://phab.mercurial-scm.org/D9257
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Thu, 29 Oct 2020 13:54:25 +0100
parents 5c2a4f37eace
children 47a9527731c3
comparison
equal deleted inserted replaced
45811:4404f129341e 45812:976b26bdd0d8
202 $ hg log -r . -T '{node}\n' 202 $ hg log -r . -T '{node}\n'
203 383ce605500277f879b7460a16ba620eb6930b7f 203 383ce605500277f879b7460a16ba620eb6930b7f
204 $ hg update -r '.^' -q 204 $ hg update -r '.^' -q
205 $ echo 1 > A 205 $ echo 1 > A
206 $ hg commit -m foo -A A 206 $ hg commit -m foo -A A
207 warning: commit already existed in the repository!
207 $ hg log -r . -T '{node}\n' 208 $ hg log -r . -T '{node}\n'
208 383ce605500277f879b7460a16ba620eb6930b7f 209 383ce605500277f879b7460a16ba620eb6930b7f