-
Notifications
You must be signed in to change notification settings - Fork 46
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
feature request: full diff between two commits #190
Comments
Closing: a duplicate of #15 . |
By multiple, I meant like a folder or all the files in a commit. |
I most often invoke diffuse with Similarly, Thus, the treatment of individual commits and of uncommitted/unstaged changes is very satisfactory indeed! And because those options already exist, I suspect extending them to comparison of non-consecutive commits should not be difficult (at least for some VCSs; as @MightyCreak pointed out in one of the other issues, the problem is in implementing a new switch for all 7 or 8 supported VCSs including the less common ones). If you'd like to be picky, you could point out that diffuse still can not fully reflect all possible changes that a version control system could track (e.g. changed rights and ownership of files, or additions/deletions of empty folders). |
reopening because #15 was closed without addressing this FR |
Here is a patch that provides full diff between two commits for git.
--- a/src/diffuse/vcs/git.py
+++ b/src/diffuse/vcs/git.py
@@ -39,7 +39,10 @@ class Git(VcsInterface):
for name in names:
isabs |= os.path.isabs(name)
# run command
- prev = rev + '^'
+ if '..' in rev:
+ prev, rev = rev.split('..')
+ else:
+ prev = rev + '^'
fs = FolderSet(names)
modified = {}
for s in utils.popenReadLines(self.root, args, prefs, 'git_bash'): |
Same thing for mercurial (a bit more tricky, hopefully it does not break anything!) --- a/src/diffuse/vcs/hg.py
+++ b/src/diffuse/vcs/hg.py
@@ -66,6 +66,12 @@ class Hg(VcsInterface):
args.append(utils.safeRelativePath(self.root, name, prefs, 'hg_cygwin'))
# run command
prev = self._getPreviousRevision(prefs, rev)
+ if rev is not None:
+ if '..' in rev:
+ prev, rev = rev.split('..')
+ args.extend(['-r',prev,'-r',rev])
+ else:
+ args.extend(['-r',rev])
fs = FolderSet(names)
modified = {}
for s in utils.popenReadLines(self.root, args, prefs, 'hg_bash'):
@@ -92,7 +98,7 @@ class Hg(VcsInterface):
return self._getCommitTemplate(
prefs,
names,
- ['log', '--template', 'A\t{file_adds}\nM\t{file_mods}\nR\t{file_dels}\n', '-r', rev],
+ ['log', '--template', 'A\t{file_adds}\nM\t{file_mods}\nR\t{file_dels}\n'],
rev) |
@nschaeff Works like a charm. Thanks so much! For anyone running diffuse from flatpak, I've been able to apply the patch by manually editing the file EDIT: I've been able to update diffuse by running |
This looks good to me. Git also uses the triple dot Either way, the proposed patches look good. Who can help with a pull request? |
There is already one: #212 |
Currently, we have three options for working with version controlled files:
As far as I can tell, these are actually used as
I am looking for an option to compare the full state of the repository between two revisions, so something like
-c
or-m
, but with two revision parameters, or something like-r
, but without the<file>
parameters:The text was updated successfully, but these errors were encountered: