Show More
@@ -1499,13 +1499,9 b' class workingctx(committablectx):' | |||||
1499 | listclean=False, listunknown=False, listsubrepos=False): |
|
1499 | listclean=False, listunknown=False, listsubrepos=False): | |
1500 | # yet to be determined: what to do if 'other' is a 'workingctx' or a |
|
1500 | # yet to be determined: what to do if 'other' is a 'workingctx' or a | |
1501 | # 'memctx'? |
|
1501 | # 'memctx'? | |
1502 |
|
|
1502 | return super(workingctx, self).status(other, match, listignored, | |
1503 |
listunknown, |
|
1503 | listclean, listunknown, | |
1504 | # calling 'super' subtly reveresed the contexts, so we flip the results |
|
1504 | listsubrepos) | |
1505 | # (s[1] is 'added' and s[2] is 'removed') |
|
|||
1506 | s = list(s) |
|
|||
1507 | s[1], s[2] = s[2], s[1] |
|
|||
1508 | return scmutil.status(*s) |
|
|||
1509 |
|
1505 | |||
1510 | class committablefilectx(basefilectx): |
|
1506 | class committablefilectx(basefilectx): | |
1511 | """A committablefilectx provides common functionality for a file context |
|
1507 | """A committablefilectx provides common functionality for a file context |
@@ -42,3 +42,24 b'' | |||||
42 | -g |
|
42 | -g | |
43 | -h |
|
43 | -h | |
44 |
|
44 | |||
|
45 | should show removed file 'a' as being added | |||
|
46 | $ hg revert a | |||
|
47 | $ hg rm a | |||
|
48 | $ hg diff --reverse --nodates a | |||
|
49 | diff -r 2855cdcfcbb7 a | |||
|
50 | --- /dev/null | |||
|
51 | +++ b/a | |||
|
52 | @@ -0,0 +1,3 @@ | |||
|
53 | +d | |||
|
54 | +e | |||
|
55 | +f | |||
|
56 | ||||
|
57 | should show added file 'b' as being removed | |||
|
58 | $ echo b >> b | |||
|
59 | $ hg add b | |||
|
60 | $ hg diff --reverse --nodates b | |||
|
61 | diff -r 2855cdcfcbb7 b | |||
|
62 | --- a/b | |||
|
63 | +++ /dev/null | |||
|
64 | @@ -1,1 +0,0 @@ | |||
|
65 | -b |
General Comments 0
You need to be logged in to leave comments.
Login now