質問

I have used mercurial's bfiles extension for some time and it works fine. The only problems are installation and the special "hg bfadd" command.

Now that Mercurial 2.0 include the largefile extension I would like to switch.

Can't find any tools or guides on how to do it? Anyone tried it yet.

I have several repositories that all use the same store and have the following mercurial.ini.

[bfiles]
store=\\Someserver\Mercurial\bFilesStore
autostatus  = true
autoupdate  = true 
autorefresh = true 
autoput     = *
役に立ちましたか?

解決

You can find the documentation here : https://www.mercurial-scm.org/wiki/LargefilesExtension

To enable the extension add the following to your hgrc :

[extensions]
largefiles =

You can add a new large file with :

hg add --large thisfileislarge

About the migration, the readme.txt of the bfiles extension says something about a migrate.txt file ( https://bitbucket.org/gward/hg-bfiles/overview section "The future"). But I can't find the file anywhere on the repository, maybe he forgot to upload it.

There's also a mail on mercurial-devel about this : https://www.mercurial-scm.org/pipermail/mercurial-devel/2011-October/035161.html but nothing since then.

Maybe the better solution is to contact the author of bfiles about his status on the migration process and keep using the old extension until you have an answer ?

Either way, there's a lot of bug report about largefiles since the release of 2.0, so it's maybe a good idea to wait anyway :)

他のヒント

In the latest hg-bfiles version (from 2011-12-05), if you update to the migrate branch, you get this help file:

bfiles: migrating to largefiles

If you want to migrate from bfiles to the new largefiles extension in Mercurial 2.0, you first have to decide: convert your repo or keep it?

Converting your repo

This is appropriate if:

  • you have a small repository
  • you know exactly where every clone of it is
  • you can replace every clone

It involves creating an new repo with .hgbfiles/ replaced by .hglf/. This means that your changeset IDs will differ, so you cannot pull/push between the old and new repos. You must replace every existing clone with a clone of the converted repo.

The advantage of converting your repo is that you can say goodbye forever to bfiles, and move into the future using largefiles alone.

The process is mostly automated by two shell scripts: convert-repo and convert-store.

  1. Use the convert-repo shell script to convert the repository itself. This is just a wrapper around "hg convert" that takes care of all the fussy details needed to turn .hgbfiles/ into .hglf/. It's easy to run:

    ./convert-repo SRC-REPO DST-REPO

    The resulting DST-REPO is not yet ready to use: you still have to convert the bfiles store to a largefiles store.

  2. Use convert-store to turn the bfiles store into a largefiles store. You must have a local copy of the bfiles store -- so you
    probably want to run this on the server where your bfiles store
    lives. Again, it's easy:

    ./convert-store SRC-STORE DST-REPO/.hg/largefiles

    Putting the store inside your DST-REPO is the easiest way to make largefiles just work.

Keeping your repo

(Yes, that's the end of the file, there's no help on how to keep your repository)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top