@@ 109,7 109,7 @@ class HgSync(object):
Remove a file.
"""
print file_to_remove
- commands.remove(self.repo.ui, file_to_remove)
+ commands.remove(self.repo.ui, self.repo, file_to_remove)
self.commit("Removed " + file_to_remove)
def rename(self, file_from, file_to):
@@ 128,14 128,14 @@ class HgSync(object):
while True:
time.sleep(1)
if self.nb_commit == 5:
- commands.push(self.repo.ui, self.repo)
+ commands.push(self.repo.ui, self.repo, self.repository_url)
self.nb_commit = 0
def push(self):
"""
Push changes and set the number of commits to zero.
"""
- commands.push(self.repo.ui, self.repo)
+ commands.push(self.repo.ui, self.repo, self.repository_url)
self.nb_commit = 0
def pull_loop(self):
@@ 143,7 143,7 @@ class HgSync(object):
Pull from the remote repository.
"""
while True:
- commands.push(self.repo.ui, self.repo)
+ commands.pull(self.repo.ui, self.repo)
commands.update(self.repo.ui, self.repo)
time.sleep(240)
@@ 151,6 151,7 @@ class HgSync(object):
if __name__ == "__main__":
# Point of entry in execution mode.
+ pass
repo = HgSync("https://cedricbonhomme@bitbucket.org/cedricbonhomme/test-balloon", ".")
#repo.initialize()
repo.clone()
No newline at end of file