mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
graft: give helpful warning for empty grafts
It was just showing a status message with the internal revision number. Instead, show a warning like note: graft of 27:3aaa8b6725f0 "28" created no changes to commit (message tweaked in-flight by mpm)
This commit is contained in:
parent
d138d31de7
commit
5877ceecfe
@ -3495,7 +3495,8 @@ def graft(ui, repo, *revs, **opts):
|
||||
node = repo.commit(text=message, user=user,
|
||||
date=date, extra=extra, editor=editor)
|
||||
if node is None:
|
||||
ui.status(_('graft for revision %s is empty\n') % ctx.rev())
|
||||
ui.warn(_('note: graft of %s created no changes to commit\n') %
|
||||
desc)
|
||||
finally:
|
||||
wlock.release()
|
||||
|
||||
|
@ -717,3 +717,4 @@ Empty graft
|
||||
$ hg tag -f something
|
||||
$ hg graft -qr 27
|
||||
$ hg graft -qf 27
|
||||
note: graft of 27:3aaa8b6725f0 "28" created no changes to commit
|
||||
|
Loading…
Reference in New Issue
Block a user