Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 21973:3178e4989202 stable 3.1
status: do not reverse deleted and unknown
When reversing a status, trading "added" and "removed" make sense.
Reversing "deleted" and "unknown" does not. We stop doing it.
The reversing is documented in place for the poor soul not even able to remember
the index of all status elements by heart.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 01 Aug 2014 13:01:35 -0700 |
parents | 8864528874f7 |
children | 7e871e771300 48e32c2c499b |
comparison
equal
deleted
inserted
replaced
21972:8864528874f7 | 21973:3178e4989202 |
---|---|
318 listunknown) | 318 listunknown) |
319 r = ctx2._poststatus(ctx1, r, match, listignored, listclean, | 319 r = ctx2._poststatus(ctx1, r, match, listignored, listclean, |
320 listunknown) | 320 listunknown) |
321 | 321 |
322 if reversed: | 322 if reversed: |
323 r[1], r[2], r[3], r[4] = r[2], r[1], r[4], r[3] | 323 # reverse added and removed |
324 r[1], r[2] = r[2], r[1] | |
324 | 325 |
325 if listsubrepos: | 326 if listsubrepos: |
326 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2): | 327 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2): |
327 rev2 = ctx2.subrev(subpath) | 328 rev2 = ctx2.subrev(subpath) |
328 try: | 329 try: |