Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

hg log -> git log --all

  • Loading branch information...
commit 1393e9026a8040ed3645f83e0e4c9a3e8e4189b1 1 parent 4411776
@alex authored
View
1  vcstranslator_project/apps/translator/tests.py
@@ -67,6 +67,7 @@ def test_hg_to_git(self):
self.assert_translates(t, "diff", "git diff")
self.assert_translates(t, "paths", "git remote -v")
self.assert_translates(t, "record", "git add -p && git commit")
+ self.assert_translates(t, "log", "git log --all")
def test_git_to_hg(self):
t = Translator("git", "hg")
View
12 vcstranslator_project/apps/translator/utils.py
@@ -115,6 +115,11 @@ def translate_remote(self, command):
def translate_status(self, command):
return "git status"
+ def translate_log(self, command):
+ if command.files is not command.ALL or command.branches is not command.ALL:
+ return
+ return "git log --all"
+
class HgTranslator(BaseTranslator):
def parse(self, command):
parts = command.split()
@@ -136,6 +141,8 @@ def parse(self, command):
return Clone()
elif parts == ["status"]:
return Status()
+ elif parts == ["log"]:
+ return Log(branches=Log.ALL, files=Log.ALL)
def translate_commit(self, command):
if command.files is command.ALL:
@@ -313,3 +320,8 @@ def __init__(self, files):
class Remote(Command):
def __init__(self, verbose):
self.verbose = verbose
+
+class Log(Command):
+ def __init__(self, branches, files):
+ self.branches = branches
+ self.files = files
Please sign in to comment.
Something went wrong with that request. Please try again.