##// 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 371 if b == '@':
372 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 373 # try to use an @pathalias suffix
381 374 # if an @pathalias already exists, we overwrite (update) it
382 375 if path.startswith("file:"):
@@ -385,8 +378,15 b' def _diverge(ui, b, path, localmarks):'
385 378 if u.startswith("file:"):
386 379 u = util.url(u).path
387 380 if path == u:
388 n = '%s@%s' % (b, p)
389 return n
381 return '%s@%s' % (b, p)
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 391 def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()):
392 392 ui.debug("checking for updated bookmarks\n")
General Comments 0
You need to be logged in to leave comments. Login now