Mercurial > hg
comparison mercurial/debugcommands.py @ 46237:bc884e31b8c8
debuglock: rename flag names to better clarity
`--force-lock` sounds as if we are taking the lock however in reality it's the
opposite.
Differential Revision: https://phab.mercurial-scm.org/D9690
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 08 Jan 2021 18:07:33 +0530 |
parents | 2dbe6053d49a |
children | f25c770c217b 8408c3198ec1 |
comparison
equal
deleted
inserted
replaced
46236:eec47efe219d | 46237:bc884e31b8c8 |
---|---|
1887 | 1887 |
1888 | 1888 |
1889 @command( | 1889 @command( |
1890 b'debuglocks', | 1890 b'debuglocks', |
1891 [ | 1891 [ |
1892 (b'L', b'force-lock', None, _(b'free the store lock (DANGEROUS)')), | 1892 (b'L', b'force-free-lock', None, _(b'free the store lock (DANGEROUS)')), |
1893 ( | 1893 ( |
1894 b'W', | 1894 b'W', |
1895 b'force-wlock', | 1895 b'force-free-wlock', |
1896 None, | 1896 None, |
1897 _(b'free the working state lock (DANGEROUS)'), | 1897 _(b'free the working state lock (DANGEROUS)'), |
1898 ), | 1898 ), |
1899 (b's', b'set-lock', None, _(b'set the store lock until stopped')), | 1899 (b's', b'set-lock', None, _(b'set the store lock until stopped')), |
1900 ( | 1900 ( |
1929 | 1929 |
1930 Returns 0 if no locks are held. | 1930 Returns 0 if no locks are held. |
1931 | 1931 |
1932 """ | 1932 """ |
1933 | 1933 |
1934 if opts.get('force_lock'): | 1934 if opts.get('force_free_lock'): |
1935 repo.svfs.unlink(b'lock') | 1935 repo.svfs.unlink(b'lock') |
1936 if opts.get('force_wlock'): | 1936 if opts.get('force_free_wlock'): |
1937 repo.vfs.unlink(b'wlock') | 1937 repo.vfs.unlink(b'wlock') |
1938 if opts.get('force_lock') or opts.get('force_wlock'): | 1938 if opts.get('force_free_lock') or opts.get('force_free_wlock'): |
1939 return 0 | 1939 return 0 |
1940 | 1940 |
1941 locks = [] | 1941 locks = [] |
1942 try: | 1942 try: |
1943 if opts.get('set_wlock'): | 1943 if opts.get('set_wlock'): |