tests/test-issue1502.t
author Gregory Szorc <gregory.szorc@gmail.com>
Fri, 04 Dec 2015 00:24:48 -0800
changeset 27268 ed1660ce99d9
parent 26968 216cc65cf227
child 28064 9e0535da20a5
permissions -rw-r--r--
setup.py: attempt to build and install hg.exe on Windows Currently, packaging Mercurial on Windows will produce a Scripts\hg Python script and a Scripts\hg.bat batch script. The py2exe distribution contains a hg.exe which loads a Python interpretter and invokes the "hg" Python script. Running a exe directly has benefits over batch scripts because batch scripts do things like muck around with command arguments. This patch implements a custom "build_scripts" command which attempts to build hg.exe on Windows. If hg.exe is built, it is marked as a "script" file and installed into the Scripts\ directory on Windows. Since hg.exe is redundant and better than hg.bat, if hg.exe is built, hg.bat is not installed. Since some environments don't support compiling C programs, we treat hg.exe as optional and catch failures building it. This is not ideal. However, I reckon most Windows users will not be installing Mercurial from source: they will get it from the MSI installer or via `pip install Mercurial`, which will download a wheel that has hg.exe in it. So, I don't think this is a big deal.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26420
2fc86d92c4a9 urls: bulk-change BTS urls to new location
Matt Mackall <mpm@selenic.com>
parents: 19798
diff changeset
     1
https://bz.mercurial-scm.org/1502
13478
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     2
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     3
Initialize repository
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     4
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     5
  $ hg init foo
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     6
  $ touch foo/a && hg -R foo commit -A -m "added a"
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     7
  adding a
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     8
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
     9
  $ hg clone foo foo1
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    10
  updating to branch default
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    11
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    12
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    13
  $ echo "bar" > foo1/a && hg -R foo1 commit -m "edit a in foo1"
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    14
  $ echo "hi" > foo/a && hg -R foo commit -m "edited a foo"
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    15
  $ hg -R foo1 pull -u
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 14485
diff changeset
    16
  pulling from $TESTTMP/foo (glob)
13478
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    17
  searching for changes
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    18
  adding changesets
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    19
  adding manifests
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    20
  adding file changes
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    21
  added 1 changesets with 1 changes to 1 files (+1 heads)
26968
216cc65cf227 pull: return 255 value on update failure (issue4948) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 26420
diff changeset
    22
  abort: not updating: not a linear update
19798
76df01e56e7f update: improve error message for clean non-linear update
Siddharth Agarwal <sid0@fb.com>
parents: 15447
diff changeset
    23
  (merge or update --check to force update)
26968
216cc65cf227 pull: return 255 value on update failure (issue4948) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 26420
diff changeset
    24
  [255]
13478
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    25
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    26
  $ hg -R foo1 book branchy
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    27
  $ hg -R foo1 book
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    28
   * branchy                   1:e3e522925eff
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    29
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    30
Pull. Bookmark should not jump to new head.
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    31
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    32
  $ echo "there" >> foo/a && hg -R foo commit -m "edited a again"
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    33
  $ hg -R foo1 pull
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 14485
diff changeset
    34
  pulling from $TESTTMP/foo (glob)
13478
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    35
  searching for changes
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    36
  adding changesets
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    37
  adding manifests
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    38
  adding file changes
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    39
  added 1 changesets with 1 changes to 1 files
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    40
  (run 'hg update' to get a working copy)
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    41
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    42
  $ hg -R foo1 book
c631ac076375 bookmarks: restrict moving a bookmark to its descendants (issue1502)
David Soria Parra <dsp@php.net>
parents:
diff changeset
    43
   * branchy                   1:e3e522925eff