Commit Graph

676 Commits

Author SHA1 Message Date
Siddharth Agarwal
6f961dfc3f test-mergedriver.t: remove XXX that is no longer valid 2016-02-10 00:01:29 -08:00
Tony Tung
2226da3c6e [pull-createmarkers] fix test to match output
Test Plan: passed test

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir

Differential Revision: https://phabricator.fb.com/D2913021

Signature: t1:2913021:1454964727:a7cafa3812ef3080ebf6b811784aa4013bdfc05a
2016-02-08 15:56:50 -08:00
Mateusz Kwapich
e1c9a953b7 pushrebase: change supportedversions to supportedoutgoingversions
Summary: the api changed once again

Test Plan: tests are passing now

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D2913893

Signature: t1:2913893:1454971559:052b0a2b20dfde337a74991f0ddb9498f08a9cb0
2016-02-08 14:47:54 -08:00
Mateusz Kwapich
65d396da6e adjust tests for "hg update" output change
Test Plan: tests are passing now

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D2913888

Signature: t1:2913888:1454971575:b546eab6670ed60b0d91fe649ba2c031fdf34872
2016-02-08 14:46:24 -08:00
Mateusz Kwapich
b860a46a63 mergedriver: fix tests
Test Plan: tests are passing now.

Reviewers: #sourcecontrol, ttung, sid0

Reviewed By: sid0

Differential Revision: https://phabricator.fb.com/D2913880

Signature: t1:2913880:1454971308:36b95c8b1a952940bd70e147eef0943e1f1a30c5
2016-02-08 14:44:15 -08:00
Tony Tung
0d10e34ced [pushrebase] fix bug introduced in D2903928
Summary: apparently --config 'ABC.def = gef' is not permitted.

Test Plan: passed tests

Reviewers: #sourcecontrol

Subscribers: lcharignon, mitrandir

Differential Revision: https://phabricator.fb.com/D2913001
2016-02-08 14:29:40 -08:00
Tony Tung
0d0bfa9b21 point symlink to the right place
Summary: supercedes https://phabricator.fb.com/D2906316, i believe.

Test Plan: check-code

Reviewers: #sourcecontrol

Subscribers: mitrandir

Differential Revision: https://phabricator.fb.com/D2912920
2016-02-08 14:27:32 -08:00
Tony Tung
4c8c42fa47 [sparse] fix check-code errors in sparse
Test Plan: pass check-code

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, mitrandir

Differential Revision: https://phabricator.fb.com/D2912916

Signature: t1:2912916:1454965189:6fe65e789325ad68abf5dce8f4d2b01f9a5a95e0
2016-02-08 14:27:09 -08:00
Tony Tung
92d41175d0 [fbamend] back out D2804307
Summary: Because @sid0 backed out 5293d4f88aefeab1e9e18e8d4ce9a1298f9480cb in hg-crew, we need to back out D2804307 to match the old hash computation.

Test Plan: pass fbamend

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir, sid0

Differential Revision: https://phabricator.fb.com/D2907105

Signature: t1:2907105:1454718476:547de056470d42f3e8be3f9fc4fb1582164f2c6c
2016-02-08 10:54:41 -08:00
Kostia Balytskyi
c32c5f4b4c pullcreatemarkers: add landed attribute to markers
Summary:
Further goal is to make smartlog be able to display "landed as smth"
near local commits that has been landed. smth may be either the hash
of public rebased commit pulled from server or a phabricator diff id.

