Permalink
Browse files

add gitshelve.get_parent_ids() for easy reverting.

you can revert using update_head(get_parent_ids()[0]).
  • Loading branch information...
1 parent a279511 commit 33ccc704a0d8457d0dca8ff78720a1722db3a39b @imbaczek imbaczek committed Feb 21, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 gitshelve.py
View
@@ -362,6 +362,10 @@ def commit(self, comment = None):
def sync(self):
self.commit()
+ def get_parent_ids(self):
+ r = self.git('rev-list', '--parents', '--max-count=1', self.branch)
+ return r.split()[1:]
+
def close(self):
if self.dirty:
self.sync()

0 comments on commit 33ccc70

Please sign in to comment.