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 09:49:47 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

On Sat, Jun 04, 2016 at 10:36:29 -0400, Jordi Gutiérrez Hermoso wrote:
> On Sat, 2016-06-04 at 12:31 +0530, Abhinav Tripathi wrote:
> > Hi,
> > I have a few questions, which probably are general mercurial questions but
> > might be specific to pytave, so I am sending on the list.
> > .
> > 1)When working on the pytave repo, even if I don't checkout any bookmark, I
> > still can commit. Where does the commit go?
> > I know that no bookmark is checked as I see no '*' when I do 'hg
> > bookmark'.
> 
> It goes wherever you're standing.
> 
> A big difference between git and hg is that in hg commits don't need a
> reference to "exist". In git, commits are only found if you have a
> reference to them. In hg, your commits are always found, with or
> without a bookmark. A book's pages don't disappear if you shake the
> book and the bookmarks fall out.

I would add that in git a branch may have only one HEAD. Git will abort
and tell you you can't do that if you try to check out a previous
revision of a branch and commit a new HEAD that diverges, you *must*
give it a new branch name first.

In hg you can easily check out an earlier revision (such as a
collaborator's development head) and commit a new revision, creating a
new head of development on the same branch.

Bookmarks are just a way to give temporary names to these development
heads. But you could easily not use bookmarks and just `hg up` to one
revision ID or another.

> > 2)What is the 'master'  branch for the repo?
> > Is it the '@' bookmark?
> 
> That's the convention. The only special thing about the "@" bookmark
> is that it will be the revision (commit, changeset) that will be
> checked out from new clones.

The 'default' branch is the convention for the primary development
branch. The 'default' branch may contain multiple development heads,
such as different feature sets being worked on in parallel or different
developers' separate clones.

The '@' bookmark is the convention used as the default development head,
if it exists. If you don't have '@' and you don't use bookmarks, you
would just commit on 'default'.

> > 4)If I create a new bookmark and just work on it, will it behave
> > like a git branch, so that even if there are some other commits in
> > other files (not related to my commits), i could merge (rather push)
> > without any conflicts?
> 
> Yeah, but merging and pushing isn't the same thing.

I'm not quite sure what you're asking here, can you clarify "behave like
a git branch"? What feature of a git branch are you hoping for?

Another difference that you may be interested in is that `hg push`
pushes everything by default, git does not. If you want to only push a
particular revision or bookmark, you *must* *always* use `hg push -r
something`. And you *must* use `hg push -B bookmark` to make sure the
bookmark is pushed to the remote repository at least the first time (if
you want to share it).

-- 
mike



reply via email to

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