Commit Graph

760 Commits

Author SHA1 Message Date
Laurent Charignon
0001b13276 fbamend: fix transaction issue with inhibit
Summary:
Before this patch, fbamend with inhibit was leaving commits behind
when using --fixup. This was because we had two separates transaction, one for
the bookmarks and one for the markers. This patchs makes the marker creation
happen in the same transaction as the bookmark move.

Test Plan: check hg amend --fixup and hg amend --rebase
https://phabricator.fb.com/P56056980

Reviewers: ericsumner, durham

Differential Revision: https://phabricator.fb.com/D2771188
2015-12-18 14:22:10 -08:00
Kostia Balytskyi
7e0f40375f #9421810: disable histgrep if ran on the whole repo
Differential Revision: https://phabricator.fb.com/D2769383
2015-12-18 05:59:43 -08:00
Jun Wu
f4389dfd0d errorredirect: simplify environment variables
Summary:
Add $WARNING to make it easier to get the original behavior (print the
`***` contact support stuff). Remove misc environment variables included
in $WARNING to make the code simpler and less dependent.

Besides, store traceback in $TRACE so that it will be easier to read it
for multiple times. For example, try to upload it (first read) and if
failed, print it locally (second read). Otherwise we need ugly hack like
`A=$(cat)` in the script.

Test Plan: Check the new examples manually and run test-errorredirect.t

Reviewers: #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

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

Tasks: 9259456

Signature: t1:2770557:1450384683:672e76752040d3d1b440522dd54ac43306c76bf9
2015-12-17 20:28:31 +00:00
Jun Wu
ecff889185 smartlog: be compatiable with upstream change
Summary:
Upstream commit a0f2789070ce changes the signature of `cmdutil.displaygraph`
This patch detects it and use the new signature when needed.

Test Plan: Run `hg sl` with new hg on my laptop and old hg on devserver.

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

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

Tasks: 9446957

Signature: t1:2769659:1450376979:83f94e9bf30dea5b3c6115295ee92fdd456263af
2015-12-17 17:56:05 +00:00
Kostia Balytskyi
bda30b50ec #9433233: made pats argument of histgrep being passed downstream
Differential Revision: https://phabricator.fb.com/D2768986
2015-12-17 07:36:58 -08:00
Durham Goode
186105860d sparse: don't stat .hg/sparse for every sparsematch call
Summary:
The old behavior would check that the cached sparse matcher was up to date by
performing a checksum on the contents of the .hg/sparse and .hg/tempsparse
files. This caused a lot of extra syscalls when sparse match was used inside a
loop.

The fix is to cache the .hg/sparse signature, and only refresh them when the
lock is acquired (similar to how most caches in Mercurial already work).

Test Plan: Ran the tests

Reviewers: #sourcecontrol, ttung, mitrandir

Reviewed By: mitrandir

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

Tasks: 9259321

Signature: t1:2758452:1450317072:6b0a962d336eda616cb27ef1b5e761d5153f64a3
2015-12-16 18:52:14 -08:00
Mateusz Kwapich
47cc0ea0b8 phabdiff: improve the {tasks} template
Summary:
There were some comments under my diff after landing. Included:

 * Old "Task ID" syntax
 * Removing the "T" prefix
 * Fixing the copypasted docstring

Test Plan: tests

Reviewers: #sourcecontrol, rmcelroy, ttung

Reviewed By: rmcelroy

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

Signature: t1:2765417:1450294877:4a50ecfdb1fb295ffaf01ecee6fe257b52e359bc
2015-12-16 15:53:53 -08:00
Thu Trang Pham
86db6ddc5c Remove --name from githelp for git stash drop
Summary:
Verified that the issue does occur.
Verified that using `hg shelve -d my_shelve_name` works for default and arbitrary shelve name.

Test Plan: Updated the tests for githelp

Reviewers: ericsumner, durham

Reviewed By: durham

Subscribers: de-engagement-diffs@

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

Tasks: 7632472

