mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
actually get file rev
This commit is contained in:
parent
6cb2b923e0
commit
0d6245dd89
|
@ -1138,7 +1138,7 @@ def visit(self, object):
|
||||||
|
|
||||||
def get_file_revision(f):
|
def get_file_revision(f):
|
||||||
"""Fish out the last change to a file in hg."""
|
"""Fish out the last change to a file in hg."""
|
||||||
args = ["hg", "log", "--template", "{rev}:{node|short}", "--limit", "1"]
|
args = ["hg", "log", "--template", "{rev}:{node|short}", "--limit", "1", f]
|
||||||
p = subprocess.Popen(args, stdout=subprocess.PIPE)
|
p = subprocess.Popen(args, stdout=subprocess.PIPE)
|
||||||
out = p.communicate()[0]
|
out = p.communicate()[0]
|
||||||
if p.returncode:
|
if p.returncode:
|
||||||
|
|
Loading…
Reference in a new issue