1942 ui.status(_("skipping missing subrepository: %s\n") |
1942 ui.status(_("skipping missing subrepository: %s\n") |
1943 % os.path.join(prefix, subpath)) |
1943 % os.path.join(prefix, subpath)) |
1944 |
1944 |
1945 return err |
1945 return err |
1946 |
1946 |
1947 def duplicatecopies(repo, rev, fromrev): |
1947 def duplicatecopies(repo, rev, fromrev, skiprev=None): |
1948 '''reproduce copies from fromrev to rev in the dirstate''' |
1948 '''reproduce copies from fromrev to rev in the dirstate |
|
1949 |
|
1950 If skiprev is specified, it's a revision that should be used to |
|
1951 filter copy records. Any copies that occur between fromrev and |
|
1952 skiprev will not be duplicated, even if they appear in the set of |
|
1953 copies between fromrev and rev. |
|
1954 ''' |
|
1955 exclude = {} |
|
1956 if skiprev is not None: |
|
1957 exclude = copies.pathcopies(repo[fromrev], repo[skiprev]) |
1949 for dst, src in copies.pathcopies(repo[fromrev], repo[rev]).iteritems(): |
1958 for dst, src in copies.pathcopies(repo[fromrev], repo[rev]).iteritems(): |
1950 # copies.pathcopies returns backward renames, so dst might not |
1959 # copies.pathcopies returns backward renames, so dst might not |
1951 # actually be in the dirstate |
1960 # actually be in the dirstate |
|
1961 if dst in exclude: |
|
1962 continue |
1952 if repo.dirstate[dst] in "nma": |
1963 if repo.dirstate[dst] in "nma": |
1953 repo.dirstate.copy(src, dst) |
1964 repo.dirstate.copy(src, dst) |
1954 |
1965 |
1955 def commit(ui, repo, commitfunc, pats, opts): |
1966 def commit(ui, repo, commitfunc, pats, opts): |
1956 '''commit the specified files or all outstanding changes''' |
1967 '''commit the specified files or all outstanding changes''' |