Handle conflicts with origin other than merge
Opened this issue · 4 comments
hdpoliveira commented
The extension handles correctly conflicts coming from the merge and shelve/unshelve commands:
- merge
hg init
echo a > newfile
hg add newfile
hg commit -m 1
echo b >> newfile
hg commit -m 2
hg update .^
echo c >> newfile
hg commit -m 3
hg merge
- shelve/unshelve (can be done completely via extension)
hg init
echo a > newfile
hg add newfile
hg commit -m 1
echo b >> newfile
hg commit -m 2
hg update .^
echo c >> newfile
hg shelve
hg update tip
hg unshelve
However, the following are not signaled as conflicts:
- rebase
hg init
echo a > newfile
hg add newfile
hg commit -m 1
echo b >> newfile
hg commit -m 2
hg update .^
echo c >> newfile
hg commit -m 3
hg rebase
- update (needs evolve to be enabled)
hg init
echo a > newfile
hg add newfile
hg commit -m 1
echo b >> newfile
hg commit -m 2
hg update .^
echo c >> newfile
hg update tip
hdpoliveira commented
I'm taking a look at mercurial code to understand how it knows if a rebase is in place.
Code calls API 'addunfinished' (since v5.1) to register state files, under .hg directory.
- Histedit extension: .hg/histedit-state
- Rebase extension: .hg/rebasestate
- Graft extension: .hg/graftstate
- Transplant extension: .hg/transplant/journal
- Unshelve: .hg/shelvedstate
- Update: .hg/updatestate
- Bisect: .hg/bisect.state
- Merge: None
hdpoliveira commented
This is very useful for us to detect when abort/continue command can be run.
xorz57 commented
I am having trouble getting Visual Studio Code to work as a merge tool.
Here is my .hgrc
[ui]
username = George Fotopoulos <xorzfiveseven@gmail.com>
merge = code
[merge-tools]
code.priority = 100
code.gui = False
code.executable = code
code.args = --wait --merge $local $other $base $output
vimdiff.priority = 80
vimdiff.gui = False
vimdiff.executable = vim
vimdiff.args = -d $base $local $output $other +close +close
[extensions]
histedit =
rebase =
strip =
purge =
@hdpoliveira what is yours?
hdpoliveira commented
Hi @xorz57 ,
I recently noticed this feature stopped working as well. I'm not sure at what version of vscode it got broken