Submitter | Pierre-Yves David |
---|---|
Date | Feb. 12, 2016, 2:29 p.m. |
Message ID | <cfc73d7c8a99b39b93f1.1455287344@marginatus.alto.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/13130/ |
State | Accepted |
Headers | show |
Comments
On Fri, Feb 12, 2016 at 6:29 AM, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote: > # HG changeset patch > # User Pierre-Yves David <pierre-yves.david@fb.com> > # Date 1454936573 -3600 > # Mon Feb 08 14:02:53 2016 +0100 > # Node ID cfc73d7c8a99b39b93f118ec1a147c76fa90da80 > # Parent 3b2b0b5035d768a77a7362c4150d4242d1ccdbe5 > # EXP-Topic destination > # Available At http://hg.netv6.net/marmoute-wip/mercurial/ > # hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r cfc73d7c8a99 > tests: remove third head in some of the 'rebase-parameters' tests > > These tests do not care about that extra branch at all. In future changeset we > will make rebase behave like merge and abort in case of an ambiguous destination > (eg: multiple other heads) and that extra branch will make the command > invocation breaks. > > We preventively remove this extra branch from the relevant tests in an > independant changeset to reduce noise and increase confidence in the final > change. > > diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t > --- a/tests/test-rebase-parameters.t > +++ b/tests/test-rebase-parameters.t > @@ -44,10 +44,15 @@ > |/ > o 0: 'A' > > $ cd .. > > +Version with only two heads (to allow default destination to work) > + > + $ hg clone -q -u . a a2heads > + $ hg -R a2heads --config extensions.strip= strip 4:: > + saved backup bundle to $TESTTMP/a2heads/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob) > > These fail: > > $ hg clone -q -u . a a1 > $ cd a1 > @@ -115,35 +120,34 @@ These fail: > > These work: > > Rebase with no arguments (from 3 onto 8): > > + $ cd .. > + $ hg clone -q -u . a2heads a1. At first I thought the clone here was misleading since it clones into the same repo, but then I saw the '.' in the name. I'll rename (a1,a1.) to (a0,a1) if you don't mind. Or do you think it's safer that I queue patches 3-6 and you resend 1-2? Or I'm just too nitpicky?
On 02/12/2016 06:50 PM, Martin von Zweigbergk wrote: > On Fri, Feb 12, 2016 at 6:29 AM, Pierre-Yves David > <pierre-yves.david@ens-lyon.org> wrote: >> # HG changeset patch >> # User Pierre-Yves David <pierre-yves.david@fb.com> >> # Date 1454936573 -3600 >> # Mon Feb 08 14:02:53 2016 +0100 >> # Node ID cfc73d7c8a99b39b93f118ec1a147c76fa90da80 >> # Parent 3b2b0b5035d768a77a7362c4150d4242d1ccdbe5 >> # EXP-Topic destination >> # Available At http://hg.netv6.net/marmoute-wip/mercurial/ >> # hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r cfc73d7c8a99 >> tests: remove third head in some of the 'rebase-parameters' tests >> >> These tests do not care about that extra branch at all. In future changeset we >> will make rebase behave like merge and abort in case of an ambiguous destination >> (eg: multiple other heads) and that extra branch will make the command >> invocation breaks. >> >> We preventively remove this extra branch from the relevant tests in an >> independant changeset to reduce noise and increase confidence in the final >> change. >> >> diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t >> --- a/tests/test-rebase-parameters.t >> +++ b/tests/test-rebase-parameters.t >> @@ -44,10 +44,15 @@ >> |/ >> o 0: 'A' >> >> $ cd .. >> >> +Version with only two heads (to allow default destination to work) >> + >> + $ hg clone -q -u . a a2heads >> + $ hg -R a2heads --config extensions.strip= strip 4:: >> + saved backup bundle to $TESTTMP/a2heads/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob) >> >> These fail: >> >> $ hg clone -q -u . a a1 >> $ cd a1 >> @@ -115,35 +120,34 @@ These fail: >> >> These work: >> >> Rebase with no arguments (from 3 onto 8): >> >> + $ cd .. >> + $ hg clone -q -u . a2heads a1. > > At first I thought the clone here was misleading since it clones into > the same repo, but then I saw the '.' in the name. I'll rename > (a1,a1.) to (a0,a1) if you don't mind. Or do you think it's safer that > I queue patches 3-6 and you resend 1-2? Or I'm just too nitpicky? I can push an updated version if you want to.
On Fri, Feb 12, 2016 at 10:59 AM, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote: > > > On 02/12/2016 06:50 PM, Martin von Zweigbergk wrote: >> >> On Fri, Feb 12, 2016 at 6:29 AM, Pierre-Yves David >> <pierre-yves.david@ens-lyon.org> wrote: >>> >>> # HG changeset patch >>> # User Pierre-Yves David <pierre-yves.david@fb.com> >>> # Date 1454936573 -3600 >>> # Mon Feb 08 14:02:53 2016 +0100 >>> # Node ID cfc73d7c8a99b39b93f118ec1a147c76fa90da80 >>> # Parent 3b2b0b5035d768a77a7362c4150d4242d1ccdbe5 >>> # EXP-Topic destination >>> # Available At http://hg.netv6.net/marmoute-wip/mercurial/ >>> # hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r >>> cfc73d7c8a99 >>> tests: remove third head in some of the 'rebase-parameters' tests >>> >>> These tests do not care about that extra branch at all. In future >>> changeset we >>> will make rebase behave like merge and abort in case of an ambiguous >>> destination >>> (eg: multiple other heads) and that extra branch will make the command >>> invocation breaks. >>> >>> We preventively remove this extra branch from the relevant tests in an >>> independant changeset to reduce noise and increase confidence in the >>> final >>> change. >>> >>> diff --git a/tests/test-rebase-parameters.t >>> b/tests/test-rebase-parameters.t >>> --- a/tests/test-rebase-parameters.t >>> +++ b/tests/test-rebase-parameters.t >>> @@ -44,10 +44,15 @@ >>> |/ >>> o 0: 'A' >>> >>> $ cd .. >>> >>> +Version with only two heads (to allow default destination to work) >>> + >>> + $ hg clone -q -u . a a2heads >>> + $ hg -R a2heads --config extensions.strip= strip 4:: >>> + saved backup bundle to >>> $TESTTMP/a2heads/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob) I'll replace these few lines by by "hg clone -q -u . a a2heads -r 3 -r 8" in flight. >>> >>> These fail: >>> >>> $ hg clone -q -u . a a1 >>> $ cd a1 >>> @@ -115,35 +120,34 @@ These fail: >>> >>> These work: >>> >>> Rebase with no arguments (from 3 onto 8): >>> >>> + $ cd .. >>> + $ hg clone -q -u . a2heads a1. >> >> >> At first I thought the clone here was misleading since it clones into >> the same repo, but then I saw the '.' in the name. I'll rename >> (a1,a1.) to (a0,a1) if you don't mind. Or do you think it's safer that >> I queue patches 3-6 and you resend 1-2? Or I'm just too nitpicky? > > > I can push an updated version if you want to. I've already changed it, and the following tests seem strict enough that I think my fix is safe (and won't break your upcoming patch). Thanks for the offer, though.
Patch
diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t --- a/tests/test-rebase-parameters.t +++ b/tests/test-rebase-parameters.t @@ -44,10 +44,15 @@ |/ o 0: 'A' $ cd .. +Version with only two heads (to allow default destination to work) + + $ hg clone -q -u . a a2heads + $ hg -R a2heads --config extensions.strip= strip 4:: + saved backup bundle to $TESTTMP/a2heads/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob) These fail: $ hg clone -q -u . a a1 $ cd a1 @@ -115,35 +120,34 @@ These fail: These work: Rebase with no arguments (from 3 onto 8): + $ cd .. + $ hg clone -q -u . a2heads a1. + $ cd a1. $ hg up -q -C 3 $ hg rebase rebasing 1:42ccdea3bb16 "B" rebasing 2:5fddd98957c8 "C" rebasing 3:32af7686d403 "D" - saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) + saved backup bundle to $TESTTMP/a1./.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) $ hg tglog - @ 8: 'D' + @ 6: 'D' | - o 7: 'C' + o 5: 'C' | - o 6: 'B' + o 4: 'B' | - o 5: 'I' + o 3: 'I' | - o 4: 'H' + o 2: 'H' | - | o 3: 'G' - |/| - o | 2: 'F' - | | - | o 1: 'E' - |/ + o 1: 'F' + | o 0: 'A' Try to rollback after a rebase (fail): $ hg rollback @@ -152,36 +156,32 @@ Try to rollback after a rebase (fail): $ cd .. Rebase with base == '.' => same as no arguments (from 3 onto 8): - $ hg clone -q -u 3 a a2 + $ hg clone -q -u 3 a2heads a2 $ cd a2 $ hg rebase --base . rebasing 1:42ccdea3bb16 "B" rebasing 2:5fddd98957c8 "C" rebasing 3:32af7686d403 "D" saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) $ hg tglog - @ 8: 'D' + @ 6: 'D' | - o 7: 'C' + o 5: 'C' | - o 6: 'B' + o 4: 'B' | - o 5: 'I' + o 3: 'I' | - o 4: 'H' + o 2: 'H' | - | o 3: 'G' - |/| - o | 2: 'F' - | | - | o 1: 'E' - |/ + o 1: 'F' + | o 0: 'A' $ cd .. @@ -218,33 +218,29 @@ Rebase with dest == branch(.) => same as $ cd .. Specify only source (from 2 onto 8): - $ hg clone -q -u . a a4 + $ hg clone -q -u . a2heads a4 $ cd a4 $ hg rebase --source 'desc("C")' rebasing 2:5fddd98957c8 "C" rebasing 3:32af7686d403 "D" saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) $ hg tglog - o 8: 'D' + o 6: 'D' | - o 7: 'C' + o 5: 'C' | - @ 6: 'I' + @ 4: 'I' | - o 5: 'H' + o 3: 'H' | - | o 4: 'G' - |/| - o | 3: 'F' - | | - | o 2: 'E' - |/ + o 2: 'F' + | | o 1: 'B' |/ o 0: 'A' $ cd .. @@ -283,36 +279,32 @@ Specify only dest (from 3 onto 6): $ cd .. Specify only base (from 1 onto 8): - $ hg clone -q -u . a a6 + $ hg clone -q -u . a2heads a6 $ cd a6 $ hg rebase --base 'desc("D")' rebasing 1:42ccdea3bb16 "B" rebasing 2:5fddd98957c8 "C" rebasing 3:32af7686d403 "D" saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) $ hg tglog - o 8: 'D' + o 6: 'D' | - o 7: 'C' + o 5: 'C' | - o 6: 'B' + o 4: 'B' | - @ 5: 'I' + @ 3: 'I' | - o 4: 'H' + o 2: 'H' | - | o 3: 'G' - |/| - o | 2: 'F' - | | - | o 1: 'E' - |/ + o 1: 'F' + | o 0: 'A' $ cd .. @@ -381,33 +373,29 @@ Specify base and dest (from 1 onto 7): $ cd .. Specify only revs (from 2 onto 8) - $ hg clone -q -u . a a9 + $ hg clone -q -u . a2heads a9 $ cd a9 $ hg rebase --rev 'desc("C")::' rebasing 2:5fddd98957c8 "C" rebasing 3:32af7686d403 "D" saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) $ hg tglog - o 8: 'D' + o 6: 'D' | - o 7: 'C' + o 5: 'C' | - @ 6: 'I' + @ 4: 'I' | - o 5: 'H' + o 3: 'H' | - | o 4: 'G' - |/| - o | 3: 'F' - | | - | o 2: 'E' - |/ + o 2: 'F' + | | o 1: 'B' |/ o 0: 'A' $ cd ..