warn when commit -m argument is omitted

Bug #73073 reported by Martin Pool
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Wishlist
Gioele Barabucci

Bug Description

On 23/11/2006, at 2:54 AM, Matthew Hannigan wrote:

For what it's worth, svn detects this; it won't commit
(unless forced) if the message is also a file name:

 $ svn commit -m blah.txt
 svn: The log message is a pathname (was -F intended?);
  use '--force-log' to override

Hacky but it's saved me a few times.

Tags: ui

Related branches

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Wishlist
Revision history for this message
Martin Pool (mbp) wrote :

Because it's safe and easy to uncommit in bzr this is less serious than in svn. We could just give a warning.

Jelmer Vernooij (jelmer)
Changed in bzr:
status: Unconfirmed → Confirmed
Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
Andrew Bennetts (spiv) wrote :

Gioele: thanks very much for working on this. You asked for feedback on your branch on IRC, here it is:

Minor style issues:
  * Use 'warning' rather than 'trace.warning' to be consistent with the rest of that file (that file already does "from bzrlib.trace import warning")
  * No semicolon after "return 1;"

More importantly:
  * Use osutils.lexists rather than os.path.exists. This will return True for broken symlinks (on platforms that have them), unlike os.path.exists.
  * This code ought to have a blackbox test, or possibly two (one for the interactive case, one for the non-interactive case).

Oh, and you should add an entry to the NEWS file (probably under "Improvements") to give yourself some credit for fixing this :)

Finally, you'll need to sign Canonical's contributor agreement: <http://www.canonical.com/contributors>

If you get stuck on anything, let me know and I'll be glad to help or finish this off for you. Otherwise I look forward to seeing a merge proposal for this branch in the near future!

Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → Gioele Barabucci (gioele)
status: In Progress → Fix Committed
milestone: none → 2.1.0b4
Vincent Ladeuil (vila)
Changed in bzr:
status: Fix Committed → Fix Released
Revision history for this message
Alexander Belchenko (bialix) wrote :

See bug: https://bugs.launchpad.net/bzr/+bug/570251

I think this message should not be shown for directories. E.g. bzr ci -m foo (when foo is directory) should not trigger any warnings.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.