Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vcsinfo
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
OmegaCEN
vcsinfo
Commits
b98f96d9
Commit
b98f96d9
authored
8 years ago
by
Teake Nutma
Browse files
Options
Downloads
Patches
Plain Diff
Change argument name from `file` to `filename`
parent
c3255a00
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vcsinfo/implementations/git.py
+2
-2
2 additions, 2 deletions
vcsinfo/implementations/git.py
vcsinfo/vcsinfo.py
+1
-1
1 addition, 1 deletion
vcsinfo/vcsinfo.py
with
3 additions
and
3 deletions
vcsinfo/implementations/git.py
+
2
−
2
View file @
b98f96d9
...
...
@@ -141,12 +141,12 @@ class GitVersion(Version):
except
subprocess
.
CalledProcessError
:
return
False
def
last_change_on
(
self
,
file
:
str
)
->
Optional
[
'
GitVersion
'
]:
def
last_change_on
(
self
,
file
name
:
str
)
->
Optional
[
'
GitVersion
'
]:
"""
Return the last version which changed the given file, looking back from this version.
:return: None if there is no such a version.
"""
sha1
=
self
.
__run_git_command
([
'
log
'
,
'
-n
'
,
'
1
'
,
'
--format=format:%H
'
,
self
.
id
,
'
--
'
,
file
])
sha1
=
self
.
__run_git_command
([
'
log
'
,
'
-n
'
,
'
1
'
,
'
--format=format:%H
'
,
self
.
id
,
'
--
'
,
file
name
])
if
sha1
:
return
GitVersion
(
self
.
repository
,
sha1
)
else
:
...
...
This diff is collapsed.
Click to expand it.
vcsinfo/vcsinfo.py
+
1
−
1
View file @
b98f96d9
...
...
@@ -73,7 +73,7 @@ class Version(ABC):
pass
@abstractmethod
def
last_change_on
(
self
,
file
:
str
)
->
Optional
[
'
Version
'
]:
def
last_change_on
(
self
,
file
name
:
str
)
->
Optional
[
'
Version
'
]:
"""
Return the last version which changed the given file, looking back from this version.
:return: None if there is no such version.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment