Patchwork [1,of,2] duplicatecopies: fix arg name and docstring

mail settings
Submitter Siddharth Agarwal
Date March 29, 2013, 1:30 a.m.
Message ID <04f784d278a2b4ae3f42.1364520601@sid0x220>
Download mbox | patch
Permalink /patch/1214/
State Accepted
Commit 300844cb1a569541a444dfe098fea63bed15b0c8
Headers show


Siddharth Agarwal - March 29, 2013, 1:30 a.m.
# HG changeset patch
# User Siddharth Agarwal <>
# Date 1364454867 25200
#      Thu Mar 28 00:14:27 2013 -0700
# Node ID 04f784d278a2b4ae3f42bb50c512e081a100246e
# Parent  d118a416965d954763279e2b462dbfc307298d57
duplicatecopies: fix arg name and docstring

While most callers do indeed use duplicatecopies with a rev and its parent,
rebase doesn't.
Bryan O'Sullivan - April 1, 2013, 11:21 p.m.
On Thu, Mar 28, 2013 at 06:30:01PM -0700, Siddharth Agarwal wrote:
> duplicatecopies: fix arg name and docstring

I've crewed both of these, thanks.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -1590,9 +1590,9 @@  def forget(ui, repo, match, prefix, expl
     return bad, forgot
-def duplicatecopies(repo, rev, p1):
-    "Reproduce copies found in the source revision in the dirstate for grafts"
-    for dst, src in copies.pathcopies(repo[p1], repo[rev]).iteritems():
+def duplicatecopies(repo, rev, fromrev):
+    '''reproduce copies from fromrev to rev in the dirstate'''
+    for dst, src in copies.pathcopies(repo[fromrev], repo[rev]).iteritems():
         repo.dirstate.copy(src, dst)
 def commit(ui, repo, commitfunc, pats, opts):