Show More
@@ -1913,11 +1913,22 b' def cat(ui, repo, ctx, matcher, prefix, ' | |||||
1913 |
|
1913 | |||
1914 | return err |
|
1914 | return err | |
1915 |
|
1915 | |||
1916 | def duplicatecopies(repo, rev, fromrev): |
|
1916 | def duplicatecopies(repo, rev, fromrev, skiprev=None): | |
1917 |
'''reproduce copies from fromrev to rev in the dirstate |
|
1917 | '''reproduce copies from fromrev to rev in the dirstate | |
|
1918 | ||||
|
1919 | If skiprev is specified, it's a revision that should be used to | |||
|
1920 | filter copy records. Any copies that occur between fromrev and | |||
|
1921 | skiprev will not be duplicated, even if they appear in the set of | |||
|
1922 | copies between fromrev and rev. | |||
|
1923 | ''' | |||
|
1924 | exclude = {} | |||
|
1925 | if skiprev is not None: | |||
|
1926 | exclude = copies.pathcopies(repo[fromrev], repo[skiprev]) | |||
1918 | for dst, src in copies.pathcopies(repo[fromrev], repo[rev]).iteritems(): |
|
1927 | for dst, src in copies.pathcopies(repo[fromrev], repo[rev]).iteritems(): | |
1919 | # copies.pathcopies returns backward renames, so dst might not |
|
1928 | # copies.pathcopies returns backward renames, so dst might not | |
1920 | # actually be in the dirstate |
|
1929 | # actually be in the dirstate | |
|
1930 | if dst in exclude: | |||
|
1931 | continue | |||
1921 | if repo.dirstate[dst] in "nma": |
|
1932 | if repo.dirstate[dst] in "nma": | |
1922 | repo.dirstate.copy(src, dst) |
|
1933 | repo.dirstate.copy(src, dst) | |
1923 |
|
1934 |
General Comments 0
You need to be logged in to leave comments.
Login now