Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix diff bug #141

Closed
wants to merge 1 commit into from
Closed

Fix diff bug #141

wants to merge 1 commit into from

Conversation

NitefullWind
Copy link

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-28.4%) to 71.629% when pulling 7b7c958 on NitefullWind:patch-1 into 0c222a9 on dsoprea:master.

Copy link

@bystrzak bystrzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix does not work when the path provided is poinitng to a single file. I worked it around with

            if diff_summary['path'] == full_url_or_path:
                file_name = full_url_or_path.split('/')[-1]
            else:
                file_name = diff_summary['path'].split(full_url_or_path)[-1].strip('/')
            if file_name in file_to_diff:
                diff_summary['diff'] = file_to_diff[file_name]

@idbrii
Copy link

idbrii commented Feb 1, 2020

Neither of those fixes repositories with file:// urls (no exceptions, but the summaries have no diff despite the files being modified).

I'm doing something like this:

 os.chdir(os.path.expanduser('~/svn/checkout'))
 pprint.pprint(client.diff('HEAD', '', '.'))
 pprint.pprint(client.diff('HEAD', '', 'file.txt')) # this file is modified

For file:// repositories, neither diff has a 'diff' element.

For https:// repositories, the '.' version has diffs, but the 'file.txt' one does not.

@dsoprea
Copy link
Owner

dsoprea commented Feb 1, 2020

This should be resolved in the latest release. I've reimplemented it. Since the shape of the output has changed, I also bumped the major number on the release. I apologize for the shoddy implementation. This was contributed by someone else and not checked carefully enough.

@dsoprea dsoprea closed this Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants