##// END OF EJS Templates
histedit: remove redundant checks for unfinished histedit state...
Martin von Zweigbergk -
r48867:6256c752 default
parent child Browse files
Show More
@@ -1697,13 +1697,6 b' def _chistedit(ui, repo, freeargs, opts)'
1697 cmdutil.checkunfinished(repo)
1697 cmdutil.checkunfinished(repo)
1698 cmdutil.bailifchanged(repo)
1698 cmdutil.bailifchanged(repo)
1699
1699
1700 if os.path.exists(os.path.join(repo.path, b'histedit-state')):
1701 raise error.Abort(
1702 _(
1703 b'history edit already in progress, try '
1704 b'--continue or --abort'
1705 )
1706 )
1707 revs.extend(freeargs)
1700 revs.extend(freeargs)
1708 if not revs:
1701 if not revs:
1709 defaultrev = destutil.desthistedit(ui, repo)
1702 defaultrev = destutil.desthistedit(ui, repo)
@@ -1928,7 +1921,7 b' def _readfile(ui, path):'
1928 return f.read()
1921 return f.read()
1929
1922
1930
1923
1931 def _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs):
1924 def _validateargs(ui, repo, freeargs, opts, goal, rules, revs):
1932 # TODO only abort if we try to histedit mq patches, not just
1925 # TODO only abort if we try to histedit mq patches, not just
1933 # blanket if mq patches are applied somewhere
1926 # blanket if mq patches are applied somewhere
1934 mq = getattr(repo, 'mq', None)
1927 mq = getattr(repo, 'mq', None)
@@ -1954,13 +1947,6 b' def _validateargs(ui, repo, state, freea'
1954 _(b'only --commands argument allowed with --edit-plan')
1947 _(b'only --commands argument allowed with --edit-plan')
1955 )
1948 )
1956 else:
1949 else:
1957 if state.inprogress():
1958 raise error.Abort(
1959 _(
1960 b'history edit already in progress, try '
1961 b'--continue or --abort'
1962 )
1963 )
1964 if outg:
1950 if outg:
1965 if revs:
1951 if revs:
1966 raise error.Abort(_(b'no revisions allowed with --outgoing'))
1952 raise error.Abort(_(b'no revisions allowed with --outgoing'))
@@ -1990,7 +1976,7 b' def _histedit(ui, repo, state, freeargs,'
1990 rules = opts.get(b'commands', b'')
1976 rules = opts.get(b'commands', b'')
1991 state.keep = opts.get(b'keep', False)
1977 state.keep = opts.get(b'keep', False)
1992
1978
1993 _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs)
1979 _validateargs(ui, repo, freeargs, opts, goal, rules, revs)
1994
1980
1995 hastags = False
1981 hastags = False
1996 if revs:
1982 if revs:
General Comments 0
You need to be logged in to leave comments. Login now