Show More
@@ -515,14 +515,16 b' def overridecopy(orig, ui, repo, pats, o' | |||||
515 | dest.startswith(repo.wjoin(lfutil.shortname))): |
|
515 | dest.startswith(repo.wjoin(lfutil.shortname))): | |
516 | srclfile = src.replace(repo.wjoin(lfutil.standin('')), '') |
|
516 | srclfile = src.replace(repo.wjoin(lfutil.standin('')), '') | |
517 | destlfile = dest.replace(repo.wjoin(lfutil.standin('')), '') |
|
517 | destlfile = dest.replace(repo.wjoin(lfutil.standin('')), '') | |
518 | destlfiledir = os.path.dirname(destlfile) or '.' |
|
518 | destlfiledir = os.path.dirname(repo.wjoin(destlfile)) or '.' | |
519 | if not os.path.isdir(destlfiledir): |
|
519 | if not os.path.isdir(destlfiledir): | |
520 | os.makedirs(destlfiledir) |
|
520 | os.makedirs(destlfiledir) | |
521 | if rename: |
|
521 | if rename: | |
522 | os.rename(repo.wjoin(srclfile), repo.wjoin(destlfile)) |
|
522 | os.rename(repo.wjoin(srclfile), repo.wjoin(destlfile)) | |
523 | lfdirstate.remove(srclfile) |
|
523 | lfdirstate.remove(srclfile) | |
524 | else: |
|
524 | else: | |
525 |
util.copyfile(srclfile, |
|
525 | util.copyfile(repo.wjoin(srclfile), | |
|
526 | repo.wjoin(destlfile)) | |||
|
527 | ||||
526 | lfdirstate.add(destlfile) |
|
528 | lfdirstate.add(destlfile) | |
527 | lfdirstate.write() |
|
529 | lfdirstate.write() | |
528 | except util.Abort, e: |
|
530 | except util.Abort, e: |
@@ -141,6 +141,43 b' Test moving largefiles and verify that n' | |||||
141 | $ cat sub/large4 |
|
141 | $ cat sub/large4 | |
142 | large22 |
|
142 | large22 | |
143 |
|
143 | |||
|
144 | Test copies and moves from a directory other than root (issue3516) | |||
|
145 | ||||
|
146 | $ cd .. | |||
|
147 | $ hg init lf_cpmv | |||
|
148 | $ cd lf_cpmv | |||
|
149 | $ mkdir dira | |||
|
150 | $ mkdir dira/dirb | |||
|
151 | $ touch dira/dirb/largefile | |||
|
152 | $ hg add --large dira/dirb/largefile | |||
|
153 | $ hg commit -m "added" | |||
|
154 | Invoking status precommit hook | |||
|
155 | A dira/dirb/largefile | |||
|
156 | $ cd dira | |||
|
157 | $ hg cp dirb/largefile foo/largefile | |||
|
158 | $ hg ci -m "deep copy" | |||
|
159 | Invoking status precommit hook | |||
|
160 | A dira/foo/largefile | |||
|
161 | $ find . | sort | |||
|
162 | . | |||
|
163 | ./dirb | |||
|
164 | ./dirb/largefile | |||
|
165 | ./foo | |||
|
166 | ./foo/largefile | |||
|
167 | $ hg mv foo/largefile baz/largefile | |||
|
168 | $ hg ci -m "moved" | |||
|
169 | Invoking status precommit hook | |||
|
170 | A dira/baz/largefile | |||
|
171 | R dira/foo/largefile | |||
|
172 | $ find . | sort | |||
|
173 | . | |||
|
174 | ./baz | |||
|
175 | ./baz/largefile | |||
|
176 | ./dirb | |||
|
177 | ./dirb/largefile | |||
|
178 | ./foo | |||
|
179 | $ cd ../../a | |||
|
180 | ||||
144 | #if hgweb |
|
181 | #if hgweb | |
145 | Test display of largefiles in hgweb |
|
182 | Test display of largefiles in hgweb | |
146 |
|
183 |
General Comments 0
You need to be logged in to leave comments.
Login now