Signature: t1:2762983:1450289196:f25d757d158d110e8fc5503f974170c4a9892718
2015-12-16 10:19:40 -08:00
Durham Goode
f6354f898a pushrebase: fix pushing merge commits with date rewriting on
Summary:
When pushing a rewritten merge commit, we were trying to look up it's original
parent in the current repo (which no longer had that commit). We need to look in
the bundle repo instead.

Test Plan: Added a test. Also tried it manually on one of the hg servers

Reviewers: #sourcecontrol, ttung, mitrandir

Reviewed By: mitrandir

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

Signature: t1:2763182:1450230086:c560d4b8bbfe5d5387e23c1cc2e09109f49f255b
2015-12-16 09:47:23 -08:00
Eric Sumner
7f1d040e2c tweakdefaults: only apply default destination if rebasing or updating 2015-12-15 14:52:27 -08:00
Pierre-Yves David
584ef5f66e remove devel-warning from expected test-output
Summary:
Devel warnings are pointing at issues in the code that need to be fixed. The
right way to get the tests to pass is to fix the warning cause, not to the
warning to the tests.

This practically backout an handful of test that added such warning output in
the test.

Test Plan:
  Well, test are now broken to match the state of the borken code.

Reviewers: lcharignon

Differential Revision: https://phabricator.fb.com/D2760523
2015-12-15 11:08:20 -08:00
Mateusz Kwapich
74ec221aab extorder: Fix test 2015-12-15 09:23:53 -08:00
Mateusz Kwapich
c0481c096d pushrebase: improve tests to include prepushkey hook
Test Plan: whoteststhetests

Reviewers: #sourcecontrol, rmcelroy, ttung

Reviewed By: rmcelroy

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

Signature: t1:2751233:1449882198:4695c63c5172fc8f20e123b3da055b41b59c07e2
2015-12-14 15:38:11 -08:00
Laurent Charignon
7cc5fb3206 reset: use bookmarks.recordchange instead of bookmarks.write
Summary: bookmarks.write is deprecated

Test Plan: The test still passes

Reviewers: ericsumner, pyd, durham

Reviewed By: durham

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

Signature: t1:2747007:1449794510:09af0635c722a7aaf3b8aa444a116deaebada9b2
2015-12-14 11:31:53 -08:00
Laurent Charignon
695e2fdfcd fbamend: use bookmarks.recordchange instead of bookmarks.write
Summary: bookmarks.write is deprecated

Test Plan: the test is still passing

Reviewers: ericsumner, pyd, durham

Reviewed By: durham

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

Signature: t1:2747002:1449794465:a6ded4ed8f5249812c97cea13d9d6ce809109bd2
2015-12-14 11:30:33 -08:00
Mateusz Kwapich
77c008fae4 phabdiff: add {tasks} template
Summary: .

Test Plan: see tests

Reviewers: #sourcecontrol, rmcelroy, ttung

Reviewed By: rmcelroy

Subscribers: cdelahousse, mbasmanova

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

Tasks: 9408540

Signature: t1:2755231:1450115291:b0cbdbf7a3b02e614e4268ecc1b2ee837917aabd
2015-12-14 11:20:43 -08:00
Mateusz Kwapich
97c188373c extdeps extension
Summary: Our extensions dependecies are getting tricky. Let's make it right. (the logic still need to be tested - it worked on one very simple example so far).

Test Plan: no tests yet

Reviewers: pyd, lcharignon, rmcelroy

Reviewed By: rmcelroy

Subscribers: lcharignon, #sourcecontrol

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

Signature: t1:2710943:1449881799:16abe49529aa79df7d6ebe84a0bae0c0970b419a
2015-12-11 17:57:58 -08:00
Durham Goode
9b444e63df dirsync: fix extramatches function
Summary:
matchfn actually accepts just a single argument (the file name), so our
extramatches function was incorrect. The test didn't hit it because the matcher
had no patterns (it only had explicit files), so it never executed the matchfn.

Test Plan: I updated the tests with a pattern to force this code path to be hit.

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2750982
2015-12-11 14:46:29 -08:00
Tony Tung
ea8d3c62d8 [manifestdiskcache] respect the config variable
Summary: When the extension is loaded, it's always enabling manifestdiskcache.  We want to be able to switch it on via a config variable.

