mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
pull: don't suggest running hg merge when new heads are on different branches
After a pull when new heads are added but no head is added on the current branch, the "run 'hg merge'" message can be misleading. This patch doesn't output the merge message in that scenario.
This commit is contained in:
parent
aee30b7a2e
commit
87ae31d662
@ -2989,7 +2989,10 @@ def postincoming(ui, repo, modheads, optupdate, checkout):
|
||||
else:
|
||||
ui.status(_("not updating, since new heads added\n"))
|
||||
if modheads > 1:
|
||||
ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))
|
||||
if (len(repo.branchheads()) > 1):
|
||||
ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))
|
||||
else:
|
||||
ui.status(_("(run 'hg heads' to see heads)\n"))
|
||||
else:
|
||||
ui.status(_("(run 'hg update' to get a working copy)\n"))
|
||||
|
||||
|
@ -134,3 +134,30 @@ Should succeed because there is only one head on our branch:
|
||||
not updating, since new heads added
|
||||
(run 'hg heads' to see heads, 'hg merge' to merge)
|
||||
|
||||
Make changes on new branch on tt
|
||||
|
||||
$ hg branch branchC
|
||||
marked working directory as branch branchC
|
||||
$ echo b1 > bar
|
||||
$ hg ci -Am "commit on branchC"
|
||||
adding bar
|
||||
|
||||
Make changes on default branch on t
|
||||
|
||||
$ cd ../t
|
||||
$ hg up -C default
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ echo a1 > bar
|
||||
$ hg ci -Am "commit on default"
|
||||
adding bar
|
||||
|
||||
Pull branchC from tt
|
||||
|
||||
$ hg pull ../tt
|
||||
pulling from ../tt
|
||||
searching for changes
|
||||
adding changesets
|
||||
adding manifests
|
||||
adding file changes
|
||||
added 1 changesets with 1 changes to 1 files (+1 heads)
|
||||
(run 'hg heads' to see heads)
|
||||
|
Loading…
Reference in New Issue
Block a user