Skip to content

Commit

Permalink
Merge pull request #18 from xenofanes9/master
Browse files Browse the repository at this point in the history
Fix for HG - missing repo directory for target file.
  • Loading branch information
facelessuser committed Mar 4, 2015
2 parents cf39623 + 0c14792 commit 95398c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def cat(target, rev=None):
args = ["cat", target]
if rev is not None:
args += ["-r", str(rev)]
return hgopen(args)
return hgopen(args, dirname(target))


def revert(target):
Expand Down Expand Up @@ -115,7 +115,7 @@ def diff(target, last=False):
else:
args = ["diff", "-p"]

return hgopen(args + [target]) if args is not None else b""
return hgopen(args + [target], dirname(target)) if args is not None else b""


def log(target=None, limit=0):
Expand All @@ -131,7 +131,7 @@ def log(target=None, limit=0):
args.append(str(limit))
if target is not None:
args.append(target)
output = hgopen(args)
output = hgopen(args, dirname(target))

if output != "":
results = ET.fromstring(output)
Expand Down

0 comments on commit 95398c8

Please sign in to comment.