git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
8316d18
)
remote-hg: trivial cleanup
author
Felipe Contreras
<redacted>
Sat, 25 May 2013 02:30:01 +0000
(21:30 -0500)
committer
Junio C Hamano
<redacted>
Tue, 28 May 2013 15:02:24 +0000
(08:02 -0700)
It's better to catch the exception later on.
Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
contrib/remote-helpers/git-remote-hg
patch
|
blob
|
history
diff --git
a/contrib/remote-helpers/git-remote-hg
b/contrib/remote-helpers/git-remote-hg
index 1e61f4327a338dc406958e68b0c2563bddbc6744..b08f9090761278d55198b6daa06225101782dce4 100755
(executable)
--- a/
contrib/remote-helpers/git-remote-hg
+++ b/
contrib/remote-helpers/git-remote-hg
@@
-185,10
+185,7
@@
class Marks:
return rev in self.marks
def get_tip(self, branch):
- try:
- return str(self.tips[branch])
- except KeyError:
- return None
+ return str(self.tips[branch])
def set_tip(self, branch, tip):
self.tips[branch] = tip
@@
-433,10
+430,10
@@
def export_ref(repo, name, kind, head):
global prefix, marks, mode
ename = '%s/%s' % (kind, name)
- t
ip = marks.get_tip(ename)
- if tip and tip in repo:
+ t
ry:
+ tip = marks.get_tip(ename)
tip = repo[tip].rev()
- e
lse
:
+ e
xcept
:
tip = 0
revs = xrange(tip, head.rev() + 1)
git clone https://git.99rst.org/PROJECT