Patchwork D6544: logcmdutil: also check for copies in null revision and working copy

login
register
mail settings
Submitter phabricator
Date June 19, 2019, 9:55 p.m.
Message ID <14f081a1603d9325fdab6cfa0867baf5@localhost.localdomain>
Download mbox | patch
Permalink /patch/40613/
State Not Applicable
Headers show

Comments

phabricator - June 19, 2019, 9:55 p.m.
Closed by commit rHGc929f612afac: logcmdutil: also check for copies in null revision and working copy (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/D6544?vs=15594&id=15606

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6544/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6544

AFFECTED FILES
  mercurial/logcmdutil.py
  tests/test-status.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -630,7 +630,6 @@ 
     b
   R b
   
-BROKEN: as above, 'a' should be marked a copy
   $ hg log -GTstatus -r 'wdir()' -C
   o  changeset:   2147483647:ffffffffffff
   |  parent:      0:8c55c58b4c0e
@@ -638,6 +637,7 @@ 
      date:        * (glob)
      files:
      M a
+       b
      R b
   
 
diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -891,7 +891,7 @@ 
     for rev, type, ctx, parents in dag:
         char = formatnode(repo, ctx)
         copies = None
-        if getrenamed and ctx.rev():
+        if getrenamed:
             copies = []
             for fn in ctx.files():
                 rename = getrenamed(fn, ctx.rev())
@@ -919,7 +919,7 @@ 
     for rev in revs:
         ctx = repo[rev]
         copies = None
-        if getrenamed is not None and rev:
+        if getrenamed is not None:
             copies = []
             for fn in ctx.files():
                 rename = getrenamed(fn, rev)