Merge lp://staging/~leonidborisenko/bzr-hg/hacking into lp://staging/bzr-hg
Proposed by
Leonid Borisenko
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 417 | ||||
Proposed branch: | lp://staging/~leonidborisenko/bzr-hg/hacking | ||||
Merge into: | lp://staging/bzr-hg | ||||
Diff against target: |
240 lines (+177/-8) 3 files modified
fetch.py (+16/-3) overlay.py (+1/-1) tests/test_fetch.py (+160/-4) |
||||
To merge this branch: | bzr merge lp://staging/~leonidborisenko/bzr-hg/hacking | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij (community) | Needs Fixing | ||
Review via email: mp+44319@code.staging.launchpad.net |
To post a comment you must log in.
Hi Leonid,
Thanks for the MP, and for adding a test along with your changes. I
don't the fix is quite right yet though:
review needsfixing
On Tue, 2010-12-21 at 09:17 +0000, Leonid Borisenko wrote: /bugs.launchpad .net/bugs/ 692901 revid, generate_ file_id( f) changegroup. chunkiter( cg) map[fileid] [node]) .next() map[fileid] : map[fileid] [node]) .next() target_ fulltext_ key_from_ revision_ ancestry( revid)
> Leonid Borisenko has proposed merging lp:~leonidborisenko/bzr-hg/hacking into lp:bzr-hg.
>
> Requested reviews:
> bzr-hg developers (bzr-hg)
> Related bugs:
> #692901 Crash with KeyError in incremental mirroring
> https:/
>
> differences between files attachment (review-diff.txt)
> === modified file 'fetch.py'
> --- fetch.py 2010-12-18 18:28:46 +0000
> +++ fetch.py 2010-12-21 09:17:08 +0000
> + def _unpack_texts(self, cg, mapping, filetext_map, first_imported_
> + pb):
> i = 0
> # Texts
> while 1:
> @@ -361,7 +370,11 @@
> fileid = mapping.
> chunkiter = mercurial.
> def get_text(node):
> - key = iter(filetext_
> + if node in filetext_
> + key = iter(filetext_
> + else:
> + key = self._get_
> + fileid, first_imported_
This assumes there is some significance in the first revision that's
imported. This happens to be the case in your test case, but is not
necessarily true.
Perhaps we can pass csid to get_text and then use that to look up the
matching revision id and use that to find the proper full text?
> + bzr_repo_ with_existing_ text_metadata( ): pull(hgbranch) to_inventory_ delta 97562cfbcf3b26e 7eacf17ca9b6f74 2f98bd0719' ) (pull_to_ bzr_repo_ with_existing_ text_metadata, KeyError) )) pull(hgbranch) here. We don't
> + # Pull commited changeset to Bazaar branch.
> + #
> + # Prefer named function instead lambda to slightly more informative
> + # fail message.
> + def pull_to_
> + bzrtree.
> +
> + # Not expected KeyError looked like:
> + #
> + # <...full traceback skipped...>
> + # File "/tmp/hg/fetch.py", line 208, in manifest_
> + # (fileid, ie.revision))
> + # KeyError: ('hg:f1', 'hg-v1:
> + self.assertThat
> + Not(raises(
I think we should simply just call bzrtree.
have a pattern of using testtools anywhere else in bzr-hg, and the error
message it prints in this case is very unhelpful (it eats the
backtrace).
Cheers,
Jelmer