Category: Mercurial

Jul 22 2010

How do you setup the convert extension in Mercurial in windows?

Hello,

I have just installed mercurial (command line only...this is not TortoiseHG) onto a Windows SErver 2003 machine and the documentation mentions a convert command that will allow me convert an svn repo to hg.

But when I try to run hg convert the command is not recognized. I googled it and it says that I need to install the "convert extension" using the hgrc file.

I HAVE google this and I cannot find anything that will tell me EXACTLY how to get it working. I don't know what file and filename is needed and which directory path should it be in.

I found this page which talks generically about configuration and this page which talks about the convert extension but neither of them puts it together with enough specificity.

SUMMARY- exactly how do I setup hg to support the convert extension on Windows Server 2003.

Thanks.

Jul 22 2010

How do you setup the convert extension in Mercurial in windows?

I have just installed mercurial (command line only...this is not TortoiseHG) onto a Windows SErver 2003 machine and the documentation mentions a convert command that will allow me convert an svn repo to hg.

But when I try to run hg convert the command is not recognized. I googled it and it says that I need to install the "convert extension" using the hgrc file.

I HAVE google this and I cannot find anything that will tell me EXACTLY how to get it working. I don't know what file and filename is needed and which directory path should it be in.

I found this page which talks generically about configuration and this page which talks about the convert extension but neither of them puts it together with enough specificity.

SUMMARY- exactly how do I setup hg to support the convert extension on Windows Server 2003.

Thanks.

Jul 22 2010

How do you setup the convert extension in Mercurial in windows?

I have just installed mercurial (command line only...this is not TortoiseHG) onto a Windows SErver 2003 machine and the documentation mentions a convert command that will allow me convert an svn repo to hg.

But when I try to run hg convert the command is not recognized. I googled it and it says that I need to install the "convert extension" using the hgrc file.

I HAVE google this and I cannot find anything that will tell me EXACTLY how to get it working. I don't know what file and filename is needed and which directory path should it be in.

I found this page which talks generically about configuration and this page which talks about the convert extension but neither of them puts it together with enough specificity.

SUMMARY- exactly how do I setup hg to support the convert extension on Windows Server 2003.

Thanks.

Jul 16 2010

Mercurial Workflow and Tutorial

I just read Joel Spolsky’s outstanding introductory tutorial to Mercurial. Mercurial is a distributed Version Control System.  You can read it at http://hginit.com.

Here is my glossary and workflow description from the tutorial for mercurial.

WORKFLOW

  1. If you haven’t done so in a while, get the latest version that everyone else is working off of:
    • hg pull
    • hg up
  2. Make some changes
  3. Commit them (locally)
  4. Repeat steps 2-3 until you’ve got some nice code that you’re willing to inflict on everyone else
  5. When you’re ready to share:
    • hg pull to get everyone else’s changes (if there are any)
    • hg merge to merge them into yours
    • test! to make sure the merge didn’t screw anything up
    • hg commit (the merge)
    • hg push

GLOSSARY

hg help

hg init                                    Create a repo.  Be in the directory you want to source.

hg add                                  adds files in directory to repo

hg commit (com)              Commit changes to local repo   -m include a message in quotes

hg log                                    see changes since last commit.  –P shows changes that just arrived.

hg revert                             revert changes to last changeset   –all (revert all files)

hg status                              list files that have change

hg diff   <file>                    show changes in a file

hg cat                                    print file to screen           -r N <file> (where N  is a changeset #) print that version.

hg update (up)  -r N          N is changeset #.  Changes your working set to that revision.  With no number goes to latest.

hg serve                                 Share the repository in the built in web server (port 8000 default)

hg clone                                 clone the repository    hg clone <url/path-to-repo> <new folder name>

hg push                                  Pushes changes from local repo to central repo

hg outgoing (out)               Lists changes that are waiting to be sent to central repo

hg incoming (in)                  Lists changes that are waiting to be sent from central repo to local repo

hg merge                               combines changeset into new tip.  Then use commit to commit merge to repo.  If merge fails you can revert it.  On success you can commit it.

hg parent                              tells you what changeset your are working in.   Pull does not change your changeset so a pull is always safe.

hg rollback                            Undoes one commit but only if it hasn’t been pushed. (Revert changes to the last commit whereas rollback reverts the last commit.)

hg paths                                 default = shows the path to the default repository that a push will use.

Hg backout –r N –merge              undoes a particular  changeset from the working directory

hg tag <name>                    Give current changeset a name.  Then you can use it for N.

NOTES

If you see when doing a push…

abort: push creates new remote heads!

(did you forget to merge? use push -f to force)
…then you need to do a Pull then do a Push