Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 18612:0b6e6eacc939
merge: don't call copies.mergecopies unless we need to
This reduces the amount of time we spend calculating when doing a clean
non-merge update. In a large repo, the time dropped from 10.1 seconds
to 3.4.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Sat, 09 Feb 2013 21:24:36 +0000 |
parents | 18c2184c27dc |
children | 9b9e2d9e83a1 |
comparison
equal
deleted
inserted
replaced
18611:18c2184c27dc | 18612:0b6e6eacc939 |
---|---|
198 | 198 |
199 if overwrite: | 199 if overwrite: |
200 pa = wctx | 200 pa = wctx |
201 elif pa == p2: # backwards | 201 elif pa == p2: # backwards |
202 pa = wctx.p1() | 202 pa = wctx.p1() |
203 elif not branchmerge and not wctx.dirty(missing=True): | |
204 pass | |
203 elif pa and repo.ui.configbool("merge", "followcopies", True): | 205 elif pa and repo.ui.configbool("merge", "followcopies", True): |
204 ret = copies.mergecopies(repo, wctx, p2, pa) | 206 ret = copies.mergecopies(repo, wctx, p2, pa) |
205 copy, movewithdir, diverge, renamedelete = ret | 207 copy, movewithdir, diverge, renamedelete = ret |
206 for of, fl in diverge.iteritems(): | 208 for of, fl in diverge.iteritems(): |
207 actions.append((of, "dr", (fl,), "divergent renames")) | 209 actions.append((of, "dr", (fl,), "divergent renames")) |