[PATCH 2 of 2] httpclient: import revision fc731618702a of py-nonblocking-http
Martin Geisler
mg at aragost.com
Wed May 18 04:24:59 CDT 2011
Matt Mackall <mpm at selenic.com> writes:
> On Tue, 2011-05-17 at 13:36 -0500, Augie Fackler wrote:
>> # HG changeset patch
>> # User Augie Fackler <durin42 at gmail.com>
>> # Date 1305646083 18000
>> # Node ID 886fed778423d4dfc0f95fd7684a0c144cd934a5
>> # Parent 8689945a9491d807e3a7154c544166a82423efa3
>> httpclient: import revision fc731618702a of py-nonblocking-http
>
> These are queued, thanks.
I think we should think about making the httpclient a subrepo.
I agree that we should not add unnecessary pain for ourselves, but we
now have a genuine third-party library that we depend on. It would be
good for us to practise the subrepo workflow where, bugfixes would flow
into our repo as patches that update the .hgsubstate file.
If we have done that, then we would have found out that even this simple
workflow does not work! That is, when a patch updates .hgsubstate, we
forget to check if any subrepos need updating.
This particular case might be easy to fix, but I'm want us to look at
the bigger picture here: I feel that when we don't use a feature daily,
then it will never be truely polished.
Setup repo:
$ hg init third-party
$ cd third-party
$ touch a
$ hg commit -A -m a
adding a
$ cd ..
$ hg init repo
$ cd repo
$ hg clone $TESTTMP/third-party sub
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo "sub = $TESTTMP/third-party" > .hgsub
$ hg commit -A -m 'add subrepo'
adding .hgsub
committing subrepository sub
$ cd ..
Make change in a clone:
$ hg clone repo clone
updating to branch default
cloning subrepo sub from $TESTTMP/third-party
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd clone/sub
$ touch b
$ hg commit -A -m b
adding b
$ hg push
pushing to $TESTTMP/third-party
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
$ cd ..
Commit updated subrepo and prepare patch for email:
$ hg commit -m 'update subrepo'
committing subrepository sub
$ hg export tip > ../p
$ cd ..
Import patch:
$ cd repo
$ hg import ../p
applying ../p
Subrepo is now inconsistent:
$ ls sub
a
$ hg status -S
warning: error "unknown revision '0e067c57feba1a5694ca4844f05588bb1bf82342'" in subrepository "sub"
Fix subrepo, note the unnecessary prompt:
$ hg update null
local changed .hgsubstate which remote deleted
use (c)hanged version or (d)elete? c
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg update
pulling subrepo sub from $TESTTMP/third-party
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Subrepo is now in sync:
$ ls sub
a
b
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/
More information about the Mercurial-devel
mailing list