Something like "darcs record" / "hg record" == Select changes to commit.
Stephen J. Turnbull
stephen at xemacs.org
Thu Jun 7 01:06:29 UTC 2012
Daniel Carrera writes:
> I would add that I have experimented with "shelve" and some times
> it doesn't let me select individual hunks in a file if they are
> very close.
That sounds like a bug, unless by "very close" you mean "in the same
line". At that level, I think you just need to bite the bullet.
While it would be theoretically possible for the commit hunk selector
to use a word diff (or xdiff), line-oriented diffs are so embedded in
common workflows I don't think it would be worth it.
> So the only way to commit the change I want (e.g. fixing a typo in
> a comment) is to undo some of the work I've done in nearby lines,
> then commit, and then re-add my changes... That feels like
> something my VCS would ideally take care of...
I disagree. I think your editor should take care of it. The parts
that need human judgment here are disentangling textual changes,
that's what editors are good at. So I think you want to stay in your
editor at this point. The editor's role would be to save the file,
ask the VCS to shelve the current changes, and refresh the buffer.
You fix the typo, then the editor saves, asks the VCS to commit the
small change and then unwind the shelf, and refreshes the buffer
(which is probably in conflict now).
I currently do something a little different, which is to switch to a
different branch after shelving. The rationale is that I keep typo
fixes and the like on the separate branch which is frequently
integrated into the mainline.
More information about the bazaar
mailing list