Question

I couldn't find a relevant thread anywhere, but possibly this important task has to be asked about many times before..

I have a central repository, from which I have cloned to form a local repo. Now I made several changes and commits to local repository. Now I need to push/commit the final version to central repo. How do I do this?

I'm using TortoiseHg as the client.

When I right click, in the context menu of tortoise, I can see Update as well as Synchronize. I am not sure if either of these are meant for my job. If I select Update I see an Update to combobox where it has default, tip etc. Not sure what are these. When I select Synchronize, all I see are (confusing) options that deal with remote repository. Or does remote repo mean central/main server repo?

Thanks.

Was it helpful?

Solution

  1. You can have more than one (any) amount of remote repositories.
  2. Mercurial is DVCS (D - Distributed). Central/Main is just conventional repository, which all teammates use for intermediate code-storage (by agreement and workflow)
  3. Synchronize toolbar (most right in toolbars, when enabled) is your best friend

    • 1 in screenshot is for actions-button for data-transfer (read hints for buttons /and THG help/)
    • 2 is section of defined remotes (in your case, after clone, you'll have only "default" alias), for which selected (by button) action will be performed

enter image description here

PS: from CLI it's a lot faster:

cd REPO_DIR
hg push

OTHER TIPS

Maybe this is a bit late but.....

if you are familar with subversion, think of (mercurial) update as a (subversion) switch...and (mercurial) synchronize as (subversion) checkout and/or commit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top