Commit f2bc5833 authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

git_handler: detect and warn should history diverge

parent 67db7a10609a
Pipeline #24244 failed with stages
in 2 minutes and 12 seconds
......@@ -218,6 +218,11 @@
# FILE LOAD AND SAVE METHODS
def map_set(self, gitsha, hgsha):
if gitsha in self._map_git and self._map_git[gitsha] != hgsha:
self.ui.warn(b'warning: overwriting mapped git commit!\n')
if hgsha in self._map_hg and self._map_hg[hgsha] != gitsha:
self.ui.warn(b'warning: overwriting mapped mercurial commit!\n')
self._map_git[gitsha] = hgsha
self._map_hg[hgsha] = gitsha
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment