From aeebca0bd280a67003545d36f1886bfdcd9318fe Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Mon, 22 Apr 2013 16:55:13 -0500 Subject: remote-hg: add branch_tip() helper Idea from gitifyhg, the backwards compatibility is how Mercurial used to do it. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/git-remote-hg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index a4db5b07bc..bd93f82857 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -457,6 +457,13 @@ def do_capabilities(parser): print +def branch_tip(repo, branch): + # older versions of mercurial don't have this + if hasattr(repo, 'branchtip'): + return repo.branchtip(branch) + else: + return repo.branchtags()[branch] + def get_branch_tip(repo, branch): global branches @@ -467,9 +474,7 @@ def get_branch_tip(repo, branch): # verify there's only one head if (len(heads) > 1): warn("Branch '%s' has more than one head, consider merging" % branch) - # older versions of mercurial don't have this - if hasattr(repo, "branchtip"): - return repo.branchtip(branch) + return branch_tip(repo, branch) return heads[0] -- cgit v1.2.3 /drivers/net/ethernet/mellanox/mlx4?id=33cb0fa7888510b5bd2096352b200cfe29db10fe'>treecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2014-05-19ethtool: Disallow ETHTOOL_SRSSH with both indir table and hash key unchangedBen Hutchings2-3/+6
2014-05-19ethtool: Expand documentation of ethtool_ops::{get,set}_rxfh()Ben Hutchings1-8/+9
2014-05-19ethtool: Improve explanation of the two arrays following struct ethtool_rxfhBen Hutchings1-8/+9
2014-05-19ethtool: Name the 'no change' value for setting RSS hash key but not indir tableBen Hutchings2-10/+14
2014-05-19ethtool: Return immediately on error in ethtool_copy_validate_indir()Ben Hutchings1-9/+7
2014-05-14driver/net/ethernet/ec_bhf.c: fix sparse warningsDarek Marcinkiewicz1-10/+10
2014-05-14net: Use a more standard macro for INET_ADDR_COOKIEJoe Perches3-6/+8
2014-05-14net: systemport: Use devm_ioremap_resource()Jingoo Han1-4/+3
2014-05-14net/mlx4_core: Fix inaccurate return value of mlx4_flow_attach()Eyal Perry1-1/+1
2014-05-14net/mlx4_en: Using positive error value for unsignedEyal Perry1-2/+2
2014-05-14net/mlx4_en: Protect MAC address modification with the state_lock mutexShani Michaelli1-2/+1
2014-05-14net/mlx4_core: Removed unnecessary bit operation conditionEyal Perry1-5/+4
2014-05-14net/mlx4_core: Fix smatch error - possible access to a null variableEyal Perry1-0/+14
2014-05-14net/mlx4_en: Fix errors in MAC address changing when port is downShani Michaelli1-2/+3
2014-05-14net/mlx4_en: User prio mapping gets corrupted when changing number of channelsIdo Shamay1-1/+2
2014-05-14net/mlx4_core: Enforce irq affinity changes immediatlyYuval Atias5-2/+83
2014-05-14macvlan: Propagate lowerdev MTU changesdingtianhong1-0/+7
2014-05-14dccp: make the request_retries minimum is 1wangweidong1-1/+2
2014-05-14snmp: fix some left over of snmp statsWANG Cong2-5/+5
2014-05-14ipv4: make ip_local_reserved_ports per netnsWANG Cong9-37/+38
2014-05-14irda: sh_irda: Enable driver compilation with COMPILE_TESTLaurent Pinchart1-1/+2
2014-05-14tipc: merge port message reception into socket reception functionJon Paul Maloy6-59/+46
2014-05-14tipc: clean up neigbor discovery message receptionJon Paul Maloy1-108/+111
2014-05-14tipc: improve and extend media address conversion functionsJon Paul Maloy6-76/+83
2014-05-14tipc: rename and move message reassembly functionJon Paul Maloy8-91/+74
2014-05-14tipc: mark head of reassembly buffer as non-linearJon Paul Maloy1-0/+2
2014-05-14tipc: don't record link RESET or ACTIVATE messages as trafficJon Paul Maloy1-3/+4
2014-05-14tipc: compensate for double accounting in socket rcv bufferJon Paul Maloy2-9/+21
2014-05-14tipc: decrease connection flow control windowJon Paul Maloy3-9/+11
2014-05-14bonding: alloc the structure ad_info dynamically in per slavedingtianhong6-37/+67
2014-05-13sh_eth: replace devm_kzalloc() with devm_kmalloc_array()Sergei Shtylyov1-2/+2
2014-05-13tg3: Update copyright and version to 3.137Michael Chan2-4/+4
2014-05-13tg3: Prevent page allocation failure during TSO workaroundMichael Chan1-7/+26
2014-05-13tg3: Don't modify ip header fields when doing GSOMichael Chan1-7/+5
2014-05-13net: support marking accepting TCP socketsLorenzo Colitti9-5/+30
2014-05-13net: Use fwmark reflection in PMTU discovery.Lorenzo Colitti2-1/+8
2014-05-13net: add a sysctl to reflect the fwmark on repliesLorenzo Colitti10-3/+41
2014-05-13arc_emac: add netpoll supportBeniamino Galvani1-0/+12
2014-05-13arc_emac: implement promiscuous mode and multicast filteringBeniamino Galvani1-0/+37
2014-05-13tcp: IPv6 support for fastopen serverDaniel Lee2-26/+71
2014-05-13tcp: improve fastopen icmp handlingYuchung Cheng2-26/+31
2014-05-13tcp: use tcp_v4_send_synack on first SYN-ACKYuchung Cheng5-105/+85
2014-05-13tcp: simplify fast open cookie processingYuchung Cheng5-64/+33
2014-05-13tcp: move fastopen functions to tcp_fastopen.cYuchung Cheng3-185/+200
2014-05-13net: cdc_ncm/cdc_mbim: rework probing of NCM/MBIM functionsBjørn Mork3-17/+55