Mercurial > hgsubversion
comparison fetch_command.py @ 39:b3c7b844b782
Some more fixes of cases discovered in the melange repo. If anyone knows how I can reproduce a "replaced" state in Subversion, I'd love to be able to make a real test case for this code.
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Sun, 26 Oct 2008 22:06:13 -0500 |
| parents | 9ee7ce0505eb |
| children | 485ae93bc358 |
comparison
equal
deleted
inserted
replaced
| 38:9ee7ce0505eb | 39:b3c7b844b782 |
|---|---|
| 392 try: | 392 try: |
| 393 ui.status("fetching entire rev because raised.\n") | 393 ui.status("fetching entire rev because raised.\n") |
| 394 used_diff = False | 394 used_diff = False |
| 395 shutil.rmtree(our_tempdir) | 395 shutil.rmtree(our_tempdir) |
| 396 os.makedirs(our_tempdir) | 396 os.makedirs(our_tempdir) |
| 397 svn.fetch_all_files_to_dir(diff_path, r.revnum, our_tempdir) | 397 try: |
| 398 svn.fetch_all_files_to_dir(diff_path, r.revnum, our_tempdir) | |
| 399 except core.SubversionException, e: | |
| 400 # apr_err 21 means that we couldn't rename a file to be a dir. | |
| 401 # This happens only in the case (at least right now) of a file | |
| 402 # located in brances or tags, which we don't support anyway. | |
| 403 if e.apr_err == 21: | |
| 404 continue | |
| 405 else: | |
| 406 raise | |
| 398 except core.SubversionException, e: | 407 except core.SubversionException, e: |
| 399 if e.apr_err == 170000 or (e.message.startswith("URL '") | 408 if e.apr_err == 170000 or (e.message.startswith("URL '") |
| 400 and e.message.endswith("' doesn't exist")): | 409 and e.message.endswith("' doesn't exist")): |
| 401 delete_all_files = True | 410 delete_all_files = True |
| 402 else: | 411 else: |