Differential Revision: https://phabricator.fb.com/D2908465
2016-02-08 09:54:52 -08:00
Durham Goode
c79d639b8a sparse: add missing return statements
A few spots were not returning the original value. This was probably fine since
they didn't have return values anyway, but it's unclean not to return anyway.
2016-02-05 11:12:41 -08:00
Will Lentz
15ab39e997 add ability to set sparse config during clone 2016-02-05 10:34:00 -08:00
Ryan McElroy
2fe9ba2b80 chistedit: appease check-code 2016-02-05 10:24:50 -08:00
Steve Fink
a2564eb751 chistedit: allow running histedit with c or C, to better match crecord 2016-02-05 10:13:51 -08:00
Steve Fink
f5a8931efa chistedit: show direction of fold and roll with caret 2016-02-05 10:13:51 -08:00
Steve Fink
60ebc07b0d chistedit: expand help text 2016-02-05 10:13:51 -08:00
Steve Fink
6ff286727a chistedit: allow reordering changes without selecting 2016-02-05 10:13:51 -08:00
Kyle Lippincott
70d306b13d tweakdefaults: support pull --rebase -d <dest> without remotenames 2016-02-05 10:02:41 -08:00
Ryan McElroy
ed15cdfb7f copytrace: skip tests if getdb.sh is not present
Test Plan: run-tests.py test-copytrace.t test-copytrace-bundle2.t test-filldb.t

Reviewers: #sourcecontrol, ttung

Reviewed By: ttung

Differential Revision: https://phabricator.fb.com/D2903427

Tasks: 9944051

Signature: t1:2903427:1454630393:5fda38cf9c6c981304cdc249e4f15cfd78f88497
2016-02-05 03:23:19 -08:00
Tony Tung
c6681e3e6d [pushrebase] change the pushrebase tests to use the PYTHONPATH setup
Summary: Just a bit cleaner.  Also this makes it so pushrebase can source any hypothetically shared code.  Mostly because I'm too lazy to type bundle2hooks=PATH_OF_FILE.

Test Plan: same unit tests pass.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: durham, mitrandir

Differential Revision: https://phabricator.fb.com/D2903928

Signature: t1:2903928:1454648999:81f6cc64f708dc4709640b2a214e1b3dbc11caa5
2016-02-04 22:47:14 -08:00
Tony Tung
942f1d6a8b fix some check-code violations
Summary:
1) Export and variable setting on separate lines.
2) 80-col.

Test Plan: python ../../hg-crew/tests/run-tests.py --with-hg ../../hg-crew/hg test-manifestdiskcache.t test-check-code.t

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, ikostia, mitrandir

Differential Revision: https://phabricator.fb.com/D2903291

Signature: t1:2903291:1454630884:b51a536e05c59a84e3ac1d1bc91e5e1952edee6f
2016-02-04 16:24:31 -08:00
Tony Tung
e8afb24cc7 [bundle2hooks] allow hook arguments to be stored on the operation object
Summary:
Some bundle2 handlers (such as pushvars) run prior to the acquisition of the lock.  In order to have those handlers be able to set hook variables, we have to save the hook variables onto the bundle object, rather than the transaction object.

