Some problems with largefiles extension

Long Vu long.vu at intelerad.com
Thu Nov 21 14:11:05 CST 2013


Hi,

We've been experimenting with largefiles (mercurial 2.8) and have a
few questions.

1. hg log --patch -r cset_modifying_a_largefile gives an error but hg
diff --change works.  Is this intended by design or it's a bug with hg
log --patch?

  $ hg log -pr .
  abort: large1 at d1da217c0b36: not found in manifest!
  [255]
  $ hg diff -c . --nodates
  diff -r 9b4c87b6db0b -r d1da217c0b36 .hglf/large1
  --- a/.hglf/large1
  +++ b/.hglf/large1
  @@ -1,1 +1,1 @@
  -4669e532d5b2c093a78eca010077e708a071bb64
  +bde8d9a1ba40f2167cc3b36f0621cbefcee42aa1
  diff -r 9b4c87b6db0b -r d1da217c0b36 normal1
  --- a/normal1
  +++ b/normal1
  @@ -1,1 +1,2 @@
   normal1
  +normal1


2. If we change our mind and want to convert a largefiles back to a
normal file, is there a way to do it, keeping history of the time the
file was a largefiles?


3. Class lfilesrepo (in largefiles/reposetup.py), method push calls
the super class method push without using keyword args, breaking API.

So lfilesrepo.push() is declared this way:

  def push(self, remote, force=False, revs=None, newbranch=False):

But it calls the super class push method this way:

  return super(lfilesrepo, self).push(remote, force, revs,
      newbranch)

We think it would be better form to call the super class push method this way:

  return super(lfilesrepo, self).push(remote, force, revs=revs,
      newbranch=newbranch)

Which will not break other extensions overriding the push method this way:

  def push(self, remote, force=False, **kwargs):


4. When upstream repo has largefiles enabled, doing a pull on a local
repo without largefiles enabled resulted in the following error:

  $ hg pull ../remote --config extensions.largefiles=!
  abort: unknown repository format: requires features 'largefiles'
(upgrade Mercurial)!
  [255]

Is there a way to not have that error on pull (so to have a successful
pull) but only get the error on update (which will really need to
fetch the proper largefiles)?

Pull only fetch the largefiles for revision tip (tip after pull is
done).  But the user can chose to update to some other revisions than
tip after the pull.

So the initial largefiles caching done by pull is not absolutely
necessary.  On the other hand, a user that only perform a pull for
history inspection, is forced to cache a largefiles that he is
probably not going to need because he won't do any update.


-- 
Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743

-- 

This email or any attachments may contain confidential or legally 
privileged information intended for the sole use of the addressees. Any 
use, redistribution, disclosure, or reproduction of this information, 
except as intended, is prohibited. If you received this email in error, 
please notify the sender and remove all copies of the message, including 
any attachments.



More information about the Mercurial mailing list