##// END OF EJS Templates
bookmarks: check @pathalias suffix before available @number for efficiency...
FUJIWARA Katsunori -
r24354:194e1e3e default
parent child Browse files
Show More
@@ -370,13 +370,6 b' def _diverge(ui, b, path, localmarks):'
370 '''
370 '''
371 if b == '@':
371 if b == '@':
372 b = ''
372 b = ''
373 # find a unique @ suffix
374 for x in range(1, 100):
375 n = '%s@%d' % (b, x)
376 if n not in localmarks:
377 break
378 else:
379 n = None
380 # try to use an @pathalias suffix
373 # try to use an @pathalias suffix
381 # if an @pathalias already exists, we overwrite (update) it
374 # if an @pathalias already exists, we overwrite (update) it
382 if path.startswith("file:"):
375 if path.startswith("file:"):
@@ -385,8 +378,15 b' def _diverge(ui, b, path, localmarks):'
385 if u.startswith("file:"):
378 if u.startswith("file:"):
386 u = util.url(u).path
379 u = util.url(u).path
387 if path == u:
380 if path == u:
388 n = '%s@%s' % (b, p)
381 return '%s@%s' % (b, p)
389 return n
382
383 # assign a unique "@number" suffix newly
384 for x in range(1, 100):
385 n = '%s@%d' % (b, x)
386 if n not in localmarks:
387 return n
388
389 return None
390
390
391 def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()):
391 def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()):
392 ui.debug("checking for updated bookmarks\n")
392 ui.debug("checking for updated bookmarks\n")
General Comments 0
You need to be logged in to leave comments. Login now