push should warn about uncommitted changes
Bug #284038 reported by
Martin Owens
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Vincent Ladeuil |
Bug Description
It would be nice if bzr gave a warning when you have changes that have not been committed AND there are no revisions to push.
Thus people would be reminded to commit their code and not just blindly push and wonder where their files have gone.
This should also check for pending merges.
On very large trees checking for changes may take a slightly noticeable time so it may be desirable to have an option to avoid doing that check. On the other hand some users may prefer an error rather than a warning. So perhaps a tri-state option would be appropriate.
Related branches
lp://staging/~vila/bzr/284038-push-strict
- John A Meinel: Approve
- bzr-core: Pending requested
- Diff: 155 lines
lp://staging/~vila/bzr/integration
- Vincent Ladeuil: Approve
-
Diff: 31 lines (+4/-4)2 files modifiedbzrlib/lazy_regex.py (+3/-3)
doc/en/release-notes/bzr-2.7.txt (+1/-1)
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
description: | updated |
Changed in bzr: | |
assignee: | nobody → Vincent Ladeuil (vila) |
Changed in bzr: | |
milestone: | none → 1.16 |
status: | Confirmed → Fix Committed |
Changed in bzr: | |
status: | In Progress → Fix Committed |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I think that people that needs this safeguard wont notice if they have revisions to push (in addition to the uncommitted changes in the tree).
Since the tree check is not cheap, we don't want it to be done by default either.
I think the best solution is to add a --strict option to the push command (defaulting to false).
If not specified on the command line, we can additionally check a configuration variable so that people can opt-in either from bazaar.conf, locations.conf or branch.conf (to ease deployment since the original use case is more about a team policy than an isolated user problem).