octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pytave - (probably mercurial) - - Question


From: Mike Miller
Subject: Re: Pytave - (probably mercurial) - - Question
Date: Sat, 4 Jun 2016 11:06:26 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

On Sat, Jun 04, 2016 at 23:20:48 +0530, Abhinav Tripathi wrote:
> Not quite. It's like the commits are not in any bookmark and are just lying
> on 'default'  branch (i guess).
> I need a bookmark which i will get from '@' and then want to add the 2
> commits to that bookmark. (they do not have any merge conflicts)

Ok, so you want to `hg rebase` commits onto the other head. There's no
need to create a bookmark just to have a merge or rebase point, just use
the revision ID, either the purely numerical one which is local to your
repo, or the SHA1 hash which is global and unique.

> > or like this
> >
> >   '@' --- o --- o --- 'foo' --- o --- 'bar'
> 
> The last one is what i want. (keeping in mind that 'foo'  and 'bar'  are
> just tags and will disappear. 'o'  are the actual commits which will
> remain)

So that would be

  hg update bar
  hg rebase --dest foo
  hg book -d foo ## delete foo if you like, doesn't matter
  hg push -r bar ## and -B bar if you want it exported

This is equivalent to doing a `git pull --rebase` and having your local
commits be added to the end of the divergent remote branch.

I think in an older version of hg you used to have to specify both the
destination and the source of the rebase, so if you get such an error
message, you would do

  hg rebase --base bar --dest foo

to tell it to move all commits that are in bar but not in foo.

This is like `git rebase --onto foo something bar` I think, where
'something' is the common ancestor of the two. Hg just figures out the
common ancestor for you.

Hope that helps,

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]