##// END OF EJS Templates
bookmarks: Remove trailing space
Joel Rosdahl -
r7250:352627bc default
parent child Browse files
Show More
@@ -23,12 +23,12 b' import mercurial, mercurial.localrepo, m'
23 23
24 24 def parse(repo):
25 25 '''Parse .hg/bookmarks file and return a dictionary
26
27 Bookmarks are stored as {HASH}\s{NAME}\n (localtags format)
26
27 Bookmarks are stored as {HASH}\s{NAME}\n (localtags format)
28 28 values in the .hg/bookmarks file.
29 29 They are read by the parse() method and returned as a dictionary with
30 30 name => hash values.
31
31
32 32 The parsed dictionary is cached until a write() operation is done.
33 33 '''
34 34 try:
@@ -44,7 +44,7 b' def parse(repo):'
44 44
45 45 def write(repo, refs):
46 46 '''Write bookmarks
47
47
48 48 Write the given bookmark => hash dictionary to the .hg/bookmarks file
49 49 in a format equal to those of localtags.
50 50
@@ -59,12 +59,12 b' def write(repo, refs):'
59 59
60 60 def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, move=None):
61 61 '''mercurial bookmarks
62
62
63 63 Bookmarks are pointer to certain commits that move when commiting.
64 64 Bookmarks are local. They can be renamed, copied and deleted.
65 It is possible to use bookmark names in 'hg merge' and 'hg update' to
65 It is possible to use bookmark names in 'hg merge' and 'hg update' to
66 66 update to a given bookmark.
67
67
68 68 You can use 'hg bookmark [NAME]' to set a bookmark on the current tip
69 69 with the given name. If you specify a second [NAME] the bookmark is
70 70 set to the bookmark that has that name. You can also pass revision
@@ -83,7 +83,7 b' def bookmark(ui, repo, mark=None, rev=No'
83 83 del marks[move]
84 84 write(repo, marks)
85 85 return
86
86
87 87 if delete:
88 88 if mark == None:
89 89 raise util.Abort(_("bookmark name required"))
@@ -98,7 +98,7 b' def bookmark(ui, repo, mark=None, rev=No'
98 98 raise Exception("bookmark cannot contain newlines")
99 99 if mark in marks and not force:
100 100 raise util.Abort(_("a bookmark of the same name already exists"))
101 if ((mark in repo.branchtags() or mark == repo.dirstate.branch())
101 if ((mark in repo.branchtags() or mark == repo.dirstate.branch())
102 102 and not force):
103 103 raise util.Abort(_("a bookmark cannot have the name of an existing branch"))
104 104 if rev:
@@ -162,7 +162,7 b' def reposetup(ui, repo):'
162 162 def rollback(self):
163 163 if os.path.exists(self.join('undo.bookmarks')):
164 164 util.rename(self.join('undo.bookmarks'), self.join('bookmarks'))
165 return super(bookmark_repo, self).rollback()
165 return super(bookmark_repo, self).rollback()
166 166
167 167 def lookup(self, key):
168 168 if self._bookmarks is None:
General Comments 0
You need to be logged in to leave comments. Login now