Bookmarks in core?
Augie Fackler
durin42 at gmail.com
Tue Nov 30 17:48:21 CST 2010
On Nov 30, 2010, at 5:10 PM, Didly Bom wrote:
> On Mon, Nov 29, 2010 at 8:43 PM, Augie Fackler <durin42 at gmail.com> wrote:
>
>> For me, use of bookmarks and revsets has completely replaced mq in almost
>> all cases. I now only use mq for amending a changeset or looking at mqs from
>> others. Bookmarks combined with some kind of pushkey-based dead heads feels
>> like it could be a compelling replacement for mq to me.
>>
>> I'm not sure it makes all that much to bring in bookmarks without some form
>> of dead heads functionality.
>>
>>
> Augie,
>
> could you please explain how do bookmarks + revsets subsitute mq? To me they
> are quite unrelated features...
I really only ever used mq for managing work that wasn't done, or rebasing changesets. When I use bookmarks, revsets, remotebranches, and histedit, I find that I don't need mq at all. I use histedit for folding together changesets once I've made them. remotebranches tracks the upstream branch tip(s) so that rebase is stupidly easy. Revsets make this possible:
function hg_rebase_all () {
hg sum | egrep 'commit: .*\(clean\)$' || (echo 'abort: wc not clean' ; return 1) || return 1
if [ "x$1" = "x" ] ; then
echo 'abort: give destination for rebase'
return 2
fi
if [ "$1" = "tip" ] ; then
echo 'abort: tip is essentially never what you mean here'
return 2
fi
for b in $(hg book | sed 's/^ \*/ /' | awk '{ print $1 }') ; do
hg co --clean $b
hg rebase -d "$1"
done
}
alias hg-rebase-all=hg_rebase_all
(see http://bitbucket.org/durin42/dotfiles/src/tip/.shell.d/50.hg_functions.sh#cl-14 if you want highlighting)
which makes rebasing all of my pending branches a one-step process (assuming no merge conflicts, which is at least no worse than mq was.)
> As a user it'd be nice if bookmarks were integrated into core and makes it
> easier to share your bookmarks, so this gets a +1 from me.
>
> Actually I like the idea of somehow reducing the gap between tags and
> bookmarks, especially if that meant that we could get rid of all those ugly
> "extra commits" that are introduced when you add a non local tag (yuk!).
Those "ugly" extra commits are here to stay. I can't think of any reasonable way to hide them that wouldn't grossly violate backwards compatibility (I even *like* them, although taht probably puts me in the minority.)
If anything, I think it makes sense to *increase* the difference between bookmarks and tags (make the notion of a bookmark detached somewhat from the notion of a tag, so that `hg tags` wouldn't print bookmarks as well as tags.
> Cheers,
>
> Angel
More information about the Mercurial-devel
mailing list