Merge with non-conflicting uncommitted changes - again
Michal Krause
michal-hg at krause.cz
Thu May 31 14:50:05 UTC 2007
Hello,
I think life could by easier for developers if Mercurial would
allow to perform easy merging even if there are (non-conflicting)
uncommitted changes.
So I tried to implement very simple extension which makes such merging
possible. It performs following simple steps:
1) gets list of uncommitted files
2) gets list of files committed in both heads
3) if there are some files presented in both lists, reports conflict and
ends
4) performs merge
5) commits files in list from step 2
It works fine in testing environment and it seems to be functional. Of
course, this will not work in real world, because extension must get not
only files modified in heads but files modified in other changesets of
both branches too in step 2. But it probably will make this extension
slightly more complicated and my knowledge of Mercurial API is poor. So
before I dive to internals of Mercurial, I'd like to ask more
experienced developers, if this concept can work or if there are gotchas
I missed (named branches for example)?
And if this concept is applicable, what is the right way to get list of
files which will be affected by merge? Should I examine branches to find
their common parent and include all files from changesets between this
parent and heads? Or is there a easier way to find them?
Best regards
Michal Krause
More information about the Mercurial-devel
mailing list