bzr ci -m "": error should be generated earlier
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
C:\Temp>bzr init 1
Created a standalone tree (format: 1.9)
C:\Temp\1>bzr mkdir foo bar spam eggs meat fish cheese juice tea coffee
added foo
added bar
added spam
added eggs
added meat
added fish
added cheese
added juice
added tea
added coffee
C:\Temp\1>bzr ci -m ""
Committing to: C:/Temp/1/
added bar
added cheese
added coffee
added eggs
added fish
added foo
added juice
added meat
added spam
added tea
aborting commit write group: BzrCommandError
bzr: ERROR: empty commit message specified
I don't think that listing files/directories intended to be committed *before* generating "ERROR: empty commit message specified" is good for users, cause it creates (wrong?) assumption that bzr do the commit.
It should be relatively easy to fix with earlier check in the command class, IMO.
Related branches
- Jelmer Vernooij (community): Approve
- Paul Stewart (community): Needs Resubmitting
-
Diff: 30 lines (+8/-2)2 files modifiedbzrlib/builtins.py (+4/-1)
bzrlib/tests/blackbox/test_commit.py (+4/-1)
The same behavior if user supply empty file with commit message:
C:\Temp\1>bzr ci -F NUL (empty commit message specified)
Committing to: C:/Temp/1/
added bar
added cheese
added coffee
added eggs
added fish
added foo
added juice
added meat
added spam
added tea
aborting commit write group: BzrCommandError
bzr: ERROR: empty commit message specified
C:\Temp\1>touch message.txt
C:\Temp\1>bzr ci -F message.txt (empty commit message specified)
Committing to: C:/Temp/1/
added bar
added cheese
added coffee
added eggs
added fish
added foo
added juice
added meat
added spam
added tea
aborting commit write group: BzrCommandError
bzr: ERROR: empty commit message specified