Skip to content
Snippets Groups Projects
  • Matt Harbison's avatar
    69804c04
    convert: don't drop commits that are empty in the source when using --filemap · 69804c04
    Matt Harbison authored
    I ran into this when using `hg lfconvert --to-normal` (which uses the filemap
    class internally), and saw that commits with nothing but a branch change were
    dropped.  We could put in an option that only lfconvert uses internally.  But
    silently dropping anything other than a commit where all changes were excluded
    seems unintended.  For example, there's a message in mercurial_sink.putcommit()
    if it drops an empty commit.  (And the reason that isn't kicking in here is
    because lfconvert isn't passing --filemap, so the self.filemapmode conditional
    there is always False.)
    
    The naive change of `return not files` broke test-convert-filemap.t, so this is
    a little more elaborate than needed for converting from largefiles.
    69804c04
    History
    convert: don't drop commits that are empty in the source when using --filemap
    Matt Harbison authored
    I ran into this when using `hg lfconvert --to-normal` (which uses the filemap
    class internally), and saw that commits with nothing but a branch change were
    dropped.  We could put in an option that only lfconvert uses internally.  But
    silently dropping anything other than a commit where all changes were excluded
    seems unintended.  For example, there's a message in mercurial_sink.putcommit()
    if it drops an empty commit.  (And the reason that isn't kicking in here is
    because lfconvert isn't passing --filemap, so the self.filemapmode conditional
    there is always False.)
    
    The naive change of `return not files` broke test-convert-filemap.t, so this is
    a little more elaborate than needed for converting from largefiles.