Test Plan:
[andromeda]:~/work/fbsource:0000000> time hg diff  --hidden  -r 885961 -r 892525 --config manifestdiskcache.enabled=True > /dev/null

real	0m1.608s
user	0m1.145s
sys	0m0.455s
[andromeda]:~/work/fbsource:0000000> time hg diff  --hidden  -r 885961 -r 892525 --config manifestdiskcache.enabled=False > /dev/null

real	0m1.981s
user	0m1.310s
sys	0m0.662s
[andromeda]:~/work/fbsource:0000000> time hg diff  --hidden  -r 885961 -r 892525 > /dev/null

real	0m2.106s
user	0m1.423s
sys	0m0.670s

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir

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

Signature: t1:2745769:1449783957:bd59780e1d418464767ab46483e4431ec8020858
2015-12-10 23:27:20 -08:00
Laurent Charignon
4502578fbf pullcreatemarkers: add a new extension to create markers on pull
Summary:
The goal of this extensions is to create obsolescence markers locally for
commits previously landed.
It uses the phabricator revision number in the commit message to detect the
relationship between a draft commit and its landed counterpart.
Thanks to these markers, less information is displayed and rebases can have
less irrelevant conflicts.

Test Plan: Added a new test

Reviewers: pyd, ericsumner, durham

Differential Revision: https://phabricator.fb.com/D2665923
2015-12-10 10:31:47 -08:00
Cecile Berillon
474190eca4 copytrace: deal with merge case if common ancestor is the second parent side 2015-12-09 15:22:51 -08:00
Cecile Berillon
c9baa74fbc copytrace: fix issue with retrieving files
Summary: the '.linkrev()' made downloading stuff one by one and took ages if it were not already downloaded (remotefilelog). this fixes the stuff

Test Plan: former tests still pass and testing this manually in fbsource during rebases, the one-by-one downloading stopped as far as I could see

Reviewers: #sourcecontrol, rmcelroy, ttung

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

Tasks: 8660367
2015-12-09 10:25:32 -08:00
Cecile Berillon
dc5697812a falls back to old copytracing if too many moves missing
Summary: In order not to spend too much time manually calculating moves, falls back without any user message if too many are not present in the server or local database

Test Plan: tested manually after removing the database, it still prints a message in the blackbox

Reviewers: #sourcecontrol, rmcelroy, ttung

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

Tasks: 8660367
2015-12-09 10:20:49 -08:00
Cecile Berillon
98d625f42e merge case
Summary: Copytracing works fine unless the ancestor is on the p2() branch, in that case fall back to old copytracing without bothering the user with an error

Test Plan: Former tests still pass and merge cases say the same with or without copytrace the extension

Reviewers: #sourcecontrol, rmcelroy, ttung

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

Tasks: 8660367
2015-12-09 10:14:10 -08:00
Cecile Berillon
cbbcc5bf37 copytrace: correcting bugs
Summary: Only looking up at the renames files, instead of all the files in the manifest

Test Plan: former tests still pass and this speeds copytrace on a high range of commits

Reviewers: #sourcecontrol, rmcelroy, ttung

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

Tasks: 8660367
2015-12-08 12:52:12 -08:00
Christian Delahousse
fe8d11dede documentation: added phabdiff and phabstatus template names
Summary: template names were not showing up in the documentation

Test Plan:
  12/08 11:20 cdelahousse@dev4253 /data/users/cdelahousse/fb-hgext
  $ hg help template --config extensions.phabdiff=phabdiff.py --config extensions.phabstatus=phabstatus.py
  phabdiff      String. Return the phabricator diff id for a given hg rev
  phabstatus    String. Return the diff approval status for a given hg rev

Reviewers: #sourcecontrol, ttung

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

Tasks: 9287658
2015-12-08 11:28:38 -08:00
Christian Delahousse
6f47ee3475 sparse: make debugrebuilddirstate --minimal sparse aware
Summary:
This diff makes debugrebuilddirstate --minimal sparse aware. The included tests cover
the cases outlined in the `debugrebuild --minimal`.

This diff depends on commit 0b73d3e75ef7 in core hg.

