mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 04:43:19 +03:00
Bail on attempts to do an empty commit
This commit is contained in:
parent
33b3059287
commit
34f1196e86
@ -298,8 +298,6 @@ class localrepository:
|
||||
self.join("undo"))
|
||||
|
||||
def commit(self, parent, update = None, text = ""):
|
||||
tr = self.transaction()
|
||||
|
||||
try:
|
||||
remove = [ l[:-1] for l in self.opener("to-remove") ]
|
||||
os.unlink(self.join("to-remove"))
|
||||
@ -310,6 +308,12 @@ class localrepository:
|
||||
if update == None:
|
||||
update = self.diffdir(self.root, parent)[0]
|
||||
|
||||
if not update:
|
||||
self.ui.status("nothing changed\n")
|
||||
return
|
||||
|
||||
tr = self.transaction()
|
||||
|
||||
# check in files
|
||||
new = {}
|
||||
linkrev = self.changelog.count()
|
||||
|
Loading…
Reference in New Issue
Block a user