##// END OF EJS Templates
lookup: optimize '.'...
Matt Mackall -
r6736:369ddc9c default
parent child Browse files
Show More
@@ -442,12 +442,7 b' class localrepository(repo.repository):'
442
442
443 def lookup(self, key):
443 def lookup(self, key):
444 if key == '.':
444 if key == '.':
445 key, second = self.dirstate.parents()
445 return self.dirstate.parents()[0]
446 if key == nullid:
447 raise repo.RepoError(_("no revision checked out"))
448 if second != nullid:
449 self.ui.warn(_("warning: working directory has two parents, "
450 "tag '.' uses the first\n"))
451 elif key == 'null':
446 elif key == 'null':
452 return nullid
447 return nullid
453 n = self.changelog._match(key)
448 n = self.changelog._match(key)
@@ -150,7 +150,6 b' 2 files updated, 0 files merged, 1 files'
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 (branch merge, don't forget to commit)
151 (branch merge, don't forget to commit)
152 % log -r . with two parents
152 % log -r . with two parents
153 warning: working directory has two parents, tag '.' uses the first
154 changeset: 3:e62f78d544b4
153 changeset: 3:e62f78d544b4
155 parent: 1:3d5bf5654eda
154 parent: 1:3d5bf5654eda
156 user: test
155 user: test
@@ -23,7 +23,6 b' M bar'
23 M foo1
23 M foo1
24 foo
24 foo
25 % reverting foo1 and bar
25 % reverting foo1 and bar
26 warning: working directory has two parents, tag '.' uses the first
27 saving current version of bar as bar.orig
26 saving current version of bar as bar.orig
28 reverting bar
27 reverting bar
29 saving current version of foo1 as foo1.orig
28 saving current version of foo1 as foo1.orig
General Comments 0
You need to be logged in to leave comments. Login now