Test Plan:
  12/07 16:52 cdelahousse@dev4253 ~/local/fb-hgext/tests
  $ ./run-tests.py -j 40 test-sparse* --with-hg=~/local/hg-repo/hg
  ....
  # Ran 4 tests, 0 skipped, 0 warned, 0 failed.



Reviewers: #sourcecontrol, durham

Reviewed By: durham

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

Tasks: 8832753

Signature: t1:2594568:1447480370:ca70a9330ff89a74afe2f6e9d7e5ea1fa4e8f15f
2015-12-07 16:57:17 -08:00
Christian Delahousse
ca98253e51 sparse: add extra action 'am' to _refresh
Summary:
Commit 2f72e7519155 in core hg added an extra 'am' action to the merge state.
This broke sparse. This change simply adds it to the list of actions to apply.

Test Plan:
Ran the sparse tests

  $ ./run-tests.py -j 40 test-sparse* --with-hg=~/local/hg-repo/hg
  ....
  # Ran 4 tests, 0 skipped, 0 warned, 0 failed.


Where the mercurial's tip is 27ad998ef93f

Reviewers: #sourcecontrol, durham, sid0, ttung

Differential Revision: https://phabricator.fb.com/D2732213
2015-12-07 16:41:49 -08:00
Jun Wu
95b5e7d167 errorredirect: pipe error message to a custom script
Summary:
In case of crash, instead of printing an ugly stack trace, we want to
paste the message to some pastebin-like places. This extension allows
us to do so.

Test Plan:
1. Add `raise 1` to a random hg command, for example, `hg status`
2. Modify `~/.hgrc`:
```
[errorredirect]
script = (echo HEADER; cat; echo FOOTER) | cat > /tmp/a && echo '/tmp/a written'
```
3. Run `hg status` and confirm the shell script works and no stack trace is printed

Also, run `test-errorredirect.t`

Reviewers: rmcelroy, #sourcecontrol, ttung

Reviewed By: ttung

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

Tasks: 9259456

Signature: t1:2715697:1449173573:7a5abdb3cf3087128bdf688a596d97bb13f27783
2015-12-03 15:03:07 -08:00
Cecile Berillon
6e113a18b5 copytrace: modifying retrievedata behavior
Summary: Queries were too big

Test Plan: Former tests still pass, copytracing doesn't raise an exception on 10000 anymore.

Reviewers: #sourcecontrol, rmcelroy

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

Tasks: 8660367
2015-12-03 13:30:02 -08:00
Cecile Berillon
6064bfa18a copytrace: modifying buildstate behavior
Summary: Using it on 10000 commits makes SQL crashs because the queries are too big. Modifies buildstate to check if the oldest and most recent commits on the public branch, rebased to, are in the database, if yes: Assumes all of the nodes in between are. If not: goes through all the nodes by 1000 to check/retrieve them from the server. To avoid double checking if the hash is present in the database, during a retrievepkg, missing hashes are manually added and never asked to the server (this should mostly never happem)

Test Plan: The former tests still pass and buildstate doesn't raise an exception anymore when rebasing over 10000 commits

Reviewers: #sourcecontrol, rmcelroy

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

Tasks: 8660367
2015-12-03 13:25:07 -08:00
Cecile Berillon
75943ea342 copytrace: correcting copytrace bug
Summary: Only add a copy in the dictionary is that file was modified in the other branch or in some weird case useful when rebasing several commits at a time. This avoids unnecessary merges.

Test Plan: Old tests still pass

Reviewers: #sourcecontrol, rmcelroy

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

Tasks: 8659945
2015-12-03 13:10:04 -08:00
Siddharth Agarwal
ebe6a3b2a1 mergedriver: add an option to resolve to skip merge driver
Sometimes the merge driver might be malfunctioning -- it is important to have a
way to skip it so that this can be resolved later.
2015-12-02 22:58:57 -08:00
Tony Tung
58fb220285 add the ability to specify a destination for the statprof data
Summary:
This allows us to target the statprof data at a file of the
wrapper's choosing.

Test Plan: HGPROF=stat STATPROF_DEST=/tmp/statprof.data PYTHONPATH=/Users/tonytung/work/mercurial/facebook-hg-rpms/fb-hgext hg.real --profile status

