Commit Graph

5 Commits

Author SHA1 Message Date
Matt Harbison
b5f40a095f generate-working-copy-states: open() in binary mode when writing content
This avoids changes to the hashes on Windows in test-merge-force.t like so:

    @@ -594,12 +594,12 @@
       content2

       M missing_content2_content3_content4-tracked
    -  <<<<<<< local: 443153eb5b88 - test: local\r (esc)
    -  content4
    -  ||||||| base
    -  =======
    -  content2
    -  >>>>>>> other: 9b2ccd328a08  - test: remote\r (esc)
    +  <<<<<<< local: 0447570f1af6 - test: local
    +  content4
    +  ||||||| base
    +  =======
    +  content2
    +  >>>>>>> other: 85100b8c675b  - test: remote
       missing_content2_content3_content4-tracked.orig:
       content4
2014-12-05 22:58:02 -05:00
Martin von Zweigbergk
06a8686a04 generate-working-copy-states: accept depth arguments on command line
Add a parameter to generate-working-copy-states.py that indicates
how many changesets are wanted. This number impacts all the
subcommands. The current 'filelist' subcommand becomes 'filelist 2',
the current 'base' and 'parent' subcommands become 'state 2 1' and
'state 2 2' respectively, while 'wc' becomes 'state 2 wc'.

See earlier patch for motivation.
2014-11-09 00:10:29 -08:00
Martin von Zweigbergk
5b2b256395 generate-working-copy-states: generalize for depth
The script can currently generate filenames and contents for exactly
two changesets plus the working copy. For some tests (e.g. of plain
dirstate status), only one changeset is needed, while for others
(e.g. merge), three changesets are needed. Let's prepare for such
tests by generalizing the code for any number of changesets.
2014-11-08 23:37:54 -08:00
Martin von Zweigbergk
f1cd015df7 generate-working-copy-states: make 'tracked' a string
The only places the 'tracked' variable is only used is where it's
converted to a string, so let's simplify by using the string value
directly.
2014-11-29 14:39:33 -08:00
Martin von Zweigbergk
f98c64adb9 test-revert: move embedded script to its own file
Move the gen-revert-cases.py out of test-revert.t into its own file so
we can reuse it from other tests (specifically test-status-rev.t).
2014-11-03 16:27:01 -08:00