How to find, who executed "push -f" command

Arne Babenhauserheide arne_bab at web.de
Sun Dec 2 11:30:20 UTC 2012


Dear Jeshkumar,

Analyzing the graph is the first way: Checking who created the new head. But 
that is not exact science: It could be that someone created the head and 
someone else pulled it and force-pushed it into your repo.

Repo: changes 

yours: a-b-c

1: a-b-d

2: a-b-c 

→ 2 pulls from 1

⇒ 2: a-b-c
        \d

→ 2 pushes with --force into yours

⇒ yours: a-b-c
            \d

In that case, just looking at the graph would lead to blaming 1, even though 
it was 2 who pushed the changes.

Best wishes,
Arne



Am Samstag, 1. Dezember 2012, 17:12:29 schrieb jeshkumar555 at gmail.com:
> Hi Babenhauserheide,
> 
> Thanks for the reply, can't we by analysing graph ?
> 
> Sent from my HTC
> Excuse for typo.
> 
> ----- Reply message -----
> From: "Arne Babenhauserheide" <arne_bab at web.de>
> Date: Sat, Dec 1, 2012 3:06 am
> Subject: How to find, who executed "push -f" command
> To: <mercurial at selenic.com>
> Cc: "Jeshwanth Kumar N K Jeshu" <jeshkumar555 at gmail.com>
> 
> 
> Hi Jeshwanth,
> 
> Am Freitag, 30. November 2012, 23:19:39 schrieb Jeshwanth Kumar N K Jeshu:
> > I started using mercurial recently, I have one small doubt about push
> > command. How can I know who has executed push -f ( force push) command in
> > a
> > repository.
> 
> The first, deat easy but inexact way is to just look, who wrote the commits
> in the newly generated head.
> 
> The second way is to check your server logfiles. That’s exact but more
> complicated.
> 
> The third, the advanced way is to add hooks to your repository which note
> connection details when something is pushed (changegroup hooks, for example
> defined in the .hg/hgrc in the repo)
> 
> Best wishes,
> Arne
> --
> Ein Würfel System - einfach saubere Regeln:
> 
> - http://1w6.org
-- 
1w6 sie zu achten,
sie alle zu finden,
in Spiele zu leiten
und sacht zu verbinden.
→ http://1w6.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20121202/22a11966/attachment.asc>


More information about the Mercurial mailing list