hg-evolve / topic confilct ?

Craig Ozancin c.ozancin at gmail.com
Sun Jun 9 16:20:26 UTC 2019


I decided to experiment with the topic extension that comes with hg-evolve.
The online documentation on topic looks great. The idea of a branch that
goes away when its content are published sounds ideal for development /
feature branches. I tried some of the examples and it work well. I then
decided to try it with a test copy of my development environment.
Unfortunately things did not behave as expected. It appears that topic is
disabling some of the expected behavior of hg-evolution that I use
regularly. I created a small bash script that demonstrates what I am seeing:

#! /usr/bin/env bash

set -x

rm -rf a b
hg init a
hg clone a b
cd a
echo -e "[phases]\npublish = false\n" >> .hg/hgrc
cd ../b
echo -e "[phases]\npublish = false\n" >> .hg/hgrc
cd ../a

echo "line 1" >> file
echo "line 2" >> file
hg commit -A -m "first commit"
echo "line 3" >> file
hg commit -A -m "second commit"

cd ../b

hg pull --update --rebase

echo "line 4" >> file

hg amend
hg push


When I run the script with topic disabled, I get the follow output:

+ rm -rf a b
+ hg init a
+ hg clone a b
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ cd a
+ echo -e '[phases]\npublish = false\n'
+ cd ../b
+ echo -e '[phases]\npublish = false\n'
+ cd ../a
+ echo 'line 1'
+ echo 'line 2'
+ hg commit -A -m 'first commit'
adding file
+ echo 'line 3'
+ hg commit -A -m 'second commit'
+ cd ../b
+ hg pull --update --rebase
pulling from /home/cozancin/test/a
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files
new changesets 57793a679f5d:f0e6b3cc3e6e (2 drafts)
nothing to rebase - updating instead
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ echo 'line 4'
+ hg amend
+ hg push
pushing to /home/cozancin/test/a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
1 new obsolescence markers
obsoleted 1 changesets

Everything works as expected. However, if i enable topic I get the
following issue:

+ rm -rf a b
+ hg init a
+ hg clone a b
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ cd a
+ echo -e '[phases]\npublish = false\n'
+ cd ../b
+ echo -e '[phases]\npublish = false\n'
+ cd ../a
+ echo 'line 1'
+ echo 'line 2'
+ hg commit -A -m 'first commit'
adding file
+ echo 'line 3'
+ hg commit -A -m 'second commit'
+ cd ../b
+ hg pull --update --rebase
pulling from /home/cozancin/test/a
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files
new changesets cfc44d1cf93b:a5631dde7149 (2 drafts)
nothing to rebase - updating instead
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ echo 'line 4'
+ hg amend
+ hg push
pushing to /home/cozancin/test/a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
1 new obsolescence markers
transaction abort!
rollback completed
abort: push create a new head on branch "default"

Is this a bug or a change in hg-evolve when the topic extension is enabled?

Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/evolve-testers/attachments/20190609/d8126d92/attachment.html>


More information about the Evolve-testers mailing list