libqxt is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

libqxt / libqxt http://libqxt.org/

LibQxt is an extension library for Qt providing a suite of cross-platform utility classes to add functionality not readily available in the Qt toolkit by Trolltech, a Nokia company.

Clone this repository (size: 16.4 MB): HTTPS / SSH
hg clone https://bitbucket.org/libqxt/libqxt
hg clone ssh://hg@bitbucket.org/libqxt/libqxt
hg clone https://bitbucket.org/libqxt/libqxt/wiki

hg guide

This page has some tips for using mercurial.

mercurial references

http://www.selenic.com/mercurial/wiki/index.cgi/UnderstandingMercurial http://hgbook.red-bean.com/hgbook.html

getting mercurial

http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages

setting up ssh on windows

If you are on windows and don't use cygwin ssh, download plink.exe from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. Assuming you've placed the executable in c:\putty\ then add this to your mercurial.ini:

      [ui]
      ssh=c:/putty/plink.exe -ssh 

your first few steps with mercurial

If you've used hg before, skip this section.

Let's start off with some commands to familiarize yourself with hg. Let's start with these commands: For Windows users replace the following commands:

        rm      =>     del
        ls      =>     dir
        cat     =>     type
      $ mkdir hgtest
      $ cd hgtest
      $ hg init
      $ echo hello > hello.txt
      $ hg add                                  # adds all files that are in the working copy it doesn't know about
      $ hg ci -m"initial commit"                # ci is short for commit
      $ hg log

you'll notice that we only have one changeset, let's add another:

      $ echo ... world! >> hello.txt
      $ hg ci -m"added world"
      $ hg log

you'll notice two changesets now

a bit more with mercurial

      $ hg st                                  # shows you the status of your working copy, nothing to show yet
      $ echo libqxt > libqxt.txt
      $ hg st
      $ hg add
      $ hg st
      $ hg ci -m"another file in the repo"

going back in time

      $ ls libqxt.txt
      $ hg glog                                 # glog is short for graphlog, the '@' symbol shows us where we are
      $ hg up -r 1
      $ ls libqxt.txt                           # libqxt.txt didn't exist in the repo at that time
      $ hg glog                                 # shows that we've moved down the tree
      $ hg up                                   # update with no revision will always update us the last revision (of our current branch)
      $ hg glog
      $ ls libqxt.txt                           # it's back!

cloning / pulling / pushing

      $ cd ..
      $ hg clone hgtest hgtest2                # we'll clone the entire repo (just two files plus all the metadata)
                                               # you'll notice a new directory 'hgtest2' after this command

      $ hg clone hgtest hgtest3                # we'll make a second clone
      $ cd hgtest2
      $ hg glog                                # you'll see it looks exactly the same, it is a clone after all
      $ echo another line >> libqxt.txt
      $ hg ci -m"added another line"
      $ hg out                                 # shows us what's new in our repo that the other repo 'hgtest' doesn't have
      $ hg out -p                              # shows us the in a nice patch format
      $ hg bundle hgtest2.bz2                  # creates a bundle of changes, easy for emailing around etc.. 
      $ rm hgtest2.bz2                         # we don't need this for now
      $ hg in                                  # there's nothing new in the hgtst repo for us
      $ hg push                                # let's push the changes to hgtest, by default it will push to
                                               # the repo it was clone from, see .hg/hgrc for info

      $ cd .
      $ cd hgtest                              # back to where we started
      $ hg glog                                # now we see that we have the new changeset (revision 3) that was pushed from hgtest2
      $ cat libqxt.txt                         # we don't see the changes pushed by hgtest2 reflected in our working copy yet,
                                               # because we're still sitting at rev 1

      $ hg u
      $ hg glog
      $ cat libqxt.txt
      $ echo libqxt.org > libqxt.txt            # we are ovewriting this file, losing both lines)
      $ hg ci -m"complete re-write"
      $ cd ..
      $ cd hgtest2
      $ echo a third line >> libqxt.txt         # we keep working on our file)
      $ hg ci -m"more changes"
      $ hg out
      $ hg in                                   # (uh oh!)
      $ hg pull
      $ hg glog                                 # now we see that we have two 'heads', one is the one we expected,
                                                # with the "more changes" message, but there's another one, called "complete rewrite")

      $ hg merge                                # please see http://www.selenic.com/mercurial/wiki/index.cgi/Merge
                                                # and http://hgbook.red-bean.com/hgbookch4.html for more info)

This revision is from 2011-11-24 22:17