Once the transaction is retrieved, we drain all the hook arguments into the transaction.  Further attempts to call `addhookargs will cause an abort.

An alternative to aborting is to save the transaction, and pass further arguments to the transaction.  I believe this is an inferior choice because it is masking a bug.

Test Plan: run ./verify_reviewedby_info.t in opsfiles with D2880506 patched in.  passed.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: durham, mitrandir

Differential Revision: https://phabricator.fb.com/D2898401

Signature: t1:2898401:1454615031:94933cf513eaa06c5b60686ec5d65a563ddc31c4
2016-02-04 15:59:17 -08:00
Durham Goode
302e4ee5c3 pushrebase: fix changegroup format picking to account for new upstream api
Summary:
Upstream has changed _packermap to be hidden behind supportedversions(). We need
to use that, otherwise we'll potentially reply with the wrong changegroup type.

Test Plan: Ran the tests

Reviewers: mitrandir

Differential Revision: https://phabricator.fb.com/D2903217
2016-02-04 14:45:17 -08:00
Martijn Pieters
864de92728 Make fbamend responsible for supporting automv.
Summary:
This facilitates moving automv out of this repository to Mercurial proper.
Use extensions.afterloaded() to avoid relying on module load order.

Test Plan: Run the test suite with ../../hg/tests/run-tests.py

Reviewers: rmcelroy, durham

Differential Revision: https://phabricator.fb.com/D2896456
2016-02-04 11:03:31 +00:00
Tony Tung
560631448d extract replaceclass out of manifestdiskcache
Summary: It's an useful function.  Plan to use it in another extension.

Test Plan: python ../../hg-crew/tests/run-tests.py --with-hg ../../hg-crew/hg test-manifestdiskcache.t

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, mitrandir

Differential Revision: https://phabricator.fb.com/D2896753

Signature: t1:2896753:1454542605:c660ee3e108b497c4a823bd732f98ebf5e147e02
2016-02-03 16:22:34 -08:00
Durham Goode
a7049fc2e2 dirsync: move mirroredfiles declaration out of if statement
If this if statement was skipped (because there was no mapping configured) this
function threw an exception because mirroredfiles was not defined.
2016-02-03 15:39:04 -08:00
Mateusz Kwapich
49fd689e08 catnotate: add the extension to setup.py
Summary:
I've written it sometime ago and it's not being shipped yet because I forgot to
add it to setup.py

Test Plan: no plan

Reviewers: #sourcecontrol, durham, ttung, rmcelroy

Reviewed By: rmcelroy

Differential Revision: https://phabricator.fb.com/D2887171

Signature: t1:2887171:1454413837:4a57fc8bccfe840c5540e0db59881af2bea21e45
2016-02-02 15:00:54 -08:00
Kostia Balytskyi
474ae65be3 smartlog: warn user when there is no master commit locally
Differential Revision: https://phabricator.fb.com/D2890713
2016-02-02 11:15:28 -08:00
Laurent Charignon
1d42d0d363 gitlikebookmark: remove test and extension
Summary:
This feature does not work well with inhibit, since we didn't ship it
let's remove it as the test is noisy.

Test Plan: N/A

Reviewers: #sourcecontrol, durham, ttung

Differential Revision: https://phabricator.fb.com/D2868095
2016-01-26 16:31:11 -08:00
Laurent Charignon
d5e61406e1 smartlog: make smartlogrevset 2x faster
Summary:
This works because it is fast to compute drafts thanks to the phase computation
in C.

After the change
$ ~/repos/hg/hg perfrevset "smartlog()"
! wall 0.004146 comb 0.000000 user 0.000000 sys 0.000000 (best of 666)

Before the change
$ ~/repos/hg/hg perfrevset "smartlog()"
! wall 0.008009 comb 0.010000 user 0.010000 sys 0.000000 (best of 344)

Test Plan: No functionality change, everything works

Reviewers: #sourcecontrol, ttung, mitrandir

Reviewed By: mitrandir

Subscribers: mitrandir

Differential Revision: https://phabricator.fb.com/D2857375

Signature: t1:2857375:1453507337:0eb672959370fe21d62d18afe07c5f75b11e29a8
2016-01-25 14:52:16 -08:00
pjb
5ab42026c5 Added githelp -- apply functionality and associated test.
Summary: githelp --apply functionality added

Test Plan: test-githelp.t updated and checked

Reviewers: cgrigoruta, rmcelroy

Differential Revision: https://phabricator.fb.com/D2841676

Tasks: 9464409
2016-01-25 05:12:54 -08:00
Simon Farnsworth
f8b263fdd8 Don't crash in phrevset if Conduit replies before linear search completes
Summary:
When converting a Diff number to a revset, phrevset would do a linear scan of the repo history for the most recent appearance of that Diff number (slow if it's an older commit or not present in this repo) and in parallel, query Phabricator Conduit to try and shortcut the process.

Unfortunately, if Conduit was quicker than the linear scan, we would crash because we can't handle a Conduit response for hg commits made when a Diff lands, or for any repo that doesn't have a callsign in hgrc.

Fix the crashes; don't bother calling Conduit if we can't handle any reasonable answer, and teach the hg branch to handle all reasonable answers.

Test Plan:
Check that the new extension does linear search unconditionally when it lacks a callsign:
```
: /data/users/simonfar/fbsource (hg) [90234606e65a2a04d042caba7cf5ee85a7a5466e]
: simonfar@devvm631  $ hg --config extensions.phrevset=/data/users/simonfar/fb-hgext/phrevset.py log -r D2750128
phrevset.callsign is not set - doing a linear search
changeset:   3c0e6756bed4d7330391719bcde52e7490499e53  D2750128
user:        Yuhan Guo <yhguo@fb.com>
date:        Thu, 07 Jan 2016 00:19:23 -0800
```
Check that it doesn't do a linear search in a repo with a callsign:
```
: /data/users/simonfar/www-hg (hg) [webacademy-graphql]
: simonfar@devvm631  $ echo -e '[phrevset]\ncallsign=E' >> .hg/hgrc

: /data/users/simonfar/www-hg (hg) [webacademy-graphql]
: simonfar@devvm631  $ hg --config extensions.phrevset=/data/users/simonfar/fb-hgext/phrevset.py log -r D2704940
changeset:   4b24ee6737b7e36523eb24c6406d689cc54aadf9  D2704940
user:        xifanyan@2c7ba8d8-a2f7-0310-a573-de162e16dcc7
date:        Mon, 30 Nov 2015 23:38:18 -0800
```
Check that it aborts cleanly if you give it a Diff from a different repo in a repo with a known callsign:
```
: /data/users/simonfar/www-hg (hg) [webacademy-graphql]
: simonfar@devvm631  $ hg --config extensions.phrevset=/data/users/simonfar/fb-hgext/phrevset.py log -r D2750128
abort: Diff callsign 'FBS' is different from repo callsign 'E'
```
Check that linear scan eventually aborts cleanly if you give it a Diff from a different repo (note: this step is slow - over a minute on my devvm):
```
: /data/users/simonfar/fbsource (hg) [90234606e65a2a04d042caba7cf5ee85a7a5466e]
: simonfar@devvm631  $ hg --config extensions.phrevset=/data/users/simonfar/fb-hgext/phrevset.py log -r D2704940
phrevset.callsign is not set - doing a linear search
abort: Could not find diff D2704940 in changelog
```

Reviewers: #sourcecontrol, rmcelroy, ttung, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, kanishkparihar

Differential Revision: https://phabricator.fb.com/D2844832

Tasks: 9723813, 9714886

Signature: t1:2844832:1453321767:f445447d8187b4be22db3065ba316e6aa461f757
2016-01-21 08:11:13 -08:00
Durham Goode
e8fde2c226 mergedriver: update tests with simple output change 2016-01-20 13:40:15 -08:00
Eric Sumner
a08709e0e1 remove bm.write from test-pushreabse-remotenames 2016-01-20 13:40:15 -08:00
Durham Goode
5de24a9709 sparse: update test output with simple change 2016-01-20 13:40:15 -08:00
Durham Goode
245e1ddcd7 pullcreate: update test output
Upstream changed some wording.
2016-01-20 13:40:15 -08:00
Durham Goode
0f14ff53a7 gitlike: fix active bookmark api
Upstream changed the api for getting an active bookmark.
2016-01-20 13:40:15 -08:00
Durham Goode
3a50b8338f show: fix test with new quotes
Upstream has switched to using single quotes in help text, so we need to update
our tests.
2016-01-20 13:40:15 -08:00
Durham Goode
8c5ae540f7 pushrebase: fix to match upstream changes
Upstream changed the name of the packermap and reimplemented the lrucache, so we
need to update to work with them.
2016-01-20 13:40:15 -08:00
Durham Goode
d708e61855 morestatus: update test to reflect upstream change
Upstream has added more output around --continue.
2016-01-20 13:40:15 -08:00
Durham Goode
9aa661c2f9 fbhistedit: update to work with upstream histedit
Upstream has changed the way histedit works to use the @action decorator and to
allow custom built edit comments. Let's update to match that.
2016-01-20 13:40:15 -08:00
Priya Goyal
ae88add502 pushrebase: use mercurial.hg.repository() rather than mercurial.bundlerepo.bundlerepository()
Summary: This change is done so that important extension wrapping is not skipped while creating a bundle. Using bundlerepository, some extensions were getting skipped. Extensions like inhibit would fail without this change.

Test Plan: I ran pushrebase test and it failed with Attribute Error in newmancache._order = collections.deque(oldmancache._order). It failed without the changes made in this diff as well. Also, when I ran all the tests, some of them failed due to not having getdb.sh, which isn't related to this change.

Reviewers: #sourcecontrol, ttung, pyd, lcharignon, rmcelroy

Reviewed By: rmcelroy

Subscribers: durham, lcharignon, ericsumner, mitrandir, trunkagent, pyd, rmcelroy

Differential Revision: https://phabricator.fb.com/D2838849

Tasks: 7916714

Signature: t1:2838849:1453299050:142328bf8f0dbc8814cd3bd25ac47714c4bf99d7
2016-01-20 13:11:27 -08:00
Laurent Charignon
38895977b8 sparse: dont' crash when ds.copy gets None as its first argument
Summary:
dirstate.copy can get None as a first argument and it is a valid case.
Before this patch, we were crashing in match.py because we didn't expect
matching against None.

Test Plan:
Not sure how to easily test that without introducing a dependency on
evolve as uncommit helped us uncover the bug in the first place. I checked
manually that the line was correct.

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2834249
2016-01-15 13:02:09 -08:00
Jun Wu
c2ee142960 setup: add errorredirect
Summary: We are shipping the config soon. Missed this one.

Test Plan: `setup.py build`

Reviewers: rmcelroy

Reviewed By: rmcelroy

Subscribers: #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2834261

Tasks: 9259456

Signature: t1:2834261:1452877180:03b833b3fe54c3d461d6253cb709d3d186091fb2
2016-01-15 09:08:03 -08:00
Tony Tung
94920319b5 [manifestdiskcache] fix revision(..)
Summary: It now has a keyword argument _df

Test Plan: hg pull with manifestdiskcache enabled.  was previously failing.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir

Differential Revision: https://phabricator.fb.com/D2832261

Tasks: 9670415

Signature: t1:2832261:1452814393:7309f4e25ccd47937d9208c768cb3e874176abbd
2016-01-14 16:18:52 -08:00
Laurent Charignon
35d3252f3f phabstatus: improve reliability when conduit is down or sending errors
Summary:
This patches makes "hg sl" and requesting diff status in general more
reliable. We display "Error" for the diff status and log the error in the
console.

    $ ~/facebook-hg-rpms/fb-hgext hg ssl
    Could not call "arc call-conduit" No JSON object could be decoded
    @  8844c9  lcharignon  D2824091  Error
    |  phabstatus: improve reliability when conduit is down or sending errors
    |
    o  252837  lcharignon  D2821846  Error  remote/@
    |  setup: remove writecg2 from list of module
    |
    .
    .
    |
    | o  9ad683  ericsumner  remote/stable
    | |  pushrebase: add HG_PENDING to test
    | |
    | o  e2b354  ericsumner
    |/   writecg2: update test, no longer writing CG2 bundles
    |
    o  fcd19f  durham
    |  Add dirsync to setup.py
    |
    note: hiding 7 old heads without bookmarks


Test Plan: Checked with wifi off that the message is showed

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2824091
2016-01-14 10:45:47 -08:00
Simon Farnsworth
a5b47065a2 Turn off git diff by default in 'hg show'
Summary:
Bryan O'Sullivan found that the copy detection in git diff was a significant contributor to the relative slowness of 'hg log -vpr .' compared to 'git show'. Automatically disable git-style diff by default for 'hg show', and allow you to re-enable it via command line option if you need it and can accept the slowdown.

Depends on D2820421

Test Plan:
Run the automated test and confirm no regression.
```
: /data/users/simonfar/fb-hgext (hg) [nocopydetectioninshow]
: simonfar@devvm148 tests $ ../../hg/tests/run-tests.py -l test-show.t -i
.
# Ran 1 tests, 0 skipped, 0 warned, 0 failed.
```
Confirm that git diffs are the default in your hgrc:
```
: /data/users/simonfar/fb-hgext (hg) [nocopydetectioninshow]
: simonfar@devvm148 tests $ hg --config alias.show=show --config extensions.show=../show.py showconfig | grep diff.git
diff.git=True
```
Run the new 'hg show' manually, and confirm that you don't get a git diff despite your hgrc setting:
```
: /data/users/simonfar/fb-hgext (hg) [nocopydetectioninshow]
: simonfar@devvm148 tests $ hg --config alias.show=show --config extensions.show=../show.py show
changeset:   7d57a1e75587af73e252d69611aa12ebffc38e78   (@)
bookmarks:   nocopydetectioninshow
user:        Simon Farnsworth <simonfar@fb.com>
date:        Mon, 11 Jan 2016 16:28:15 -0800

    Turn off git diff by default in
    'hg show'

