News for hackers. Stuff that matters.
Re:Gitless – An experimental version control system built on... by david-given on Wednesday March 04, 2015 @04:57PM (#9147641)
Unfortunately, it's not quite that easy --- to be able to push, you need git+ssh, and I've never made that work with github (it just hangs saying something about git-upload-pack), and it doesn't seem to help you with some of the more horrible git interactions, such as doing a pull from upstream to your forked github repository.

(And I suspect that if I could do that reliably I would have internalised enough git to use that natively.)

Re:Gitless – An experimental version control system built on... by e12e on Wednesday March 04, 2015 @11:00PM (#9149165)
Hm... you're right about needing to use ssh+git -- at least with github[1] (I don't have anything on github yet, I just host my own mercurial repos across a couple of machines for whatever I'm working on).

However, after forking a repo on github, everything seems to work fine for me:

    hg clone git+ssh://[email protected]:e12e/QuickTun.git qt.hg
    cd qt.hg
    echo "Mercurial hg-git test." > test
    hg add test
    hg ci -m "Just a test of hg-git push/pull to github."
    hg push
    # outputs:
    pushing to git+ssh://[email protected]:e12e/QuickTun.git
    Warning: Permanently added the RSA host key for IP
    address '192.30.252.131' to the list of known hosts.
    searching for changes
    adding objects
    added 1 commits with 1 trees and 1 blobs
    updating reference refs/heads/master
I can see how the need for using ssh could be a problem on windows, where you need to (AFAIK) get plink/putty working. A quick search seems to indicate that there's no support for using paramiko (python native ssh client/server) for the mercurial client.

> it doesn't seem to help you with some of the more horrible git interactions, such as doing a pull from upstream to your forked github repository.

Continuing from above, nothing stops you from:

    hg pull git+ssh://[email protected]:UCIS/QuickTun.git
Although working with multiple remotes in mercurial is generally done by adding them to .hg/hgrc.

Eg adding:

    upstream = git+ssh://[email protected]:UCIS/QuickTun.git
Allows you to do:

    hg pull upstream
and

   hg push upstream
And you can get a sense of what's going on:

    hg tags
    tip                               59:b6067e2362b5
    default/master                    59:b6067e2362b5
    upstream/master                   58:e5d10c76fcad
Not sure if that helps vis-a-vis using git, but as I said, I find the mercurial commands more intuitive, consistent and friendly -- to the point that I find it makes quite a difference for me, personally.

That said, if you want to/have to work with github-based repositories, you might be better off just sticking with git.

[1] https://github.com/schacon/hg-git/issues/152

Re:Gitless – An experimental version control system built on... by david-given on Thursday March 05, 2015 @05:44PM (#9154407)
Hmm. I never thought it was so simple. I'll have more of a play and see if I can make it work. I'd _much_ rather use hg than git. Thanks.