Commits

Ali Gholami Rudi  committed 31a571e

changestack: using shorter method names

  • Participants
  • Parent commits fe8d9b5

Comments (0)

Files changed (2)

File rope/contrib/changestack.py

         self.description = description
         self.stack = []
 
-    def push_change(self, changes):
+    def push(self, changes):
         self.stack.append(changes)
         self.project.do(changes)
 
         for i in range(len(self.stack)):
             self.project.history.undo()
 
-    def merged_changes(self):
+    def merged(self):
         result = change.ChangeSet(self.description)
         for changes in self.stack:
             for c in self._basic_changes(changes):

File ropetest/contrib/changestacktest.py

         myfile = self.project.root.create_file('myfile.txt')
         myfile.write('1')
         stack = rope.contrib.changestack.ChangeStack(self.project)
-        stack.push_change(ChangeContents(myfile, '2'))
+        stack.push(ChangeContents(myfile, '2'))
         self.assertEquals('2', myfile.read())
-        stack.push_change(ChangeContents(myfile, '3'))
+        stack.push(ChangeContents(myfile, '3'))
         self.assertEquals('3', myfile.read())
         stack.pop_all()
         self.assertEquals('1', myfile.read())
-        changes = stack.merged_changes()
+        changes = stack.merged()
         self.project.do(changes)
         self.assertEquals('3', myfile.read())