diff -r 6dda76b19bf1 -r 7d57a1e75587 show.py
--- a/show.py   Mon Jan 11 15:30:19 2016 -0800
+++ b/show.py   Mon Jan 11 16:28:15 2016 -0800
@@ -93,16 +93,27 @@

     opts['patch'] = True
     opts['verbose'] = True
-    backup = ui.backupconfig('ui', 'verbose')
-    basebackup = repo.baseui.backupconfig('ui', 'verbose')
+
+    verbosebackup = ui.backupconfig('ui', 'verbose')
+    verbosebasebackup = repo.baseui.backupconfig('ui', 'verbose')
+    # Copy tracking is slow when doing a git diff. Override hgrc, and rely on
+    # opts getting us a git diff if it's been requested. Ideally, we'd find and
+    # fix the slowness in copy tracking, but this works for now.
+    # See Bryan O'Sullivan's comments on task 9599994 for context
+    gitdiffbackup = ui.backupconfig('diff', 'git')
+    gitdiffbasebackup = ui.backupconfig('diff', 'git')

     try:
         ui.setconfig('ui', 'verbose', True)
+        ui.setconfig('diff', 'git', False)
         # Propagate to subrepos
         repo.baseui.setconfig('ui', 'verbose', True)
+        repo.baseui.setconfig('diff', 'git', False)
         newargs = []
         commands.log(ui, repo, *newargs, **opts)

     finally:
-        ui.restoreconfig(backup)
-        repo.baseui.restoreconfig(basebackup)
+        ui.restoreconfig(gitdiffbackup)
+        repo.baseui.restoreconfig(gitdiffbasebackup)
+        ui.restoreconfig(verbosebackup)
+        repo.baseui.restoreconfig(verbosebasebackup)
```
Run the new 'hg show' manually with --git, and confirm that you get a git diff:
```
: /data/users/simonfar/fb-hgext (hg) [nocopydetectioninshow]
: simonfar@devvm148 tests $ hg --config alias.show=show --config extensions.show=../show.py show --git
changeset:   7d57a1e75587af73e252d69611aa12ebffc38e78   (@)
bookmarks:   nocopydetectioninshow
user:        Simon Farnsworth <simonfar@fb.com>
date:        Mon, 11 Jan 2016 16:28:15 -0800

    Turn off git diff by default in 'hg show'

diff --git a/show.py b/show.py
--- a/show.py
+++ b/show.py
@@ -93,16 +93,27 @@

     opts['patch'] = True
     opts['verbose'] = True
-    backup = ui.backupconfig('ui', 'verbose')
-    basebackup = repo.baseui.backupconfig('ui', 'verbose')
+
+    verbosebackup = ui.backupconfig('ui', 'verbose')
+    verbosebasebackup = repo.baseui.backupconfig('ui', 'verbose')
+    # Copy tracking is slow when doing a git diff. Override hgrc, and rely on
+    # opts getting us a git diff if it's been requested. Ideally, we'd find and
+    # fix the slowness in copy tracking, but this works for now.
+    # See Bryan O'Sullivan's comments on task 9599994 for context
+    gitdiffbackup = ui.backupconfig('diff', 'git')
+    gitdiffbasebackup = ui.backupconfig('diff', 'git')

     try:
         ui.setconfig('ui', 'verbose', True)
