# HG changeset patch # User Sushil khanchi # Date 1552139734 -19800 # Node ID a6bdb02a19021b77c224b93c8fd7d1936bbed102 # Parent da2fdaa3d97cf1654b8c454a14b508e2802415fd evolve: warn user if cset desc is being lost In public divergence when merging results in same as public cset, we only create markers to solve the divergence i.e. [(public, (other,))] In this case if other cset had a desc which was different from public that will be lost. So this print out a warning message to user that desc of non-public cset is being lost. Changes in test files reflect the added behaviour. diff -r da2fdaa3d97c -r a6bdb02a1902 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Sun Mar 10 18:00:08 2019 +0100 +++ b/hgext3rd/evolve/evolvecmd.py Sat Mar 09 19:25:34 2019 +0530 @@ -582,6 +582,11 @@ # check if node to be committed has changes same as public one s = publicdiv.status() if not (s.added or s.removed or s.deleted or s.modified): + # warn user if metadata is being lost + if otherdiv.description() != publicdiv.description(): + msg = _('content-divergent changesets differ by descriptions ' + 'only, discarding %s\n') % str(otherdiv) + repo.ui.warn(msg) # no changes, create markers to resolve divergence obsolete.createmarkers(repo, [(otherdiv, (publicdiv,))], operation='evolve') diff -r da2fdaa3d97c -r a6bdb02a1902 tests/test-evolve-public-content-divergent.t --- a/tests/test-evolve-public-content-divergent.t Sun Mar 10 18:00:08 2019 +0100 +++ b/tests/test-evolve-public-content-divergent.t Sat Mar 09 19:25:34 2019 +0530 @@ -867,6 +867,7 @@ base: [2] added c merging "other" content-divergent changeset '90522bccf499' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + content-divergent changesets differ by descriptions only, discarding 90522bccf499 $ hg evolve -l @@ -962,6 +963,7 @@ updating to "local" side of the conflict: e800202333a4 merging "other" content-divergent changeset 'ae3429430ef1' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + content-divergent changesets differ by descriptions only, discarding ae3429430ef1 $ hg evolve -l @@ -1069,6 +1071,7 @@ continue: hg evolve --continue $ hg evolve --continue + content-divergent changesets differ by descriptions only, discarding 229da2719b19 working directory is now at f7c1071f1e7c $ hg evolve -l @@ -1176,6 +1179,7 @@ updating to "local" side of the conflict: e800202333a4 merging "other" content-divergent changeset 'bc309da55b88' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + content-divergent changesets differ by descriptions only, discarding bc309da55b88 working directory is now at e800202333a4 $ hg evolve -l @@ -1281,6 +1285,7 @@ continue: hg evolve --continue $ hg evolve --continue + content-divergent changesets differ by descriptions only, discarding a5bbf2042450 working directory is now at e800202333a4 $ hg evolve -l @@ -1400,6 +1405,7 @@ continue: hg evolve --continue $ hg evolve --continue + content-divergent changesets differ by descriptions only, discarding 09054d1f3c97 working directory is now at e800202333a4 $ hg evolve -l