Mercurial > hg
comparison hgext/largefiles/overrides.py @ 19805:9b088e9c2690
largefiles: standardize error message for dirty working dir
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 23 Sep 2013 21:41:01 -0700 |
parents | 0c626b68c5c6 |
children | 8eb99e5cec4a |
comparison
equal
deleted
inserted
replaced
19804:061ce98c888d | 19805:9b088e9c2690 |
---|---|
313 mod = True | 313 mod = True |
314 else: | 314 else: |
315 lfdirstate.normal(lfile) | 315 lfdirstate.normal(lfile) |
316 lfdirstate.write() | 316 lfdirstate.write() |
317 if mod: | 317 if mod: |
318 raise util.Abort(_('uncommitted local changes')) | 318 raise util.Abort(_('uncommitted changes')) |
319 # XXX handle removed differently | 319 # XXX handle removed differently |
320 if not opts['clean']: | 320 if not opts['clean']: |
321 for lfile in unsure + modified + added: | 321 for lfile in unsure + modified + added: |
322 lfutil.updatestandin(repo, lfutil.standin(lfile)) | 322 lfutil.updatestandin(repo, lfutil.standin(lfile)) |
323 finally: | 323 finally: |
944 orig(repo) | 944 orig(repo) |
945 repo.lfstatus = True | 945 repo.lfstatus = True |
946 modified, added, removed, deleted = repo.status()[:4] | 946 modified, added, removed, deleted = repo.status()[:4] |
947 repo.lfstatus = False | 947 repo.lfstatus = False |
948 if modified or added or removed or deleted: | 948 if modified or added or removed or deleted: |
949 raise util.Abort(_('outstanding uncommitted changes')) | 949 raise util.Abort(_('uncommitted changes')) |
950 | 950 |
951 # Fetch doesn't use cmdutil.bailifchanged so override it to add the check | 951 # Fetch doesn't use cmdutil.bailifchanged so override it to add the check |
952 def overridefetch(orig, ui, repo, *pats, **opts): | 952 def overridefetch(orig, ui, repo, *pats, **opts): |
953 repo.lfstatus = True | 953 repo.lfstatus = True |
954 modified, added, removed, deleted = repo.status()[:4] | 954 modified, added, removed, deleted = repo.status()[:4] |
955 repo.lfstatus = False | 955 repo.lfstatus = False |
956 if modified or added or removed or deleted: | 956 if modified or added or removed or deleted: |
957 raise util.Abort(_('outstanding uncommitted changes')) | 957 raise util.Abort(_('uncommitted changes')) |
958 return orig(ui, repo, *pats, **opts) | 958 return orig(ui, repo, *pats, **opts) |
959 | 959 |
960 def overrideforget(orig, ui, repo, *pats, **opts): | 960 def overrideforget(orig, ui, repo, *pats, **opts): |
961 installnormalfilesmatchfn(repo[None].manifest()) | 961 installnormalfilesmatchfn(repo[None].manifest()) |
962 result = orig(ui, repo, *pats, **opts) | 962 result = orig(ui, repo, *pats, **opts) |