##// END OF EJS Templates
merge: break up two not-so-one-liner for extra readability...
marmoute -
r49552:6c4b10d0 default
parent child Browse files
Show More
@@ -1885,22 +1885,11 b' def _update('
1885 # updatecheck='abort' to better suppport some of these callers.
1885 # updatecheck='abort' to better suppport some of these callers.
1886 if updatecheck is None:
1886 if updatecheck is None:
1887 updatecheck = UPDATECHECK_LINEAR
1887 updatecheck = UPDATECHECK_LINEAR
1888 if updatecheck not in (
1888 okay = (UPDATECHECK_NONE, UPDATECHECK_LINEAR, UPDATECHECK_NO_CONFLICT)
1889 UPDATECHECK_NONE,
1889 if updatecheck not in okay:
1890 UPDATECHECK_LINEAR,
1890 msg = r'Invalid updatecheck %r (can accept %r)'
1891 UPDATECHECK_NO_CONFLICT,
1891 msg %= (updatecheck, okay)
1892 ):
1892 raise ValueError(msg)
1893 raise ValueError(
1894 r'Invalid updatecheck %r (can accept %r)'
1895 % (
1896 updatecheck,
1897 (
1898 UPDATECHECK_NONE,
1899 UPDATECHECK_LINEAR,
1900 UPDATECHECK_NO_CONFLICT,
1901 ),
1902 )
1903 )
1904 if wc is not None and wc.isinmemory():
1893 if wc is not None and wc.isinmemory():
1905 maybe_wlock = util.nullcontextmanager()
1894 maybe_wlock = util.nullcontextmanager()
1906 else:
1895 else:
@@ -1929,10 +1918,9 b' def _update('
1929 raise error.StateError(_(b"outstanding uncommitted merge"))
1918 raise error.StateError(_(b"outstanding uncommitted merge"))
1930 ms = wc.mergestate()
1919 ms = wc.mergestate()
1931 if ms.unresolvedcount():
1920 if ms.unresolvedcount():
1932 raise error.StateError(
1921 msg = _(b"outstanding merge conflicts")
1933 _(b"outstanding merge conflicts"),
1922 hint = _(b"use 'hg resolve' to resolve")
1934 hint=_(b"use 'hg resolve' to resolve"),
1923 raise error.StateError(msg, hint=hint)
1935 )
1936 if branchmerge:
1924 if branchmerge:
1937 if pas == [p2]:
1925 if pas == [p2]:
1938 raise error.Abort(
1926 raise error.Abort(
General Comments 0
You need to be logged in to leave comments. Login now