Reviewers: durham, ericsumner, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir

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

Signature: t1:2715997:1449105707:c07c83c0889c33cc693836917100d3007d0b631b
2015-12-02 21:54:56 -08:00
Jun Wu
2c14585429 rage: add --preview option
Summary:
`hg rage` is useful collecting information suitable for error reports.
Currently it is hardcoded to create a new task. This patch adds an
`--preview` option to print the information without creating tasks.

Test Plan:
1. `hg rage --preview` prints expected information
2. Mock `oncalls`, `arc`, `tasks` and confirm `hg rage` works

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

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

Tasks: 9259456

Signature: t1:2716395:1449110560:efa372f5aab0cf2c586339413f4a0ebf27ad9014
2015-12-02 18:44:42 -08:00
Cecile Berillon
242c95f129 copytrace: adding comments
Summary: adding comments

Test Plan: former tests still pass

Reviewers: #sourcecontrol, rmcelroy

Differential Revision: https://phabricator.fb.com/D2713383
2015-12-02 17:45:01 -08:00
Cecile Berillon
92d7a9147e copytrace: push old move data
Summary: the option copytrace.pushmvdb allows to use the push command (with nothing to push) to send the whole database to the server and fill it

Test Plan: I tested it manually with an XDB. I am not sure how to automate that see what's present in the XDB

Reviewers: #sourcecontrol, rmcelroy

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

Tasks: 8660367
2015-12-02 17:45:01 -08:00
Cecile Berillon
9d05ef5950 copytrace: process old move data
Summary: adds a 'fillmvdb' command to backfill the move db with --start and --stop options

Test Plan: tests with several --start nodes and one --stop revision

Reviewers: #sourcecontrol, rmcelroy

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

Tasks: 8659945
2015-12-02 17:45:01 -08:00
Siddharth Agarwal
f07f8b307a mergedriver: don't abort on changed merge driver
We want to retain the flexibility of being able to disable the merge driver if
stuff breaks disastrously.
2015-12-02 16:09:14 -08:00
Siddharth Agarwal
3156dfe5a3 mergedriver: ignore failures where the file wasn't found 2015-12-02 14:20:51 -08:00
Siddharth Agarwal
f82ca9d07a test-mergedriver.t: update output 2015-12-02 13:20:30 -08:00
Mateusz Kwapich
646c769bb7 Add interactive rebase
Summary: The interactive rebase which is using new histedit base keyword underneath.

Test Plan: see tests

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: durham, rmcelroy

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

Signature: t1:2705834:1449024840:c29ee246492c5e7c9e595b65ba256e5326ef631d
2015-12-02 12:10:59 -08:00
Tony Tung
66d30f5f71 [manifestdiskcache] cache pinning
Summary:
Resolve the revset configured, and use that to insulate revs from pruning.

Built a unit test.

Test Plan: passed unit tests.

Reviewers: rmcelroy, mpm, pyd, durham

Reviewed By: durham

Subscribers: mitrandir, akushner

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

Signature: t1:2573162:1449076016:9353a80b8801accfe634990285496fab44a66d6e
2015-12-02 11:42:47 -08:00
Tony Tung
1a1da38248 [manifestdiskcache] RFC: a disk cache for manifests
Summary:
# Intercept manifest.revision(..).  The cache is checked, and if it's not there, resume the normal path.  Once the normal path is complete, write to the cache.
# Intercept manifest._addrevision(..).  This may be used in bulk operations, such as pull.  Since we don't want to flood the cache with a lot of entries we may not care about, we record all the nodes that are added.  We add an atexit hook to then record the last N nodes to the cache.
# Writes to the cache are done to a temp file, then atomically renamed into place.
# On reads, we run the checkhash function.  This costs us ~100ms per manifest in fbsource, but ensures a corrupt cache doesn't break us.  Love to debate this matter.
# On each batch of writes, we spawn a background copy of ourselves to prune the cache.  We use the mtime of a marker file to determine the last time the prune happened.  We calculate the odds that we should be doing the prune using a couple constants and the time since the last prune.  If another prune happened recently, the dominant factor is a small probability that we run the prune, regardless of the interval.  If no prune has happened recently, the dominant factor is the seconds-since-prune configuration variable.

