# HG changeset patch # User Matt Mackall # Date 2012-02-06 22:35:14 # Node ID f6e9c731dd3f60f1fc98d9858efc331c30e1d846 # Parent 2e8f4b82c551014a5895b3dfc5858f2341bd7f41 fetch: use update rather than clean when updating (issue3246) We already verify the working directory is "clean" before starting so there's no advantage to clobbering the working directory. diff --git a/hgext/fetch.py b/hgext/fetch.py --- a/hgext/fetch.py +++ b/hgext/fetch.py @@ -85,7 +85,7 @@ def fetch(ui, repo, source='default', ** newchildren = repo.changelog.nodesbetween([parent], newheads)[2] if len(newheads) == 1 and len(newchildren): if newchildren[0] != parent: - return hg.clean(repo, newchildren[0]) + return hg.update(repo, newchildren[0]) else: return 0