[PATCH 3 of 3 V2] shelve: support sharing of shelves when using a shared repository

Yuya Nishihara yuya at tcha.org
Tue Apr 12 09:44:52 EDT 2016


On Sat, 9 Apr 2016 10:34:10 -0700, Oleg Afanasyev wrote:
> # HG changeset patch
> # User Oleg Afanasyev <olegaf at fb.com>
> # Date 1460186357 25200
> #      Sat Apr 09 00:19:17 2016 -0700
> # Node ID 2ff1d244b437194883fc1b7fea956a8712f34e39
> # Parent  3794055fbea2c129666292fb69df6c980fd886fb
> shelve: support sharing of shelves when using a shared repository

Looks like this should be marked as BC (behavior change) as the sharing
is not optional.

> @@ -409,7 +409,7 @@
>      """subcommand that deletes all shelves"""
>  
>      with repo.wlock():
> -        for (name, _type) in repo.vfs.readdir(shelvedir):
> +        for (name, _type) in repo.sharedvfs().readdir(shelvedir):
>              suffix = name.rsplit('.', 1)[-1]
>              if suffix in ('hg', 'patch'):
>                  shelvedfile(repo, name).movetobackup()

Is the "shared" shelvedir is covered by wlock? I suspect it would need
sharedwlock or something.


More information about the Mercurial-devel mailing list