Some performance numbers (all averaged across 10 runs)
* diff between two revs: 2.29s without caching; 1.75s with caching
* rebasing 4 diffs: 12.1s without caching; 10.7s with caching

Test Plan: passed the rudimentary correctness unit tests.  with fbsource, ran a small handful of commands without anybody tripping and falling.

Reviewers: rmcelroy, ericsumner, mpm, pyd, durham

Reviewed By: durham

Subscribers: akushner, mitrandir, cdelahousse

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

Signature: t1:2564490:1449075868:70974c62e6bff6521b6f500b5bff3a260ddd6c6d
2015-12-02 11:42:47 -08:00
Laurent Charignon
b5178471a0 sparse: forbid paths starting with /
Summary:
Forbit paths starting with / in sparse file and using the command
line arguments. Also fix a typo (util.abort vs util.Abort)

Test Plan: added test

Reviewers: durham

Differential Revision: https://phabricator.fb.com/D2696541
2015-12-01 13:17:31 -08:00
Cecile Berillon
7caebc6b05 copytrace: running the tests through dummy ssh
Summary: running the tests through dummy ssh to test bundle2

Test Plan: the old tests pass, the modified one now uses remote

Reviewers: #sourcecontrol, rmcelroy

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

Tasks: 8660367
2015-12-01 11:23:51 -08:00
Christian Delahousse
b43aa75c43 morestatus: fix mergestate.active crashing with hg 2015-12-04 release
Summary:
Something changed in upstream hg to make mergestate.active blow up without when
not no instantiated with `.read(repo)`

Test Plan:
Ran tests using appropriate hg (release)

  11/30 17:35 cdelahousse@dev4253 ~/local/fb-hgext/tests
  $ ./run-tests.py test-morestatus.t --with-hg=~/facebook-hg-rpms/hg-crew/hg
  .
  # Ran 1 tests, 0 skipped, 0 warned, 0 failed.

Reviewers: #sourcecontrol, rmcelroy, ericsumner

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

Tasks: 9259195
2015-11-30 17:39:30 -08:00
Mateusz Kwapich
3a80387646 Fix the fbhistedit after core histedit API change
Summary: .

Test Plan: tests

Reviewers: ericsumner

Reviewed By: ericsumner

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

Signature: t1:2704702:1448920622:d9bd5a5c5100dc9d8f11844a49c2f79263d6a8bc
2015-11-30 14:33:25 -08:00
Xudong Wang
f97848cf4b fixing hg-new-workdir script problem
Summary: Fixing issue [[ http://www.facebook.com/groups/sourcecontrol/permalink/908533209196300/?comment_id=908544142528540&offset=0&total_comments=3 | here ]]

Test Plan:
  $ hg-clone-fbsource --no-working-dir
  $ hg-new-workdir ~/fbsource/ ~/fbandroid/

expect hg not updating to tip

Reviewers: quark, rmcelroy

Reviewed By: rmcelroy

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

Tasks: 9048802

Signature: t1:2700764:1448914720:1218c99891cdd4be40369626cfc7d0c9c41ba811
2015-11-30 22:07:59 +00:00
Jun Wu
c01d6c54d9 Add interrupted update state to morestatus
Summary: People complain that `hg status` won't tell them if the repo is in a interrupted update state. This diff adds it.

Test Plan:
1. `cd` to some big project
2. Pick a random old revision from `hg log`, say `fdaa3224d9bd`.
3. `hg update fdaa3224d9bd`
4. Shortly after, in another terminal, `pkill -9 hg`
5. Check `hg status` will print:

```
# The repository is in an unfinished *update* state.
# To continue:                hg update fdaa3224d9bd
# To abort:                   hg update .
```

Also run `run-tests.py test-morestatus.t`.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: durham, pyd, cdelahousse, lcharignon

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

Tasks: 9200036

Signature: t1:2691730:1448496639:135542e2698e44a824debd74d6393b98cc74e014
2015-11-27 05:16:53 -08:00