mercurial/utils/storageutil.py
changeset 48545 5026a0d37526
parent 47341 24ea3ef35238
child 48875 6000f5b25c9b
equal deleted inserted replaced
48544:faa243f345cc 48545:5026a0d37526
   110 
   110 
   111     Returns ``False`` if the file has no copy metadata. Otherwise a
   111     Returns ``False`` if the file has no copy metadata. Otherwise a
   112     2-tuple of the source filename and node.
   112     2-tuple of the source filename and node.
   113     """
   113     """
   114     if store.parents(node)[0] != sha1nodeconstants.nullid:
   114     if store.parents(node)[0] != sha1nodeconstants.nullid:
       
   115         # When creating a copy or move we set filelog parents to null,
       
   116         # because contents are probably unrelated and making a delta
       
   117         # would not be useful.
       
   118         # Conversely, if filelog p1 is non-null we know
       
   119         # there is no copy metadata.
       
   120         # In the presence of merges, this reasoning becomes invalid
       
   121         # if we reorder parents. See tests/test-issue6528.t.
   115         return False
   122         return False
   116 
   123 
   117     meta = parsemeta(store.revision(node))[0]
   124     meta = parsemeta(store.revision(node))[0]
   118 
   125 
   119     # copy and copyrev occur in pairs. In rare cases due to old bugs,
   126     # copy and copyrev occur in pairs. In rare cases due to old bugs,