Patchwork [evolve-ext] evolve: fix the 'grab' alias to work on Windows

login
register
mail settings
Submitter Matt Harbison
Date Aug. 13, 2014, 12:24 a.m.
Message ID <lseb8d$5hh$1@ger.gmane.org>
Download mbox | patch
Permalink /patch/5368/
State Not Applicable
Headers show

Comments

Matt Harbison - Aug. 13, 2014, 12:24 a.m.
On Tue, 12 Aug 2014 19:56:26 -0400, Matt Harbison wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1407884993 14400
> #      Tue Aug 12 19:09:53 2014 -0400
> # Node ID 51cda4d2bb2cd52f4e90bf35c4243e33c8ec71bb
> # Parent  66f4c5c52d970f145cd218ceed065c3fe096631d
> evolve: fix the 'grab' alias to work on Windows
> 
>     $ ../../hg/tests/run-tests.py --with-hg=../../hg/hg --blacklist windows
>     Skipped test-simple4server.t: blacklisted
>     Warned test-obsolete.t: no result code from test
>     Warned test-tutorial.t: no result code from test
>     Warned test-evolve.t: no result code from test
>     Warned test-userguide.t: no result code from test
>     Warned test-sharing.t: no result code from test
>     Warned test-drop.t: no result code from test
>     Failed test-prune.t: output changed
>     # Ran 41 tests, 1 skipped, 6 warned, 1 failed.

The prune failure seems like a real bug in evolve d2fe19c818ea /
hg fff8e1cec90f:



The full context is this, where the last line is added:

  $ hg prune -B todelete
  1 changesets pruned
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  (leaving bookmark todelete)
  working directory now at d62d843c9a01
  bookmark 'todelete' deleted
  $ hg id -ir dcbb326fdec2
  abort: unknown revision 'dcbb326fdec2'!
  [255]
  $ hg id -ir d62d843c9a01
  d62d843c9a01
  $ hg bookmarks
     B                         10:ff43616e5d0f
     delete                    6:2702dd0c91e7
     todelete                  8:d62d843c9a01


I added a state check just before the above excerpt:

  $ hg bookmarks
     B                         10:ff43616e5d0f
     delete                    6:2702dd0c91e7
   * todelete                  9:dcbb326fdec2

So the bookmark deactivated and moved on Windows, but deletes on Linux.  I'm
not sure what the desired behavior is (I assume Linux behavior), or if this is
an evolve problem or a bookmark problem.

--Matt
Pierre-Yves David - Sept. 2, 2014, 7:10 p.m.
On 08/13/2014 02:24 AM, Matt Harbison wrote:
> On Tue, 12 Aug 2014 19:56:26 -0400, Matt Harbison wrote:
>
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1407884993 14400
>> #      Tue Aug 12 19:09:53 2014 -0400
>> # Node ID 51cda4d2bb2cd52f4e90bf35c4243e33c8ec71bb
>> # Parent  66f4c5c52d970f145cd218ceed065c3fe096631d
>> evolve: fix the 'grab' alias to work on Windows
>>
>>      $ ../../hg/tests/run-tests.py --with-hg=../../hg/hg --blacklist windows
>>      Skipped test-simple4server.t: blacklisted
>>      Warned test-obsolete.t: no result code from test
>>      Warned test-tutorial.t: no result code from test
>>      Warned test-evolve.t: no result code from test
>>      Warned test-userguide.t: no result code from test
>>      Warned test-sharing.t: no result code from test
>>      Warned test-drop.t: no result code from test

Not sure what this Warnings mean. Greg do you have and idea ?

>>      Failed test-prune.t: output changed
>>      # Ran 41 tests, 1 skipped, 6 warned, 1 failed.
>
> The prune failure seems like a real bug in evolve d2fe19c818ea /
> hg fff8e1cec90f:

A clowny bug was recently detected by windows. Can you try again with 
public stable heads of Mercurial ?
Matt Harbison - Sept. 3, 2014, 1:45 a.m.
Pierre-Yves David wrote:
>
>
> On 08/13/2014 02:24 AM, Matt Harbison wrote:
>> On Tue, 12 Aug 2014 19:56:26 -0400, Matt Harbison wrote:
>>
>>> # HG changeset patch
>>> # User Matt Harbison <matt_harbison@yahoo.com>
>>> # Date 1407884993 14400
>>> # Tue Aug 12 19:09:53 2014 -0400
>>> # Node ID 51cda4d2bb2cd52f4e90bf35c4243e33c8ec71bb
>>> # Parent 66f4c5c52d970f145cd218ceed065c3fe096631d
>>> evolve: fix the 'grab' alias to work on Windows
>>>
>>> $ ../../hg/tests/run-tests.py --with-hg=../../hg/hg --blacklist windows
>>> Skipped test-simple4server.t: blacklisted
>>> Warned test-obsolete.t: no result code from test
>>> Warned test-tutorial.t: no result code from test
>>> Warned test-evolve.t: no result code from test
>>> Warned test-userguide.t: no result code from test
>>> Warned test-sharing.t: no result code from test
>>> Warned test-drop.t: no result code from test
>
> Not sure what this Warnings mean. Greg do you have and idea ?
>

