[Bug 5585] New: Largefiles: addremove converts large files to normal files

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Fri Jun 2 12:20:13 UTC 2017


https://bz.mercurial-scm.org/show_bug.cgi?id=5585

            Bug ID: 5585
           Summary: Largefiles: addremove converts large files to normal
                    files
           Product: Mercurial
           Version: 4.1
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: largefiles
          Assignee: bugzilla at mercurial-scm.org
          Reporter: abcz2.uprola at gmail.com
                CC: mercurial-devel at mercurial-scm.org, natosha at gmail.com

Largefiles: addremove converts large files to normal files after files where
renamed via OS. By contrast, `hg rename` leaves largefiles after rename. This
happens even when similarity is 100%.

The bad thing, user doesn't notice the transition.

Here is a test, that I would expect from addremove behavior (with corresponding
`hg rename` behavior):

---------------------
  $ cat >> $HGRCPATH <<EOF
  > [extensions]
  > largefiles=
  > EOF

  $ hg init lf_rename
  $ cd lf_rename

hg rename should change the path of largefiles in .hglf

  $ touch first_largefile
  $ hg add --large first_largefile
  $ hg commit -m "add"
  $ hg rename first_largefile dir/first_largefile
  $ hg commit -m "add"
  $ ls .hglf
  dir
  $ ls .hglf/dir
  first_largefile

addremove with largefiles should change largefiles path in .hglf

  $ touch largefile
  $ hg add --large largefile
  $ hg commit -m "added"                                                        

  $ ls .hglf
  dir
  largefile

  $ mkdir dir2
  $ mv largefile dir2
  $ hg addremove -s 100
  removing largefile
  adding dir2/largefile

and should convert largefile to normal file

  $ hg commit -m "renamed using addremove"
  $ ls .hglf/dir2
  largefile
  $ ls -d .hglf/*
  .hglf/dir
  .hglf/dir2
  $ ls .hg/store/data
  ~2ehglf
--------------

but here is the reality:

--------------
   $ hg commit -m "renamed using addremove"
   $ ls .hglf/dir2
-  largefile
+  ls: cannot access '.hglf/dir2': No such file or directory
+  [2] 
   $ ls -d .hglf/*
   .hglf/dir
-  .hglf/dir2
+  .hglf/largefile
   $ ls .hg/store/data
+  dir2 
   ~2ehglf
---------------

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list