Mercurial > hg
comparison hgext/bookmarks.py @ 11641:ead7550f1aab stable
bookmarks: rewrite _bookmarks method documentation
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Wed, 21 Jul 2010 12:41:18 +0900 |
parents | e5aaaef91a27 |
children | f54ec9c70877 18c47562d331 |
comparison
equal
deleted
inserted
replaced
11640:c3e8ab80ee90 | 11641:ead7550f1aab |
---|---|
216 @util.propertycache | 216 @util.propertycache |
217 def _bookmarks(self): | 217 def _bookmarks(self): |
218 '''Parse .hg/bookmarks file and return a dictionary | 218 '''Parse .hg/bookmarks file and return a dictionary |
219 | 219 |
220 Bookmarks are stored as {HASH}\\s{NAME}\\n (localtags format) values | 220 Bookmarks are stored as {HASH}\\s{NAME}\\n (localtags format) values |
221 in the .hg/bookmarks file. They are read returned as a dictionary | 221 in the .hg/bookmarks file. |
222 with name => hash values. | 222 Read the file and return a (name=>nodeid) dictionary |
223 ''' | 223 ''' |
224 try: | 224 try: |
225 bookmarks = {} | 225 bookmarks = {} |
226 for line in self.opener('bookmarks'): | 226 for line in self.opener('bookmarks'): |
227 sha, refspec = line.strip().split(' ', 1) | 227 sha, refspec = line.strip().split(' ', 1) |