Mercurial > hg
comparison hgext/largefiles/overrides.py @ 17229:a6d9b2d33040 stable
largefiles: fix addremove with -R option
If a file was missing, the missing list contained a path relative to the repo.
When building the matcher from that list, the file name ended up concatenated to
cwd, causing the command to abort with '<file> not under root'. This rebuilds
the missing list with paths relative to cwd.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 19 Jul 2012 06:30:59 -0400 |
parents | 5884812686f7 |
children | 2446b63c89ec |
comparison
equal
deleted
inserted
replaced
17228:d1b49b02bc16 | 17229:a6d9b2d33040 |
---|---|
999 # Call into the normal remove code, but the removing of the standin, we want | 999 # Call into the normal remove code, but the removing of the standin, we want |
1000 # to have handled by original addremove. Monkey patching here makes sure | 1000 # to have handled by original addremove. Monkey patching here makes sure |
1001 # we don't remove the standin in the largefiles code, preventing a very | 1001 # we don't remove the standin in the largefiles code, preventing a very |
1002 # confused state later. | 1002 # confused state later. |
1003 if missing: | 1003 if missing: |
1004 m = [repo.wjoin(f) for f in missing] | |
1004 repo._isaddremove = True | 1005 repo._isaddremove = True |
1005 removelargefiles(ui, repo, *missing, **opts) | 1006 removelargefiles(ui, repo, *m, **opts) |
1006 repo._isaddremove = False | 1007 repo._isaddremove = False |
1007 # Call into the normal add code, and any files that *should* be added as | 1008 # Call into the normal add code, and any files that *should* be added as |
1008 # largefiles will be | 1009 # largefiles will be |
1009 addlargefiles(ui, repo, *pats, **opts) | 1010 addlargefiles(ui, repo, *pats, **opts) |
1010 # Now that we've handled largefiles, hand off to the original addremove | 1011 # Now that we've handled largefiles, hand off to the original addremove |