# HG changeset patch # User cedricbonhomme # Date 1338212160 -7200 # Mon May 28 15:36:00 2012 +0200 # Node ID a84a120fb178667a58062a1d25e539311acec621 # Parent 1f7a829e215806faa27010b9233421bc4c66aa24 Minor bugfix when pulling changes. Added the repository URL in push function. diff --git a/hgsync.py b/hgsync.py --- a/hgsync.py +++ b/hgsync.py @@ -109,7 +109,7 @@ 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 @@ 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 @@ 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 @@ 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