##// END OF EJS Templates
repair: use `first` instead of direct indexing...
Pierre-Yves David -
r22818:d7b11449 default
parent child Browse files
Show More
@@ -24,7 +24,14 b' def addbranchrevs(lrepo, other, branches'
24 24 peer = other.peer() # a courtesy to callers using a localrepo for other
25 25 hashbranch, branches = branches
26 26 if not hashbranch and not branches:
27 return revs or None, revs and revs[0] or None
27 x = revs or None
28 if util.safehasattr(revs, 'first'):
29 y = revs.first()
30 elif revs:
31 y = revs[0]
32 else:
33 y = None
34 return x, y
28 35 revs = revs and list(revs) or []
29 36 if not peer.capable('branchmap'):
30 37 if branches:
@@ -99,7 +99,7 b' def strip(ui, repo, nodelist, backup=Tru'
99 99 # is much faster
100 100 newbmtarget = repo.revs('max(parents(%ld) - (%ld))', tostrip, tostrip)
101 101 if newbmtarget:
102 newbmtarget = repo[newbmtarget[0]].node()
102 newbmtarget = repo[newbmtarget.first()].node()
103 103 else:
104 104 newbmtarget = '.'
105 105
General Comments 0
You need to be logged in to leave comments. Login now