Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
| Automatic diff as part of commit; lint not applicable. |
| Automatic diff as part of commit; unit tests not applicable. |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/copies.py (5 lines) | |||
| M | tests/test-shelve.t (15 lines) |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | martinvonz | ||
| Closed | martinvonz |
| def _checksinglesidecopies( | def _checksinglesidecopies( | ||||
| src, dsts1, m1, m2, mb, c2, base, copy, renamedelete | src, dsts1, m1, m2, mb, c2, base, copy, renamedelete | ||||
| ): | ): | ||||
| if src not in m2: | if src not in m2: | ||||
| # deleted on side 2 | # deleted on side 2 | ||||
| if src not in m1: | if src not in m1: | ||||
| # renamed on side 1, deleted on side 2 | # renamed on side 1, deleted on side 2 | ||||
| renamedelete[src] = dsts1 | renamedelete[src] = dsts1 | ||||
| elif src not in mb: | |||||
| # Work around the "short-circuit to avoid issues with merge states" | |||||
| # thing in pathcopies(): pathcopies(x, y) can return a copy where the | |||||
| # destination doesn't exist in y. | |||||
| pass | |||||
| elif m2[src] != mb[src]: | elif m2[src] != mb[src]: | ||||
| if not _related(c2[src], base[src]): | if not _related(c2[src], base[src]): | ||||
| return | return | ||||
| # modified on side 2 | # modified on side 2 | ||||
| for dst in dsts1: | for dst in dsts1: | ||||
| if dst not in m2: | if dst not in m2: | ||||
| # dst not added on side 2 (handle as regular | # dst not added on side 2 (handle as regular | ||||
| # "both created" case in manifestmerge otherwise) | # "both created" case in manifestmerge otherwise) | ||||
| c | c | ||||
| R b/b | R b/b | ||||
| R d | R d | ||||
| ! ghost | ! ghost | ||||
| d | d | ||||
| the common case - no options or filenames | the common case - no options or filenames | ||||
| $ hg shelve 2>&1 | grep KeyError | $ hg shelve | ||||
| KeyError: 'No such manifest entry.' (no-pure !) | shelved as default-01 | ||||
| raise KeyError (pure !) | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | ||||
| KeyError (pure !) | |||||
| # Get out of the broken state so later tests work | |||||
| $ hg forget b.rename/b c.copy ghost | |||||
| $ hg revert a/a b/b d | |||||
| $ rm a/a.orig b.rename/b c.copy | |||||
| $ hg status -C | $ hg status -C | ||||
| ensure that our shelved changes exist | ensure that our shelved changes exist | ||||
| $ hg shelve -l | $ hg shelve -l | ||||
| default-01 (*)* changes to: [mq]: second.patch (glob) | default-01 (*)* changes to: [mq]: second.patch (glob) | ||||
| default (*)* changes to: [mq]: second.patch (glob) | default (*)* changes to: [mq]: second.patch (glob) | ||||
| # To abort: hg unshelve --abort | # To abort: hg unshelve --abort | ||||
| ensure that we have a merge with unresolved conflicts | ensure that we have a merge with unresolved conflicts | ||||
| #if phasebased | #if phasebased | ||||
| $ hg heads -q --template '{rev}\n' | $ hg heads -q --template '{rev}\n' | ||||
| 8 | 8 | ||||
| 6 | 5 | ||||
| $ hg parents -q --template '{rev}\n' | $ hg parents -q --template '{rev}\n' | ||||
| 8 | 8 | ||||
| 6 | 5 | ||||
| #endif | #endif | ||||
| #if stripbased | #if stripbased | ||||
| $ hg heads -q --template '{rev}\n' | $ hg heads -q --template '{rev}\n' | ||||
| 5 | 5 | ||||
| 4 | 4 | ||||
| $ hg parents -q --template '{rev}\n' | $ hg parents -q --template '{rev}\n' | ||||
| 4 | 4 | ||||