graft/rebase without changing the hash

Dr. Arne Babenhauserheide arne_bab at web.de
Sat Nov 26 12:44:22 UTC 2022


Hi Uwe,

Uwe Brauer <oub at mat.ucm.es> writes:

> [[S/MIME Signed Part:Good signature from D472940B79E53E815167CEC95E244FB27DD2E8DB /CN=BRAUER UWE RICHARD OTTO - X2064123B/C=ES/SN=BRAUER/GN=UWE RICHARD OTTO/SerialNumber=IDCES-X2064123B (trust undefined)]]
> Is there any possibility to graft/rebase a change set from say the
> default branch to another named branch, say main, *without* changing the
> hash?

No, because the branch name is part of the hash calculation.

> I can rebase them, (with or without evolve enabled) but the rebased changeset
> gets a new hash which means that if I push it, it will confuse git
> users.

It sounds like what you want is to have the resulting git-hash equal,
not to have the Mercurial-hash equal. This could in theory be possible
(because the branch name is not part of the hash-generation in git), but
I do not know whether it is possible in practice.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1125 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20221126/691a6847/attachment-0001.asc>


More information about the Mercurial mailing list