##// END OF EJS Templates
shelve: really pass publicancestors to changegroupsubset - not the parents...
Mads Kiilerich -
r20408:3392695a default
parent child Browse files
Show More
@@ -122,22 +122,21 b' def createcmd(ui, repo, pats, opts):'
122 122 """subcommand that creates a new shelve"""
123 123
124 124 def publicancestors(ctx):
125 """Compute the heads of the public ancestors of a commit.
125 """Compute the public ancestors of a commit.
126 126
127 Much faster than the revset heads(ancestors(ctx) - draft())"""
127 Much faster than the revset ancestors(ctx) & draft()"""
128 128 seen = set([nullrev])
129 129 visit = util.deque()
130 130 visit.append(ctx)
131 131 while visit:
132 132 ctx = visit.popleft()
133 yield ctx.node()
133 134 for parent in ctx.parents():
134 135 rev = parent.rev()
135 136 if rev not in seen:
136 137 seen.add(rev)
137 138 if parent.mutable():
138 139 visit.append(parent)
139 else:
140 yield parent.node()
141 140
142 141 wctx = repo[None]
143 142 parents = wctx.parents()
General Comments 0
You need to be logged in to leave comments. Login now