Jan Willems  committed 1dd5c12

Updated documentation, added rename command (same as move), update the tests minorly.

  • Participants
  • Parent commits 8b88fa8

Comments (0)

Files changed (3)

 So far, the API supports::
- hg init
- hg id
  hg add [<file>]
  hg addremove [<file>]
- hg commit [files] [-u name] [--close-branch]
- hg update <rev>
- hg heads
- hg log
- hg remove
- hg status
- hg merge (fails on conflict)
- hg revert
  hg branch
  hg branches
+ hg clone
+ hg commit [files] [-u name] [--close-branch]
+ hg diff
+ hg heads
+ hg id
+ hg init
+ hg log
+ hg merge (fails on conflict)
+ hg pull [<source>]
+ hg push [<destination>]
+ hg remove
+ hg rename <source> <destination>
+ hg revert
+ hg root
+ hg status
  hg tag
  hg tags
- hg diff
+ hg update <rev>
  hg version
- hg clone
- hg move <source> <destination>
- hg root
 You also have access to the configuration (config, configbool,
 configlist) just as in the internal Mercurial API. The repository 

File hgapi/

         """Move a file in the repo."""
         self.hg_command("move", source, destination)
+    def hg_rename(self, source, destination):
+        return self.hg_move(source, destination)
     def hg_update(self, reference, clean=False):
         """Update to the revision identified by reference"""
         cmd = ["update", str(reference)]

File hgapi/

         self.repo.hg_commit("Source is committed.")
-        self.repo.hg_move("source.txt", "destination.txt")
+        self.repo.hg_rename("source.txt", "destination.txt")
         # get diffs and check proper move
         diffs = self.repo.hg_diff()
         self.assertTrue(diffs[0]['filename'] == 'destination.txt')