Mercurial > hg
changeset 10023:15fbbc939373
Merge with stable
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Tue, 08 Dec 2009 23:36:06 +0100 |
parents | 0022f5c5459e (current diff) 585f51f8b5f0 (diff) |
children | 2b630e4c8f2f |
files | hgext/patchbomb.py tests/test-patchbomb tests/test-patchbomb.out |
diffstat | 3 files changed, 278 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/patchbomb.py Sat Dec 05 23:26:27 2009 -0500 +++ b/hgext/patchbomb.py Tue Dec 08 23:36:06 2009 +0100 @@ -231,14 +231,15 @@ '''Return the revisions present locally but not in dest''' dest = ui.expandpath(dest or 'default-push', dest or 'default') dest, revs, checkout = hg.parseurl(dest, revs) - revs = [repo.lookup(rev) for rev in revs] + if revs: + revs = [repo.lookup(rev) for rev in revs] other = hg.repository(cmdutil.remoteui(repo, opts), dest) ui.status(_('comparing with %s\n') % dest) o = repo.findoutgoing(other) if not o: ui.status(_("no changes found\n")) return [] - o = repo.changelog.nodesbetween(o, revs or None)[0] + o = repo.changelog.nodesbetween(o, revs)[0] return [str(repo.changelog.rev(r)) for r in o] def getpatches(revs):
--- a/tests/test-patchbomb Sat Dec 05 23:26:27 2009 -0500 +++ b/tests/test-patchbomb Tue Dec 08 23:36:06 2009 +0100 @@ -183,10 +183,13 @@ -s test -r 0 cat tmp.mbox | fixheaders -echo "% test outgoing and dest#branch URIs" +echo "% test outgoing" hg up 1 hg branch test echo d > d hg add d hg ci -md -d '4 0' +hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t | fixheaders + +echo "% dest#branch URIs" hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test | fixheaders
--- a/tests/test-patchbomb.out Sat Dec 05 23:26:27 2009 -0500 +++ b/tests/test-patchbomb.out Tue Dec 08 23:36:06 2009 +0100 @@ -1533,12 +1533,282 @@ +a -% test outgoing and dest#branch URIs +% test outgoing 0 files updated, 0 files merged, 6 files removed, 0 files unresolved marked working directory as branch test created new head comparing with ../t searching for changes +This patch series consists of 8 patches. + + +Write the introductory message for the patch series. + + +Displaying [PATCH 0 of 8] test ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 0 of 8] test +Message-Id: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:00 +0000 +From: test +To: foo + + +Displaying [PATCH 1 of 8] c ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 1 of 8] c +X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f +Message-Id: <ff2c9fa2018b15fa74b3.315532861@ +In-Reply-To: <patchbomb.315532860@ +References: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:01 +0000 +From: test +To: foo + +# HG changeset patch +# User test +# Date 3 0 +# Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f +# Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 +c + +diff -r 97d72e5f12c7 -r ff2c9fa2018b c +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/c Thu Jan 01 00:00:03 1970 +0000 +@@ -0,0 +1,1 @@ ++c + +Displaying [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64 ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64 +X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a +Message-Id: <c3c9e37db9f4fe4882cd.315532862@ +In-Reply-To: <patchbomb.315532860@ +References: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:02 +0000 +From: test +To: foo + +# HG changeset patch +# User test +# Date 4 0 +# Node ID c3c9e37db9f4fe4882cda39baf42fed6bad8b15a +# Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f +charset=utf-8; content-transfer-encoding: base64 + +diff -r ff2c9fa2018b -r c3c9e37db9f4 description +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/description Thu Jan 01 00:00:04 1970 +0000 +@@ -0,0 +1,3 @@ ++a multiline ++ ++description +diff -r ff2c9fa2018b -r c3c9e37db9f4 utf +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/utf Thu Jan 01 00:00:04 1970 +0000 +@@ -0,0 +1,1 @@ ++hömma! + +Displaying [PATCH 3 of 8] charset=utf-8; content-transfer-encoding: quoted-printable ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +Subject: [PATCH 3 of 8] charset=utf-8; + content-transfer-encoding: quoted-printable +X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376 +Message-Id: <c655633f8c87700bb38c.315532863@ +In-Reply-To: <patchbomb.315532860@ +References: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:03 +0000 +From: test +To: foo + +# HG changeset patch +# User test +# Date 4 0 +# Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376 +# Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a +charset=3Dutf-8; content-transfer-encoding: quoted-printable + +diff -r c3c9e37db9f4 -r c655633f8c87 qp +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/qp Thu Jan 01 00:00:04 1970 +0000 +@@ -0,0 +1,4 @@ ++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ++foo ++ ++bar + +Displaying [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit +X-Mercurial-Node: 22d0f96be12f5945fd67d101af58f7bc8263c835 +Message-Id: <22d0f96be12f5945fd67.315532864@ +In-Reply-To: <patchbomb.315532860@ +References: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:04 +0000 +From: test +To: foo + +# HG changeset patch +# User test +# Date 5 0 +# Node ID 22d0f96be12f5945fd67d101af58f7bc8263c835 +# Parent c655633f8c87700bb38cc6a59a2753bdc5a6c376 +charset=us-ascii; content-transfer-encoding: 8bit + +diff -r c655633f8c87 -r 22d0f96be12f isolatin +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/isolatin Thu Jan 01 00:00:05 1970 +0000 +@@ -0,0 +1,1 @@ ++hömma! + +Displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a +X-Mercurial-Node: dd9c2b4b8a8a0934d5523c15f2c119b362360903 +Message-Id: <dd9c2b4b8a8a0934d552.315532865@ +In-Reply-To: <patchbomb.315532860@ +References: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:05 +0000 +From: test +To: foo + +# HG changeset patch +# User test +# Date 0 0 +# Node ID dd9c2b4b8a8a0934d5523c15f2c119b362360903 +# Parent 22d0f96be12f5945fd67d101af58f7bc8263c835 +Added tag zero, zero.foo for changeset 8580ff50825a + +diff -r 22d0f96be12f -r dd9c2b4b8a8a .hgtags +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 +@@ -0,0 +1,2 @@ ++8580ff50825a50c8f716709acdf8de0deddcd6ab zero ++8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo + +Displaying [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 +X-Mercurial-Node: eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff +Message-Id: <eae5fcf795eee29d0e45.315532866@ +In-Reply-To: <patchbomb.315532860@ +References: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:06 +0000 +From: test +To: foo + +# HG changeset patch +# User test +# Date 0 0 +# Node ID eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff +# Parent dd9c2b4b8a8a0934d5523c15f2c119b362360903 +Added tag one, one.patch for changeset 97d72e5f12c7 + +diff -r dd9c2b4b8a8a -r eae5fcf795ee .hgtags +--- a/.hgtags Thu Jan 01 00:00:00 1970 +0000 ++++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 +@@ -1,2 +1,4 @@ + 8580ff50825a50c8f716709acdf8de0deddcd6ab zero + 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo ++97d72e5f12c7e84f85064aa72e5a297142c36ed9 one ++97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch + +Displaying [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b +X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6 +Message-Id: <e317db6a6f288748d1f6.315532867@ +In-Reply-To: <patchbomb.315532860@ +References: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:07 +0000 +From: test +To: foo + +# HG changeset patch +# User test +# Date 0 0 +# Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6 +# Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff +Added tag two, two.diff for changeset ff2c9fa2018b + +diff -r eae5fcf795ee -r e317db6a6f28 .hgtags +--- a/.hgtags Thu Jan 01 00:00:00 1970 +0000 ++++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 +@@ -2,3 +2,5 @@ + 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo + 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one + 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch ++ff2c9fa2018b15fa74b33363bda9527323e2a99f two ++ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff + +Displaying [PATCH 8 of 8] d ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 8 of 8] d +X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 +Message-Id: <2f9fa9b998c5fe3ac2bd.315532868@ +In-Reply-To: <patchbomb.315532860@ +References: <patchbomb.315532860@ +User-Agent: Mercurial-patchbomb +Date: Tue, 01 Jan 1980 00:01:08 +0000 +From: test +To: foo + +# HG changeset patch +# User test +# Date 4 0 +# Branch test +# Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 +# Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 +d + +diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/d Thu Jan 01 00:00:04 1970 +0000 +@@ -0,0 +1,1 @@ ++d + +% dest#branch URIs +comparing with ../t +searching for changes This patch series consists of 1 patches.