mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
pushto: abort with nice message if push would have no effect
This commit is contained in:
parent
5fbd0652a5
commit
eb7e17b93e
@ -218,6 +218,8 @@ def expushdiscoverybookmarks(pushop):
|
||||
raise util.Abort('remote bookmark revision is not in local repo; '
|
||||
'will not push without --force. '
|
||||
'Do you need to pull and rebase?')
|
||||
if repo[old] == repo[rev]:
|
||||
raise util.Abort('remote bookmark already points at rev')
|
||||
if not repo[old].descendant(repo[rev]):
|
||||
raise util.Abort('pushed rev is not a descendant of remote '
|
||||
'bookmark, will not push without --force')
|
||||
|
Loading…
Reference in New Issue
Block a user