diff --git a/hgext3rd/copytrace.py b/hgext3rd/copytrace.py index 7b93d3df8b..5f573129f0 100644 --- a/hgext3rd/copytrace.py +++ b/hgext3rd/copytrace.py @@ -132,7 +132,7 @@ def _runcommand(orig, lui, repo, cmd, fullargs, ui, *args, **kwargs): False, "--tracecopies") return orig(lui, repo, cmd, fullargs, ui, *args, **kwargs) -def _amend(orig, ui, repo, commitfunc, old, extra, pats, opts): +def _amend(orig, ui, repo, old, extra, pats, opts): """Wraps amend to collect copytrace data on amend If a file is created in one commit, modified in a subsequent commit, and @@ -158,7 +158,7 @@ def _amend(orig, ui, repo, commitfunc, old, extra, pats, opts): # Check if amend copytracing has been disabled. if not ui.configbool("copytrace", "enableamendcopytrace", True): - return orig(ui, repo, commitfunc, old, extra, pats, opts) + return orig(ui, repo, old, extra, pats, opts) # Need to get the amend-copies before calling the command because files from # the working copy will be used during the amend. @@ -169,7 +169,7 @@ def _amend(orig, ui, repo, commitfunc, old, extra, pats, opts): amend_copies = copiesmod.pathcopies(old, wctx, matcher) # Finally, invoke the command. - node = orig(ui, repo, commitfunc, old, extra, pats, opts) + node = orig(ui, repo, old, extra, pats, opts) amended_ctx = repo[node] # Store the amend-copies against the amended context. diff --git a/hgext3rd/dirsync.py b/hgext3rd/dirsync.py index 1280c4400c..964bbb55dc 100644 --- a/hgext3rd/dirsync.py +++ b/hgext3rd/dirsync.py @@ -126,7 +126,7 @@ def _updateworkingcopy(repo, matcher): return mirroredfiles -def _amend(orig, ui, repo, commitfunc, old, extra, pats, opts): +def _amend(orig, ui, repo, old, extra, pats, opts): # Only wrap if not disabled and repo is instance of # localrepo.localrepository if _disabled[0] or not isinstance(repo, localrepo.localrepository): @@ -150,7 +150,7 @@ def _amend(orig, ui, repo, commitfunc, old, extra, pats, opts): opts['include'] = [ f for f in wctx.files() if matcher(f)] + list(mirroredfiles) - return orig(ui, repo, commitfunc, old, extra, pats, opts) + return orig(ui, repo, old, extra, pats, opts) def _commit(orig, self, *args, **kwargs): if _disabled[0]: diff --git a/hgext3rd/fbamend/__init__.py b/hgext3rd/fbamend/__init__.py index f1786f63ad..71e33586c4 100644 --- a/hgext3rd/fbamend/__init__.py +++ b/hgext3rd/fbamend/__init__.py @@ -223,44 +223,15 @@ def amend(ui, repo, *pats, **opts): if not opts.get('noeditmessage') and not opts.get('message'): opts['message'] = old.description() - tempnode = [] commitdate = opts.get('date') if not commitdate: if ui.config('fbamend', 'date') == 'implicitupdate': commitdate = 'now' else: commitdate = old.date() - commituser = old.user() if not opts.get('user') else opts.get('user') - def commitfunc(ui, repo, message, match, opts): - e = cmdutil.commiteditor - noderesult = repo.commit(message, - commituser, - commitdate, - match, - editor=e, - extra={}) - - # the temporary commit is the very first commit - if not tempnode: - tempnode.append(noderesult) - - return noderesult active = bmactive(repo) oldbookmarks = old.bookmarks() - - if haschildren: - def fakestrip(orig, ui, repo, *args, **kwargs): - if tempnode: - if tempnode[0]: - # don't strip everything, just the temp node - # this is very hacky - orig(ui, repo, tempnode[0], backup='none') - tempnode.pop() - else: - orig(ui, repo, *args, **kwargs) - extensions.wrapfunction(repair, 'strip', fakestrip) - tr = None wlock = None lock = None @@ -276,7 +247,7 @@ def amend(ui, repo, *pats, **opts): return else: - node = cmdutil.amend(ui, repo, commitfunc, old, {}, pats, opts) + node = cmdutil.amend(ui, repo, old, {}, pats, opts) if node == old.node(): ui.status(_("nothing changed\n"))