IIRC, these were tests that ran "successfully", without output changes. 
  I was tinkering later with one, and it wanted to make changes when I 
ran it in interactive mode.  As a side effect, run-tests.py also wanted 
to add and/or remove "(glob)" markers.  After that, it ran cleanly with 
no such warning as above, either in interactive mode or not.

I cleaned up all of these files to add and subtract the "(glob)" markers 
as suggested by hg's run-tests.py, and then they all ran fine.  So it 
seems like run-tests.py -i *won't* fix up glob problems unless there are 
also other changes to the file too, and it yields that warning if they 
aren't as they should be when there are no other changes.

I have no idea what the cause is- I can't remember seeing this when 
running tests in the hg repo, but I suppose check-code is catching all 
of that.  I was just waiting for the other series to be queued before 
sending out the glob fixes for these tests.

Is there a plan for bringing evolve's test up to date with the hg repo? 
  It seems to predate Windows support, and I don't feel motivated enough 
to pick through the hg history to port just the Windows support changes.

>>> Failed test-prune.t: output changed
>>> # Ran 41 tests, 1 skipped, 6 warned, 1 failed.
>>
>> The prune failure seems like a real bug in evolve d2fe19c818ea /
>> hg fff8e1cec90f:
>
> A clowny bug was recently detected by windows. Can you try again with
> public stable heads of Mercurial ?
>

Will do.

--Matt
Matt Harbison - Sept. 3, 2014, 3:26 a.m.
Pierre-Yves David wrote:
>
>
> On 08/13/2014 02:24 AM, Matt Harbison wrote:
>> On Tue, 12 Aug 2014 19:56:26 -0400, Matt Harbison wrote:
>>
>>> # HG changeset patch
>>> # User Matt Harbison <matt_harbison@yahoo.com>
>>> # Date 1407884993 14400
>>> # Tue Aug 12 19:09:53 2014 -0400
>>> # Node ID 51cda4d2bb2cd52f4e90bf35c4243e33c8ec71bb
>>> # Parent 66f4c5c52d970f145cd218ceed065c3fe096631d
>>> evolve: fix the 'grab' alias to work on Windows
>>>
>>> $ ../../hg/tests/run-tests.py --with-hg=../../hg/hg --blacklist windows
>>> Skipped test-simple4server.t: blacklisted
>>> Warned test-obsolete.t: no result code from test
>>> Warned test-tutorial.t: no result code from test
>>> Warned test-evolve.t: no result code from test
>>> Warned test-userguide.t: no result code from test
>>> Warned test-sharing.t: no result code from test
>>> Warned test-drop.t: no result code from test
>
> Not sure what this Warnings mean. Greg do you have and idea ?
>
>>> Failed test-prune.t: output changed
>>> # Ran 41 tests, 1 skipped, 6 warned, 1 failed.
>>
>> The prune failure seems like a real bug in evolve d2fe19c818ea /
>> hg fff8e1cec90f:
>
> A clowny bug was recently detected by windows. Can you try again with
> public stable heads of Mercurial ?
>

There are a bunch of test failures with hg 3.1.1 and evolve 
6b0cf1b73693, on Windows anyway.  Running default hg (5c153c69fdb2) and 
the same evolve leads to a crash:

...
+    File "c:\Users\Matt\Projects\hg\mercurial\obsolete.py", line 324, 
in __init__
+      self._version, markers = _readmarkers(data)
+    File "c:/Users/Matt/Projects/hg-evolve/hgext/evolve.py", line 469, 
in safereadmarkers
+      if nullid in marker[1]:
+  TypeError: 'int' object is not subscriptable
+  [1]

I'll look further tomorrow when I have more sleep.

--Matt

Patch

diff --git a/tests/test-prune.t b/tests/test-prune.t
--- a/tests/test-prune.t
+++ b/tests/test-prune.t
@@ -257,6 +257,7 @@ 
   $ hg bookmarks
      B                         10:ff43616e5d0f
      delete                    6:2702dd0c91e7
+     todelete                  8:d62d843c9a01
   $ hg prune -B delete
   3 changesets pruned
   bookmark 'delete' deleted