/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/builtins.py

  • Committer: Jelmer Vernooij
  • Date: 2020-07-18 23:14:00 UTC
  • mfrom: (7490.40.62 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200718231400-jaes9qltn8oi8xss
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2824
2824
            else:
2825
2825
                revision = change
2826
2826
 
2827
 
        file_ids = []
 
2827
        files = []
2828
2828
        filter_by_dir = False
2829
2829
        if file_list:
2830
2830
            # find the file ids to log and check for directory filtering
2831
2831
            b, file_info_list, rev1, rev2 = _get_info_for_log_files(
2832
2832
                revision, file_list, self._exit_stack)
2833
 
            for relpath, file_id, kind in file_info_list:
2834
 
                if file_id is None:
 
2833
            for relpath, kind in file_info_list:
 
2834
                if not kind:
2835
2835
                    raise errors.CommandError(gettext(
2836
2836
                        "Path unknown at end or start of revision range: %s") %
2837
2837
                        relpath)
2838
2838
                # If the relpath is the top of the tree, we log everything
2839
2839
                if relpath == '':
2840
 
                    file_ids = []
 
2840
                    files = []
2841
2841
                    break
2842
2842
                else:
2843
 
                    file_ids.append(file_id)
 
2843
                    files.append(relpath)
2844
2844
                filter_by_dir = filter_by_dir or (
2845
2845
                    kind in ['directory', 'tree-reference'])
2846
2846
        else:
2871
2871
            delta_type = 'full'
2872
2872
        if not show_diff:
2873
2873
            diff_type = None
2874
 
        elif file_ids:
 
2874
        elif files:
2875
2875
            diff_type = 'partial'
2876
2876
        else:
2877
2877
            diff_type = 'full'
2903
2903
        # original algorithm - per-file-graph - for the "single
2904
2904
        # file that isn't a directory without showing a delta" case.
2905
2905
        partial_history = revision and b.repository._format.supports_chks
2906
 
        match_using_deltas = (len(file_ids) != 1 or filter_by_dir
 
2906
        match_using_deltas = (len(files) != 1 or filter_by_dir
2907
2907
                              or delta_type or partial_history)
2908
2908
 
2909
2909
        match_dict = {}
2919
2919
            match_dict['bugs'] = match_bugs
2920
2920
 
2921
2921
        # Build the LogRequest and execute it
2922
 
        if len(file_ids) == 0:
2923
 
            file_ids = None
 
2922
        if len(files) == 0:
 
2923
            files = None
2924
2924
        rqst = make_log_request_dict(
2925
 
            direction=direction, specific_fileids=file_ids,
 
2925
            direction=direction, specific_files=files,
2926
2926
            start_revision=rev1, end_revision=rev2, limit=limit,
2927
2927
            message_search=message, delta_type=delta_type,
2928
2928
            diff_type=diff_type, _match_using_deltas=match_using_deltas,