Remind the user to add files

Bug #448310 reported by Display Name
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned
Breezy
Triaged
Wishlist
Unassigned

Bug Description

Feature request for Bazaar: when committing, ask the user if he wants to add the unknown files that appeared since last commit. These new files may indicate that the user forgot to add them, so it would be nice to confirm that. Example:

$ bzr status
unknown:
  deploy.bat

$echo "test" > new_file

$bzr commit
The following new files were not added to version control since your last commit:
  new_file
Do you want to add them now before committing? [Y/n]

summary: - Remember the user to add files
+ Remind the user to add files
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Bazaar generally avoids being interactive. I think you would generally want to be able to either add files, add them to the ignore list or ignore them altogether for the commit.

Perhaps this would be a nice feature for the bzr-interactive plugin?

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I suspect the majority of command-line users don't want this hand holding by default. If you want, you can alias commit to commit --strict.

OTOH, our GUI (Explorer) does this by showing the Unversioned files very clearly. If there are any, it suggests adding, deleting or ignoring them. Only when that's done, does it suggest committing files as the sensible next step.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 448310] Re: Remind the user to add files

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Renato Silva wrote:
> ** Summary changed:
>
> - Remember the user to add files
> + Remind the user to add files
>

We also have "bzr commit --strict" which is what I use:

 bzr alias "commit=commit --strict"

which aborts the commit if there are unknown files (not ignored, not
added). You can always work around it with "bzr commit --no-strict". So
it checks for you, but gives the option to commit anyway.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrTWCAACgkQJdeBCYSNAAOYGQCgjBt3DWrkYdX4NbZ+aTnI0EJU
g7AAnjc9msFwhItCbGodJqjpgVIDP9k4
=VmME
-----END PGP SIGNATURE-----

Revision history for this message
Vincent Ladeuil (vila) wrote :

It's not suitable to be interactive if there are tenths of files to add, not to mention hundreds or thousands.

If you use '--strict', you don't need it to be interactive and you'll get an error if you try to commit in a "dirty" tree.
The option is here because it's really a personal preference (or a project preference) to allow
"dirty" trees or not.

You seem to be a candidate for using it, let us know if aliasing the command (as John
proposed) suits your needs or if you would have preferred a configuration option set either at
the global level (bazaar.conf), intermediate level (locations.conf) or branch level (branch.conf).

Revision history for this message
Patrick Regan (patrick-regan) wrote :

What about creating a document, or tutorial that shows how the use of 'alias commit="commit --strict"' would help them in this situation? I'm not sure where it would fit in (I don't want to clutter the documentation), but maybe a new document that has tips and tricks for new users?

Thoughts?

Revision history for this message
Martin Pool (mbp) wrote :

I think if someone has specifically asked for interaction or confirmation this would be ok.

However having new-user-oriented features that need to be explicitly turned on may not help.

Perhaps the "nothing to commit" message should suggest add.

Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Wishlist
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.