+        ui.setconfig('diff', 'git', False)
         # Propagate to subrepos
         repo.baseui.setconfig('ui', 'verbose', True)
+        repo.baseui.setconfig('diff', 'git', False)
         newargs = []
         commands.log(ui, repo, *newargs, **opts)

     finally:
-        ui.restoreconfig(backup)
-        repo.baseui.restoreconfig(basebackup)
+        ui.restoreconfig(gitdiffbackup)
+        repo.baseui.restoreconfig(gitdiffbasebackup)
+        ui.restoreconfig(verbosebackup)
+        repo.baseui.restoreconfig(verbosebasebackup)
```

Reviewers: #sourcecontrol, ttung, lcharignon

Reviewed By: lcharignon

Subscribers: rmcelroy, lcharignon, #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2822071

Tasks: 9599994

Signature: t1:2822071:1452586169:59011b5331cd6c76741cae348c8db4912ed6c9b7
2016-01-12 11:24:35 -08:00
Simon Farnsworth
86662e0f15 Make 'hg show' a native command
Summary:
There are a few ways in which the 'hg show' alias doesn't work for users:

1) if your argument to 'hg show' isn't in exactly the right form, you get confusing messages (e.g. if you run 'hg show --help').

2) It's slow compared to 'git show', and needs speeding up. There's some low-hanging fruit identified by bryano, and having the command as a native command makes it easier to go there.

As a first step towards fixing this, reimplement the existing alias as a Python extension, aiming for minimum behaviour changes. We can inline the implementation of 'hg log' when we need to.

Test Plan:
Run the new automatic test test-show.t:

: /data/users/simonfar/fb-hgext (hg) [nativeshow]
: simonfar@devvm148 tests $ ../../hg/tests/run-tests.py -l test-show.t
.
# Ran 1 tests, 0 skipped, 0 warned, 0 failed.

Note that this means that review needs to cover the automatic test, too, in case I've missed anything important

Reviewers: #sourcecontrol, lcharignon, ttung, rmcelroy

Reviewed By: lcharignon, rmcelroy

Subscribers: rmcelroy, lcharignon, #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2820421

Tasks: 9323445, 9599994

Signature: t1:2820421:1452541611:02efa59739f690b30053d93e0d47adf0aef8dbf4
2016-01-12 11:20:28 -08:00
Laurent Charignon
2091cbc6b2 setup: remove writecg2 from list of module
Summary: We removed the module, let's remove it from the setup too

Test Plan: setup builds

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2821846
2016-01-11 15:54:37 -08:00
Laurent Charignon
cd01b3952d remove writecg2 extension and test
Summary: @pyd said it was not used anymore as everything is in core.

Test Plan: N/A

Reviewers: durham, ericsumner, pyd

Subscribers: pyd

Differential Revision: https://phabricator.fb.com/D2760373
2016-01-11 10:47:36 -08:00