D8043: graphlog: use '%' for other context in merge conflict
martinvonz edited the summary of this revision. martinvonz retitled this revision from "graphlog: use '@' also for other context in merge conflict" to "graphlog: use '%' for other context in merge conflict". martinvonz updated this revision to Diff 19723. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8043?vs=19703&id=19723 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8043/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8043 AFFECTED FILES hgext/beautifygraph.py mercurial/hgweb/webutil.py mercurial/logcmdutil.py mercurial/templatekw.py relnotes/next tests/test-backout.t tests/test-graft-interrupted.t tests/test-rebase-collapse.t tests/test-strip.t tests/test-update-branches.t CHANGE DETAILS diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t --- a/tests/test-update-branches.t +++ b/tests/test-update-branches.t @@ -254,7 +254,7 @@ | @ 4:d047485b3896 0:60829823a42a b1 | - | o 3:6efa171f091b 1:0786582aa4b1 + | % 3:6efa171f091b 1:0786582aa4b1 | | | | o 2:bd10386d478c | |/ diff --git a/tests/test-strip.t b/tests/test-strip.t --- a/tests/test-strip.t +++ b/tests/test-strip.t @@ -598,7 +598,7 @@ | date:Thu Jan 01 00:00:00 1970 + | summary: b | - o changeset: 0:9ab35a2d17cb + % changeset: 0:9ab35a2d17cb user:test date:Thu Jan 01 00:00:00 1970 + summary: a diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t --- a/tests/test-rebase-collapse.t +++ b/tests/test-rebase-collapse.t @@ -762,7 +762,7 @@ abort: edit failed: false exited with status 1 [255] $ hg tglog - o 3: 63668d570d21 'C' + % 3: 63668d570d21 'C' | | @ 2: 82b8abf9c185 'D' | | diff --git a/tests/test-graft-interrupted.t b/tests/test-graft-interrupted.t --- a/tests/test-graft-interrupted.t +++ b/tests/test-graft-interrupted.t @@ -431,7 +431,7 @@ $ hg log -GT "{rev}:{node|short} {desc}" @ 6:6ec71c037d94 added x | - | o 5:36b793615f78 added foo to c + | % 5:36b793615f78 added foo to c | | | | o 4:863a25e1a9ea added x | |/ @@ -622,7 +622,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | @@ -669,7 +669,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | @@ -712,7 +712,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | diff --git a/tests/test-backout.t b/tests/test-backout.t --- a/tests/test-backout.t +++ b/tests/test-backout.t @@ -103,7 +103,7 @@ | date:Thu Jan 01 00:00:02 1970 + | summary: grapes | - o changeset: 1:22cb4f70d813 + % changeset: 1:22cb4f70d813 | user:test | date:Thu Jan 01 00:00:01 1970 + | summary: chair @@ -748,7 +748,7 @@ | date:Thu Jan 01 00:00:00 1970 + | summary: capital three | - o changeset: 0:a30dd8addae3 + % changeset: 0:a30dd8addae3 user:test date:Thu Jan 01 00:00:00 1970 + summary: initial diff --git a/relnotes/next b/relnotes/next --- a/relnotes/next +++ b/relnotes/next @@ -1,5 +1,10 @@ == New Features == + * `hg log` now defaults to using an '%' symbol for parents of +unresolved merge conflicts. That includes unresolved conflicts +caused by e.g. `hg update --merge` and `hg graft`. '@' still takes +precedence, so when what used to be marked '@' still is. + * New `conflictparents()` revset returns the commits that are being merged, when there are conflicts. Also works for conflicts caused by e.g. `hg graft`. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -396,26 +396,38 @@ return templateutil.compatfileslist(context, mapping, b'file', ctx.files()) -@templatekeyword(b'graphnode', requires={b'repo', b'ctx'}) +@templatekeyword(b'graphnode', requires={b'repo', b'ctx', b'cache'}) def showgraphnode(context, mapping): """String. The character representing the changeset node in an ASCII revision graph.""" repo = context.resource(mapping, b'repo') ctx = context.resource(mapping, b'ctx') -return getgraphnode(repo, ctx) +cache = context.resource(mapping, b'cache') +return getgraphnode(repo, ctx, cache) -def getgraphnode(repo, ctx): -return getgraphnodecurrent(repo, ctx) or getgraphnodesymbol(ctx) +def getgraphnode(repo, ctx, cache): +return getgraphnodecurrent(repo, ctx, cache) or getgraphnodesymbol(ctx) -def getgra
D8043: graphlog: use '%' for other context in merge conflict
martinvonz updated this revision to Diff 19870. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8043?vs=19723&id=19870 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8043/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8043 AFFECTED FILES hgext/beautifygraph.py mercurial/hgweb/webutil.py mercurial/logcmdutil.py mercurial/templatekw.py relnotes/next tests/test-backout.t tests/test-graft-interrupted.t tests/test-rebase-collapse.t tests/test-strip.t tests/test-update-branches.t CHANGE DETAILS diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t --- a/tests/test-update-branches.t +++ b/tests/test-update-branches.t @@ -254,7 +254,7 @@ | @ 4:d047485b3896 0:60829823a42a b1 | - | o 3:6efa171f091b 1:0786582aa4b1 + | % 3:6efa171f091b 1:0786582aa4b1 | | | | o 2:bd10386d478c | |/ diff --git a/tests/test-strip.t b/tests/test-strip.t --- a/tests/test-strip.t +++ b/tests/test-strip.t @@ -598,7 +598,7 @@ | date:Thu Jan 01 00:00:00 1970 + | summary: b | - o changeset: 0:9ab35a2d17cb + % changeset: 0:9ab35a2d17cb user:test date:Thu Jan 01 00:00:00 1970 + summary: a diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t --- a/tests/test-rebase-collapse.t +++ b/tests/test-rebase-collapse.t @@ -762,7 +762,7 @@ abort: edit failed: false exited with status 1 [255] $ hg tglog - o 3: 63668d570d21 'C' + % 3: 63668d570d21 'C' | | @ 2: 82b8abf9c185 'D' | | diff --git a/tests/test-graft-interrupted.t b/tests/test-graft-interrupted.t --- a/tests/test-graft-interrupted.t +++ b/tests/test-graft-interrupted.t @@ -431,7 +431,7 @@ $ hg log -GT "{rev}:{node|short} {desc}" @ 6:6ec71c037d94 added x | - | o 5:36b793615f78 added foo to c + | % 5:36b793615f78 added foo to c | | | | o 4:863a25e1a9ea added x | |/ @@ -622,7 +622,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | @@ -669,7 +669,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | @@ -712,7 +712,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | diff --git a/tests/test-backout.t b/tests/test-backout.t --- a/tests/test-backout.t +++ b/tests/test-backout.t @@ -103,7 +103,7 @@ | date:Thu Jan 01 00:00:02 1970 + | summary: grapes | - o changeset: 1:22cb4f70d813 + % changeset: 1:22cb4f70d813 | user:test | date:Thu Jan 01 00:00:01 1970 + | summary: chair @@ -748,7 +748,7 @@ | date:Thu Jan 01 00:00:00 1970 + | summary: capital three | - o changeset: 0:a30dd8addae3 + % changeset: 0:a30dd8addae3 user:test date:Thu Jan 01 00:00:00 1970 + summary: initial diff --git a/relnotes/next b/relnotes/next --- a/relnotes/next +++ b/relnotes/next @@ -1,5 +1,10 @@ == New Features == + * `hg log` now defaults to using an '%' symbol for commits involved +in unresolved merge conflicts. That includes unresolved conflicts +caused by e.g. `hg update --merge` and `hg graft`. '@' still takes +precedence, so what used to be marked '@' still is. + * New `conflictlocal()` and `conflictother()` revsets returns the commits that are being merged, when there are conflicts. Also works for conflicts caused by e.g. `hg graft`. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -396,26 +396,38 @@ return templateutil.compatfileslist(context, mapping, b'file', ctx.files()) -@templatekeyword(b'graphnode', requires={b'repo', b'ctx'}) +@templatekeyword(b'graphnode', requires={b'repo', b'ctx', b'cache'}) def showgraphnode(context, mapping): """String. The character representing the changeset node in an ASCII revision graph.""" repo = context.resource(mapping, b'repo') ctx = context.resource(mapping, b'ctx') -return getgraphnode(repo, ctx) +cache = context.resource(mapping, b'cache') +return getgraphnode(repo, ctx, cache) -def getgraphnode(repo, ctx): -return getgraphnodecurrent(repo, ctx) or getgraphnodesymbol(ctx) +def getgraphnode(repo, ctx, cache): +return getgraphnodecurrent(repo, ctx, cache) or getgraphnodesymbol(ctx) -def getgraphnodecurrent(repo, ctx): +def getgraphnodecurrent(repo, ctx, cache): wpnodes = repo.dirstate.parents() if wpnodes[1] == nullid: wpnodes = wpnodes[:1] if ctx.nod
D8043: graphlog: use '%' for other context in merge conflict
Herald added a subscriber: mjpieters. martinvonz updated this revision to Diff 20095. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8043?vs=19870&id=20095 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8043/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8043 AFFECTED FILES hgext/beautifygraph.py mercurial/hgweb/webutil.py mercurial/logcmdutil.py mercurial/templatekw.py relnotes/next tests/test-backout.t tests/test-graft-interrupted.t tests/test-rebase-collapse.t tests/test-strip.t tests/test-update-branches.t CHANGE DETAILS diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t --- a/tests/test-update-branches.t +++ b/tests/test-update-branches.t @@ -254,7 +254,7 @@ | @ 4:d047485b3896 0:60829823a42a b1 | - | o 3:6efa171f091b 1:0786582aa4b1 + | % 3:6efa171f091b 1:0786582aa4b1 | | | | o 2:bd10386d478c | |/ diff --git a/tests/test-strip.t b/tests/test-strip.t --- a/tests/test-strip.t +++ b/tests/test-strip.t @@ -598,7 +598,7 @@ | date:Thu Jan 01 00:00:00 1970 + | summary: b | - o changeset: 0:9ab35a2d17cb + % changeset: 0:9ab35a2d17cb user:test date:Thu Jan 01 00:00:00 1970 + summary: a diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t --- a/tests/test-rebase-collapse.t +++ b/tests/test-rebase-collapse.t @@ -762,7 +762,7 @@ abort: edit failed: false exited with status 1 [255] $ hg tglog - o 3: 63668d570d21 'C' + % 3: 63668d570d21 'C' | | @ 2: 82b8abf9c185 'D' | | diff --git a/tests/test-graft-interrupted.t b/tests/test-graft-interrupted.t --- a/tests/test-graft-interrupted.t +++ b/tests/test-graft-interrupted.t @@ -431,7 +431,7 @@ $ hg log -GT "{rev}:{node|short} {desc}" @ 6:6ec71c037d94 added x | - | o 5:36b793615f78 added foo to c + | % 5:36b793615f78 added foo to c | | | | o 4:863a25e1a9ea added x | |/ @@ -622,7 +622,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | @@ -669,7 +669,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | @@ -712,7 +712,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | diff --git a/tests/test-backout.t b/tests/test-backout.t --- a/tests/test-backout.t +++ b/tests/test-backout.t @@ -103,7 +103,7 @@ | date:Thu Jan 01 00:00:02 1970 + | summary: grapes | - o changeset: 1:22cb4f70d813 + % changeset: 1:22cb4f70d813 | user:test | date:Thu Jan 01 00:00:01 1970 + | summary: chair @@ -748,7 +748,7 @@ | date:Thu Jan 01 00:00:00 1970 + | summary: capital three | - o changeset: 0:a30dd8addae3 + % changeset: 0:a30dd8addae3 user:test date:Thu Jan 01 00:00:00 1970 + summary: initial diff --git a/relnotes/next b/relnotes/next --- a/relnotes/next +++ b/relnotes/next @@ -3,7 +3,12 @@ * `hg purge`/`hg clean` can now delete ignored files instead of untracked files, with the new -i flag. - * New `conflictlocal()` and `conflictother()` revsets returns the + * `hg log` now defaults to using an '%' symbol for commits involved +in unresolved merge conflicts. That includes unresolved conflicts +caused by e.g. `hg update --merge` and `hg graft`. '@' still takes +precedence, so what used to be marked '@' still is. + + * New `conflictlocal()` and `conflictother()` revsets return the commits that are being merged, when there are conflicts. Also works for conflicts caused by e.g. `hg graft`. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -396,26 +396,38 @@ return templateutil.compatfileslist(context, mapping, b'file', ctx.files()) -@templatekeyword(b'graphnode', requires={b'repo', b'ctx'}) +@templatekeyword(b'graphnode', requires={b'repo', b'ctx', b'cache'}) def showgraphnode(context, mapping): """String. The character representing the changeset node in an ASCII revision graph.""" repo = context.resource(mapping, b'repo') ctx = context.resource(mapping, b'ctx') -return getgraphnode(repo, ctx) +cache = context.resource(mapping, b'cache') +return getgraphnode(repo, ctx, cache) -def getgraphnode(repo, ctx): -return getgraphnodecurrent(repo, ctx) or getgraphnodesymbol(ctx) +def getgraphnode(repo, ctx, cache): +return getgraphnodecurrent(repo, ctx, cache) or getgraphnodesymbol(ctx)
D8043: graphlog: use '%' for other context in merge conflict
Closed by commit rHG14d0e89520a2: graphlog: use '%' for other context in merge conflict (authored by martinvonz). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8043?vs=20095&id=20135 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8043/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8043 AFFECTED FILES hgext/beautifygraph.py mercurial/hgweb/webutil.py mercurial/logcmdutil.py mercurial/templatekw.py relnotes/next tests/test-backout.t tests/test-graft-interrupted.t tests/test-rebase-collapse.t tests/test-strip.t tests/test-update-branches.t CHANGE DETAILS diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t --- a/tests/test-update-branches.t +++ b/tests/test-update-branches.t @@ -254,7 +254,7 @@ | @ 4:d047485b3896 0:60829823a42a b1 | - | o 3:6efa171f091b 1:0786582aa4b1 + | % 3:6efa171f091b 1:0786582aa4b1 | | | | o 2:bd10386d478c | |/ diff --git a/tests/test-strip.t b/tests/test-strip.t --- a/tests/test-strip.t +++ b/tests/test-strip.t @@ -598,7 +598,7 @@ | date:Thu Jan 01 00:00:00 1970 + | summary: b | - o changeset: 0:9ab35a2d17cb + % changeset: 0:9ab35a2d17cb user:test date:Thu Jan 01 00:00:00 1970 + summary: a diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t --- a/tests/test-rebase-collapse.t +++ b/tests/test-rebase-collapse.t @@ -762,7 +762,7 @@ abort: edit failed: false exited with status 1 [255] $ hg tglog - o 3: 63668d570d21 'C' + % 3: 63668d570d21 'C' | | @ 2: 82b8abf9c185 'D' | | diff --git a/tests/test-graft-interrupted.t b/tests/test-graft-interrupted.t --- a/tests/test-graft-interrupted.t +++ b/tests/test-graft-interrupted.t @@ -431,7 +431,7 @@ $ hg log -GT "{rev}:{node|short} {desc}" @ 6:6ec71c037d94 added x | - | o 5:36b793615f78 added foo to c + | % 5:36b793615f78 added foo to c | | | | o 4:863a25e1a9ea added x | |/ @@ -622,7 +622,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | @@ -669,7 +669,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | @@ -712,7 +712,7 @@ $ hg log -GT "{rev}:{node|short} {desc}\n" @ 4:2aa9ad1006ff B in file a | - | o 3:09e253b87e17 A in file a + | % 3:09e253b87e17 A in file a | | | o 2:d36c0562f908 c | | diff --git a/tests/test-backout.t b/tests/test-backout.t --- a/tests/test-backout.t +++ b/tests/test-backout.t @@ -103,7 +103,7 @@ | date:Thu Jan 01 00:00:02 1970 + | summary: grapes | - o changeset: 1:22cb4f70d813 + % changeset: 1:22cb4f70d813 | user:test | date:Thu Jan 01 00:00:01 1970 + | summary: chair @@ -748,7 +748,7 @@ | date:Thu Jan 01 00:00:00 1970 + | summary: capital three | - o changeset: 0:a30dd8addae3 + % changeset: 0:a30dd8addae3 user:test date:Thu Jan 01 00:00:00 1970 + summary: initial diff --git a/relnotes/next b/relnotes/next --- a/relnotes/next +++ b/relnotes/next @@ -3,7 +3,12 @@ * `hg purge`/`hg clean` can now delete ignored files instead of untracked files, with the new -i flag. - * New `conflictlocal()` and `conflictother()` revsets returns the + * `hg log` now defaults to using an '%' symbol for commits involved +in unresolved merge conflicts. That includes unresolved conflicts +caused by e.g. `hg update --merge` and `hg graft`. '@' still takes +precedence, so what used to be marked '@' still is. + + * New `conflictlocal()` and `conflictother()` revsets return the commits that are being merged, when there are conflicts. Also works for conflicts caused by e.g. `hg graft`. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -396,26 +396,38 @@ return templateutil.compatfileslist(context, mapping, b'file', ctx.files()) -@templatekeyword(b'graphnode', requires={b'repo', b'ctx'}) +@templatekeyword(b'graphnode', requires={b'repo', b'ctx', b'cache'}) def showgraphnode(context, mapping): """String. The character representing the changeset node in an ASCII revision graph.""" repo = context.resource(mapping, b'repo') ctx = context.resource(mapping, b'ctx') -return getgraphnode(repo, ctx) +cache = context.resource(mapping, b'cache') +return getgraphnode(repo, ctx, cache) -def getgraphnode(repo, ctx): -return getgraphnodecurrent(repo, ctx) or getgraphnodesymbol(ctx) +def getgraphnode(repo, ctx, cach